Skip to content

Commit

Permalink
Fix FL_FAKECLIENT flag being cleared in some places
Browse files Browse the repository at this point in the history
  • Loading branch information
SamVanheer committed Mar 17, 2022
1 parent 95cc9dc commit 6b8ab74
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/game/server/entities/items/weapons/CDisplacerBall.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,9 @@ void CDisplacerBall::BallTouch(CBaseEntity* pOther)
{
CBasePlayer* pPlayer = static_cast<CBasePlayer*>(pOther);

//TODO: what is this for? - Solokiller
pPlayer->pev->flags = FL_CLIENT;
//Clear any flags set on player (onground, using grapple, etc).
pPlayer->pev->flags &= FL_FAKECLIENT;
pPlayer->pev->flags |= FL_CLIENT;
pPlayer->m_flFallVelocity = 0;

if (g_pGameRules->IsCTF() && pPlayer->m_pFlag)
Expand Down
3 changes: 2 additions & 1 deletion src/game/server/entities/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5327,7 +5327,8 @@ bool CBasePlayer::Menu_Char_Input(int inp)
if (0 != pev->iuser1)
{
pev->effects &= ~EF_NODRAW;
pev->flags = FL_CLIENT;
pev->flags &= FL_FAKECLIENT;
pev->flags |= FL_CLIENT;
pev->takedamage = DAMAGE_YES;
m_iHideHUD &= ~(HIDEHUD_HEALTH | HIDEHUD_WEAPONS);
m_afPhysicsFlags &= PFLAG_OBSERVER;
Expand Down

0 comments on commit 6b8ab74

Please sign in to comment.