diff options
| author | inspectredc <78732756+inspectredc@users.noreply.github.com> | 2024-02-02 01:58:08 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-02-01 19:58:08 -0600 |
| commit | 2529dc59bd5ab3be95ed7d5530cde90bc48758de (patch) | |
| tree | 90809570de618df1be400628f4654de730f02fa4 /soh/src/code | |
| parent | 61cf2bd323e8e31d416d9d2e325b02fb2c6a2260 (diff) | |
Increase Door Cull range (#3888)
* cullzone
* better cvar name
* Update soh/src/code/z_actor.c
* Update soh/src/code/z_actor.c
---------
Co-authored-by: Garrett Cox <garrettjcox@gmail.com>
Diffstat (limited to 'soh/src/code')
| -rw-r--r-- | soh/src/code/z_actor.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/soh/src/code/z_actor.c b/soh/src/code/z_actor.c index df9b6c758..c1dc66e23 100644 --- a/soh/src/code/z_actor.c +++ b/soh/src/code/z_actor.c @@ -2860,11 +2860,19 @@ s32 func_800314D4(PlayState* play, Actor* actor, Vec3f* arg2, f32 arg3) { if ((arg2->z > -actor->uncullZoneScale) && (arg2->z < (actor->uncullZoneForward + actor->uncullZoneScale))) { var = (arg3 < 1.0f) ? 1.0f : 1.0f / arg3; - if ((((fabsf(arg2->x) - actor->uncullZoneScale) * var) < 1.0f) && - (((arg2->y + actor->uncullZoneDownward) * var) > -1.0f) && - (((arg2->y - actor->uncullZoneScale) * var) < 1.0f)) { + // #region SoH [Widescreen support] + // Doors will cull quite noticeably on wider screens. For these actors the zone is increased + f32 limit = 1.0f; + if (((actor->id == ACTOR_EN_DOOR) || (actor->id == ACTOR_DOOR_SHUTTER)) && CVarGetInteger("gIncreaseDoorUncullZones", 1)) { + limit = 2.0f; + } + + if ((((fabsf(arg2->x) - actor->uncullZoneScale) * var) < limit) && + (((arg2->y + actor->uncullZoneDownward) * var) > -limit) && + (((arg2->y - actor->uncullZoneScale) * var) < limit)) { return true; } + // #endregion } return false; |
