mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-20 13:23:45 -07:00
Merge branch 'accessibility-interaction' into accessibility
This commit is contained in:
commit
3f56f7d170
2 changed files with 11 additions and 4 deletions
|
@ -24,6 +24,7 @@ void BootCommands_Init()
|
|||
CVar_RegisterS32("gDisableLOD", 0);
|
||||
CVar_RegisterS32("gDebugEnabled", 0);
|
||||
CVar_RegisterS32("gPauseLiveLink", 0);
|
||||
CVar_RegisterS32("gAccessibleInteraction", 0);
|
||||
}
|
||||
|
||||
//void BootCommands_ParseBootArgs(char* str)
|
||||
|
|
|
@ -419,11 +419,17 @@ void EnBox_WaitOpen(EnBox* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
osSyncPrintf("Actor_Environment_Tbox_On() %d\n", this->dyna.actor.params & 0x1F);
|
||||
Flags_SetTreasure(globalCtx, this->dyna.actor.params & 0x1F);
|
||||
} else {
|
||||
bool isPlayerInFrontOfActor;
|
||||
if (CVar_GetS32("gAccessibleInteraction", 0)) {
|
||||
isPlayerInFrontOfActor = true;
|
||||
} else {
|
||||
player = GET_PLAYER(globalCtx);
|
||||
func_8002DBD0(&this->dyna.actor, &sp4C, &player->actor.world.pos);
|
||||
if (sp4C.z > -50.0f && sp4C.z < 0.0f && fabsf(sp4C.y) < 10.0f && fabsf(sp4C.x) < 20.0f &&
|
||||
Player_IsFacingActor(&this->dyna.actor, 0x3000, globalCtx)) {
|
||||
isPlayerInFrontOfActor = sp4C.z > -50.0f && sp4C.z < 0.0f && fabsf(sp4C.y) < 10.0f && fabsf(sp4C.x) < 20.0f;
|
||||
}
|
||||
|
||||
if (isPlayerInFrontOfActor && Player_IsFacingActor(&this->dyna.actor, 0x3000, globalCtx)) {
|
||||
func_8002F554(&this->dyna.actor, globalCtx, 0 - (this->dyna.actor.params >> 5 & 0x7F));
|
||||
}
|
||||
if (Flags_GetTreasure(globalCtx, this->dyna.actor.params & 0x1F)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue