Skip to content

Commit

Permalink
safety for when a marine has no associated player
Browse files Browse the repository at this point in the history
  • Loading branch information
BenLubar committed Aug 23, 2024
1 parent 328c048 commit acf2c02
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/game/shared/swarm/asw_weapon_plasma_thrower_shared.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ void CASW_Weapon_Plasma_Thrower::PrimaryAttack()
short Height;
} S;
} Screen;
Screen.WidthHeight = pPlayer->m_iScreenWidthHeight;
Screen.WidthHeight = pPlayer ? pPlayer->m_iScreenWidthHeight : 0x28001E0; // default to 640x480 for unowned bots
union
{
unsigned XY;
Expand All @@ -379,7 +379,7 @@ void CASW_Weapon_Plasma_Thrower::PrimaryAttack()
short Y;
} M;
} Mouse;
Mouse.XY = pPlayer->m_iMouseXY;
Mouse.XY = pPlayer ? pPlayer->m_iMouseXY : 0x14000F0; // default to middle of screen

if ( eControls == ASWC_TOPDOWN && pPlayer )
{
Expand Down

0 comments on commit acf2c02

Please sign in to comment.