Skip to content

Commit a4edc34

Browse files
committed
fixed spectating method and something
1 parent c737246 commit a4edc34

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/game/client/swarm/asw_in_mouse.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,9 @@ void CASWInput::ApplyMouse( int nSlot, QAngle& viewangles, CUserCmd *cmd, float
9090

9191
// restrict cursor to 16:9 area to prevent ultra-wide fov cheat
9292
g_ultra_wide_screen = false;
93-
C_BasePlayer* player = C_BasePlayer::GetLocalPlayer();
93+
C_ASW_Player* asw_player = C_ASW_Player::GetLocalASWPlayer();
9494

95-
if (player && !player->IsObserver()) {
95+
if (asw_player && !asw_player->GetSpectatingNPC()) {
9696
int screen_w = ScreenWidth();
9797
int screen_h = ScreenHeight();
9898
float aspect = static_cast<float>(screen_w) / screen_h;

src/game/client/swarm/vgui/asw_hud_master.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ void CASW_Hud_Master::Paint( void )
487487
if ( m_pLocalMarineResource )
488488
{
489489
// draw restricted borders for ultra-wide screen
490-
if (rd_draw_restricted_borders.GetBool() && g_ultra_wide_screen && !pPlayer->IsObserver()) {
490+
if (rd_draw_restricted_borders.GetBool() && g_ultra_wide_screen && !pPlayer->GetSpectatingNPC()) {
491491
// (x,y)-----------(w,y)
492492
// | |
493493
// | |

0 commit comments

Comments
 (0)