Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
# Conflicts:
#	src/game/shared/entities/items/weapons/CEgon.cpp
  • Loading branch information
SamVanheer committed Jun 9, 2023
2 parents eaba16d + f616b8f commit 2034479
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 25 deletions.
2 changes: 2 additions & 0 deletions src/game/client/ev_hldm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1469,6 +1469,8 @@ void EV_EgonStop(event_args_t* args)

pFlare = nullptr;
}

gEngfuncs.pEventAPI->EV_WeaponAnimation(EGON_IDLE1, 0);
}
}
//======================
Expand Down
27 changes: 2 additions & 25 deletions src/game/shared/entities/items/weapons/CEgon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -451,22 +451,7 @@ void CEgon::WeaponIdle()
{
if ((m_pPlayer->m_afButtonPressed & IN_ATTACK2) == 0 && (m_pPlayer->pev->button & IN_ATTACK) != 0)
{
// Immediately stop attack animation even when holding down attack.
if (HasAmmo())
{
return;
}

#ifdef CLIENT_DLL
// HACK: force the idle animation to start now if it isn't already.
// This fixes cases where race conditions cause the fire animation to start again or continue.
const int anim = HUD_GetWeaponAnim();

if (anim != EGON_IDLE1 && anim != EGON_FIDGET1)
{
m_flTimeWeaponIdle = 0;
}
#endif
return;
}

ResetEmptySound();
Expand Down Expand Up @@ -506,15 +491,7 @@ void CEgon::EndAttack()
PLAYBACK_EVENT_FULL(FEV_GLOBAL | FEV_RELIABLE, m_pPlayer->edict(), m_usEgonStop, 0, m_pPlayer->pev->origin, m_pPlayer->pev->angles, 0.0, 0.0,
static_cast<int>(bMakeNoise), 0, 0, 0);

if (HasAmmo())
{
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 2.0;
}
else
{
// Immediately run idle.
m_flTimeWeaponIdle = UTIL_WeaponTimeBase();
}
m_flTimeWeaponIdle = UTIL_WeaponTimeBase() + 2.0;

m_flNextPrimaryAttack = m_flNextSecondaryAttack = UTIL_WeaponTimeBase() + 0.5;

Expand Down

0 comments on commit 2034479

Please sign in to comment.