diff options
| author | Roman971 <32455037+Roman971@users.noreply.github.com> | 2022-05-12 15:04:37 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-05-12 09:04:37 -0400 |
| commit | 92aef346f2bd7167b892beddafd0959801df0e3c (patch) | |
| tree | bdaed9512cab3ebdd3ecee4961688c86a8fbab67 /src/code/z_actor.c | |
| parent | c799176a30c5a1389c720bdfcdf4c1c9f3b07b32 (diff) | |
Remove many redundant parentheses (eg. in boolean conditions) (#1220)
* Remove many unnecessary parens around boolean conditions
* Remove duplicate parens in some expressions
* Apply review suggestions
* Update src/overlays/actors/ovl_Bg_Jya_Lift/z_bg_jya_lift.c
Co-authored-by: EllipticEllipsis <elliptic.ellipsis@gmail.com>
Co-authored-by: EllipticEllipsis <elliptic.ellipsis@gmail.com>
Diffstat (limited to 'src/code/z_actor.c')
| -rw-r--r-- | src/code/z_actor.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/code/z_actor.c b/src/code/z_actor.c index 44685c632..4f6c2bf26 100644 --- a/src/code/z_actor.c +++ b/src/code/z_actor.c @@ -353,7 +353,7 @@ void func_8002C124(TargetContext* targetCtx, GlobalContext* globalCtx) { func_8002BE64(targetCtx, targetCtx->unk_4C, projTargetCenter.x, projTargetCenter.y, projTargetCenter.z); - if ((!(player->stateFlags1 & PLAYER_STATE1_6)) || (actor != player->unk_664)) { + if (!(player->stateFlags1 & PLAYER_STATE1_6) || (actor != player->unk_664)) { OVERLAY_DISP = Gfx_CallSetupDL(OVERLAY_DISP, 0x39); for (spB0 = 0, spAC = targetCtx->unk_4C; spB0 < spB8; spB0++, spAC = (spAC + 1) % 3) { @@ -3888,7 +3888,7 @@ s16 func_80034DD4(Actor* actor, GlobalContext* globalCtx, s16 arg2, f32 arg3) { Player* player = GET_PLAYER(globalCtx); f32 var; - if ((globalCtx->csCtx.state != CS_STATE_IDLE) || (gDbgCamEnabled)) { + if ((globalCtx->csCtx.state != CS_STATE_IDLE) || gDbgCamEnabled) { var = Math_Vec3f_DistXYZ(&actor->world.pos, &globalCtx->view.eye) * 0.25f; } else { var = Math_Vec3f_DistXYZ(&actor->world.pos, &player->actor.world.pos); @@ -5550,7 +5550,7 @@ s32 func_80038154(GlobalContext* globalCtx, Actor* actor, Vec3s* arg2, Vec3s* ar actor->focus.pos = actor->world.pos; actor->focus.pos.y += arg4; - if (!(((globalCtx->csCtx.state != CS_STATE_IDLE) || (gDbgCamEnabled)) && + if (!(((globalCtx->csCtx.state != CS_STATE_IDLE) || gDbgCamEnabled) && (gSaveContext.entranceIndex == ENTR_SPOT04_0))) { var = actor->yawTowardsPlayer - actor->shape.rot.y; abs_var = ABS(var); @@ -5560,7 +5560,7 @@ s32 func_80038154(GlobalContext* globalCtx, Actor* actor, Vec3s* arg2, Vec3s* ar } } - if (((globalCtx->csCtx.state != CS_STATE_IDLE) || (gDbgCamEnabled)) && + if (((globalCtx->csCtx.state != CS_STATE_IDLE) || gDbgCamEnabled) && (gSaveContext.entranceIndex == ENTR_SPOT04_0)) { sp2C = globalCtx->view.eye; } else { @@ -5581,7 +5581,7 @@ s32 func_80038290(GlobalContext* globalCtx, Actor* actor, Vec3s* arg2, Vec3s* ar actor->focus.pos = arg4; - if (!(((globalCtx->csCtx.state != CS_STATE_IDLE) || (gDbgCamEnabled)) && + if (!(((globalCtx->csCtx.state != CS_STATE_IDLE) || gDbgCamEnabled) && (gSaveContext.entranceIndex == ENTR_SPOT04_0))) { var = actor->yawTowardsPlayer - actor->shape.rot.y; abs_var = ABS(var); @@ -5591,7 +5591,7 @@ s32 func_80038290(GlobalContext* globalCtx, Actor* actor, Vec3s* arg2, Vec3s* ar } } - if (((globalCtx->csCtx.state != CS_STATE_IDLE) || (gDbgCamEnabled)) && + if (((globalCtx->csCtx.state != CS_STATE_IDLE) || gDbgCamEnabled) && (gSaveContext.entranceIndex == ENTR_SPOT04_0)) { sp24 = globalCtx->view.eye; } else { |
