Skip to content

Commit

Permalink
Fixed crash in CheckSolidFooting ACS function
Browse files Browse the repository at this point in the history
  • Loading branch information
Evghenii committed May 19, 2024
1 parent 05e131d commit e279991
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/p_acs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8135,6 +8135,9 @@ doplaysound: if (funcIndex == ACSF_PlayActorSound)
case ACSF_CheckSolidFooting:
{
AActor* actor = SingleActorFromTID(args[0], activator);
if (actor == nullptr)
return 0; // 0 == CSF_INAIR

int threshold = argCount > 1 ? args[1] : 0;

if (actor->z <= actor->floorz + threshold)
Expand Down

0 comments on commit e279991

Please sign in to comment.