mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-11-25 10:52:19 -05:00
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>
This commit is contained in:
parent
61cf2bd323
commit
2529dc59bd
@ -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))) {
|
if ((arg2->z > -actor->uncullZoneScale) && (arg2->z < (actor->uncullZoneForward + actor->uncullZoneScale))) {
|
||||||
var = (arg3 < 1.0f) ? 1.0f : 1.0f / arg3;
|
var = (arg3 < 1.0f) ? 1.0f : 1.0f / arg3;
|
||||||
|
|
||||||
if ((((fabsf(arg2->x) - actor->uncullZoneScale) * var) < 1.0f) &&
|
// #region SoH [Widescreen support]
|
||||||
(((arg2->y + actor->uncullZoneDownward) * var) > -1.0f) &&
|
// Doors will cull quite noticeably on wider screens. For these actors the zone is increased
|
||||||
(((arg2->y - actor->uncullZoneScale) * var) < 1.0f)) {
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
// #endregion
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user