mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-19 21:03:42 -07:00
Merge branch 'accessibility-moretargets' into accessibility
This commit is contained in:
commit
296cc545bc
2 changed files with 28 additions and 2 deletions
|
@ -25,6 +25,7 @@ void BootCommands_Init()
|
|||
CVar_RegisterS32("gDebugEnabled", 0);
|
||||
CVar_RegisterS32("gPauseLiveLink", 0);
|
||||
CVar_RegisterS32("gAccessibleInteraction", 0);
|
||||
CVar_RegisterS32("gMoreTargets", 0);
|
||||
}
|
||||
|
||||
//void BootCommands_ParseBootArgs(char* str)
|
||||
|
|
|
@ -1789,8 +1789,33 @@ u32 func_8002F090(Actor* actor, f32 arg1) {
|
|||
return arg1 < D_80115FF8[actor->targetMode].rangeSq;
|
||||
}
|
||||
|
||||
s32 Actor_IsTargetable(Actor* actor, Player* player) {
|
||||
s32 targetMode = CVar_GetS32("gMoreTargets", 0);
|
||||
|
||||
if ((actor->update == NULL) || ((Player*)actor == player)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (targetMode == 99) {
|
||||
return true;
|
||||
} else if (targetMode == 2) {
|
||||
return CHECK_FLAG_ALL(actor->flags, ACTOR_FLAG_0) ||
|
||||
actor->category == ACTORCAT_CHEST ||
|
||||
actor->category == ACTORCAT_SWITCH ||
|
||||
actor->id == ACTOR_EN_SW || actor->id == ACTOR_BOSS_GANON ||
|
||||
actor->id == ACTOR_OBJ_HSBLOCK || actor->id == ACTOR_OBJ_SYOKUDAI;
|
||||
} else if (targetMode == 1) {
|
||||
return CHECK_FLAG_ALL(actor->flags, ACTOR_FLAG_0) ||
|
||||
actor->category == ACTORCAT_CHEST ||
|
||||
actor->category == ACTORCAT_SWITCH;
|
||||
} else {
|
||||
//original/default
|
||||
return CHECK_FLAG_ALL(actor->flags, ACTOR_FLAG_0);
|
||||
}
|
||||
}
|
||||
|
||||
s32 func_8002F0C8(Actor* actor, Player* player, s32 flag) {
|
||||
if ((actor->update == NULL) || !(actor->flags & ACTOR_FLAG_0)) {
|
||||
if (!Actor_IsTargetable(actor, player)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -3227,7 +3252,7 @@ void func_800328D4(GlobalContext* globalCtx, ActorContext* actorCtx, Player* pla
|
|||
sp84 = player->unk_664;
|
||||
|
||||
while (actor != NULL) {
|
||||
if ((actor->update != NULL) && ((Player*)actor != player) && CHECK_FLAG_ALL(actor->flags, ACTOR_FLAG_0)) {
|
||||
if (Actor_IsTargetable(actor, player)) {
|
||||
|
||||
// This block below is for determining the closest actor to player in determining the volume
|
||||
// used while playing enemy bgm music
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue