Skip to content

Commit

Permalink
Spec fixes - Lean 3p spec fix, POI mode filtered out (#484)
Browse files Browse the repository at this point in the history
* fixes #418
* fixes #451
  • Loading branch information
nullsystem committed Jul 6, 2024
1 parent 58c1fbc commit 87c0230
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
6 changes: 5 additions & 1 deletion mp/src/game/client/neo/c_neo_player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -839,7 +839,10 @@ void C_NEO_Player::PreThink( void )
m_flCamoAuxLastTime = 0;
}

Lean();
if (IsAlive())
{
Lean();
}

// Eek. See rationale for this thing in CNEO_Player::PreThink
if (IsAirborne())
Expand Down Expand Up @@ -1011,6 +1014,7 @@ void C_NEO_Player::PostThink(void)

Weapon_SetZoom(false);
m_bInVision = false;
m_bInLean = NEO_LEAN_NONE;

if (IsLocalPlayer() && (GetTeamNumber() == TEAM_JINRAI || GetTeamNumber() == TEAM_NSF))
{
Expand Down
6 changes: 5 additions & 1 deletion mp/src/game/server/neo/neo_player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,10 @@ void CNEO_Player::PreThink(void)
m_flCamoAuxLastTime = 0;
}

Lean();
if (IsAlive())
{
Lean();
}

// NEO HACK (Rain): Just bodging together a check for if we're allowed
// to superjump, or if we've been airborne too long for that.
Expand Down Expand Up @@ -1047,6 +1050,7 @@ void CNEO_Player::PostThink(void)

Weapon_SetZoom(false);
m_bInVision = false;
m_bInLean = NEO_LEAN_NONE;
}

return;
Expand Down
9 changes: 9 additions & 0 deletions mp/src/game/server/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2320,6 +2320,15 @@ bool CBasePlayer::SetObserverMode(int mode )
if ( mode < OBS_MODE_NONE || mode >= NUM_OBSERVER_MODES )
return false;

#ifdef NEO
// NEO NOTE (nullsystem): Skip over OBS_MODE_POI as it's practically OBS_MODE_CHASE
// with different HUD in NT;RE. Use either prev/next enum.
if (mode == OBS_MODE_POI)
{
if (m_iObserverMode < OBS_MODE_POI) mode = OBS_MODE_ROAMING;
else mode = OBS_MODE_CHASE;
}
#endif

// check mp_forcecamera settings for dead players
if ( mode > OBS_MODE_FIXED && GetTeamNumber() > TEAM_SPECTATOR )
Expand Down

0 comments on commit 87c0230

Please sign in to comment.