Skip to content

Commit

Permalink
- block the centerview CCMD if the player has TOTALLYFROZEN. This is …
Browse files Browse the repository at this point in the history
…deliberately done this way, instead of placing the check inside PlayerPawn::CheckPitch, because there may be other situations where we don't want to block the centering function (APowerFlight::EndEffect being one such case)

- also while I'm in this file, fix code styling for another one of my previous submissions
  • Loading branch information
nashmuhandes authored and madame-rachelle committed Aug 9, 2023
1 parent a46c0a5 commit 1e0309e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/g_game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,8 @@ CCMD (slot)
}

// [Nash] Option to display the name of the weapon being switched to.
if ((paused || pauseext) || players[consoleplayer].playerstate != PST_LIVE) return;
if ((paused || pauseext) || players[consoleplayer].playerstate != PST_LIVE)
return;
if (SendItemUse != players[consoleplayer].ReadyWeapon && (displaynametags & 2) && StatusBar && SmallFont && SendItemUse)
{
StatusBar->AttachMessage(Create<DHUDMessageFadeOut>(nullptr, SendItemUse->GetTag(),
Expand All @@ -328,6 +329,8 @@ CCMD (slot)

CCMD (centerview)
{
if ((players[consoleplayer].cheats & CF_TOTALLYFROZEN))
return;
Net_WriteByte (DEM_CENTERVIEW);
}

Expand Down

0 comments on commit 1e0309e

Please sign in to comment.