Skip to content

Commit

Permalink
PM_CategorizePosition: Do not stick to the ground of an OBSERVER or N…
Browse files Browse the repository at this point in the history
…OCLIP mode
  • Loading branch information
s1lentq committed Jan 12, 2024
1 parent e636cbc commit c0f4794
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion regamedll/pm_shared/pm_shared.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1436,6 +1436,13 @@ void PM_CategorizePosition()
// water on each call, and the converse case will correct itself if called twice.
PM_CheckWater();

// Do not stick to the ground of an OBSERVER or NOCLIP mode
if (pmove->movetype == MOVETYPE_NOCLIP || pmove->movetype == MOVETYPE_NONE)
{
pmove->onground = -1;
return;
}

point[0] = pmove->origin[0];
point[1] = pmove->origin[1];
point[2] = pmove->origin[2] - 2;
Expand Down Expand Up @@ -3275,7 +3282,7 @@ void EXT_FUNC __API_HOOK(PM_Move)(struct playermove_s *ppmove, int server)
DbgAssert(pm_shared_initialized);

pmove = ppmove;

#ifdef REGAMEDLL_API
pmoveplayer = UTIL_PlayerByIndex(pmove->player_index + 1)->CSPlayer();
#endif
Expand Down

0 comments on commit c0f4794

Please sign in to comment.