Skip to content

Commit

Permalink
Fix spt_hud_vars crash (#316)
Browse files Browse the repository at this point in the history
  • Loading branch information
evanlin96069 authored and lipsanen committed Oct 20, 2024
1 parent 109a3c7 commit 61da955
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions spt/strafe/strafestuff.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,8 @@ namespace Strafe

bool CanUnduck(const PlayerData& player)
{
if ((player.DuckPressed && !tas_strafe_autojb.GetBool()) || !tas_strafe_use_tracing.GetBool())
if ((player.DuckPressed && !tas_strafe_autojb.GetBool()) || !tas_strafe_use_tracing.GetBool()
|| !utils::GetServerPlayer())
return false;
else
{
Expand All @@ -194,7 +195,8 @@ namespace Strafe
// Check ground.
int strafe_version = tas_strafe_version.GetInt();

if (!tas_strafe_use_tracing.GetBool() || strafe_version == 0 || !CanTrace())
if (!tas_strafe_use_tracing.GetBool() || strafe_version == 0 || !CanTrace()
|| !utils::GetServerPlayer())
{
if (spt_playerio.IsGroundEntitySet())
return PositionType::GROUND;
Expand Down

0 comments on commit 61da955

Please sign in to comment.