Skip to content

Commit

Permalink
Merge pull request #60 from fortressforever-2013/dev
Browse files Browse the repository at this point in the history
v3.0.0-alpha3a
  • Loading branch information
YoYo178 authored Nov 21, 2024
2 parents a3770a6 + ebcf9ff commit 6e915f7
Showing 1 changed file with 5 additions and 16 deletions.
21 changes: 5 additions & 16 deletions mp/src/game/client/ff/c_ff_player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,11 +167,7 @@ extern IFileSystem** pFilesystem;
// Need this to remove the HUD context menus on spawn
extern void HudContextForceClose();

// the values should match with ff_player.cpp!!
// grenade information
//ConVar gren_timer("ffdev_gren_timer","3.81",0,"Timer length for all grenades.");
#define GREN_TIMER 3.81f
//ConVar gren_throw_delay("ffdev_throw_delay","0.5",0,"Delay before primed grenades can be thrown.");
// this needs to match the value from ff_player.cpp!!
#define GREN_THROW_DELAY 0.5f

// #0000331: impulse 81 not working (weapon_cubemap)
Expand Down Expand Up @@ -436,7 +432,7 @@ bool CC_PrimeOne(const CCommand& args)

// dexter: uncomment this timer - use to to manage our number of active grenade sounds fuck
/* JUST KIDDING IT DOESNT WORK
C_FFTimer *pTimer = g_FFTimers.Create("PrimeGren", GREN_TIMER);
C_FFTimer *pTimer = g_FFTimers.Create("PrimeGren", 3.81f);
if (pTimer)
{
pTimer->m_bRemoveWhenExpired = true;
Expand All @@ -463,7 +459,7 @@ bool CC_PrimeOne(const CCommand& args)
pLocalPlayer->EmitSound(filter, pLocalPlayer->entindex(), params);

Assert(g_pGrenade1Timer);
g_pGrenade1Timer->SetTimer(GREN_TIMER);
g_pGrenade1Timer->SetTimer(3.81f);

// dexter: increase their active nade sound
//pLocalPlayer->m_iActiveGrenTimers++;
Expand Down Expand Up @@ -551,7 +547,7 @@ bool CC_PrimeTwo(const CCommand& args)
pLocalPlayer->EmitSound(filter, pLocalPlayer->entindex(), params);

Assert(g_pGrenade2Timer);
g_pGrenade2Timer->SetTimer(GREN_TIMER);
g_pGrenade2Timer->SetTimer(3.81f);

// Tracks gren prime time to see if a player released the grenade right away (unprimed)
pLocalPlayer->m_flGrenPrimeTime = gpGlobals->curtime;
Expand Down Expand Up @@ -895,8 +891,7 @@ DEFINE_PRED_FIELD(m_iJetpackFuel, FIELD_INTEGER, FTYPEDESC_INSENDTABLE),
DEFINE_PRED_FIELD(m_flNextClassSpecificSkill, FIELD_FLOAT, FTYPEDESC_INSENDTABLE),
DEFINE_PRED_FIELD(m_flJetpackNextFuelRechargeTime, FIELD_FLOAT, FTYPEDESC_OVERRIDE | FTYPEDESC_PRIVATE | FTYPEDESC_NOERRORCHECK),
DEFINE_PRED_FIELD(m_bCanDoubleJump, FIELD_BOOLEAN, FTYPEDESC_OVERRIDE ),
DEFINE_PRED_FIELD_TOL(m_flNextJumpTimeForDouble, FIELD_FLOAT, FTYPEDESC_OVERRIDE | FTYPEDESC_NOERRORCHECK, TD_MSECTOLERANCE),
DEFINE_PRED_FIELD(m_iGrenadeState, FIELD_INTEGER, FTYPEDESC_INSENDTABLE)
DEFINE_PRED_FIELD_TOL(m_flNextJumpTimeForDouble, FIELD_FLOAT, FTYPEDESC_OVERRIDE | FTYPEDESC_NOERRORCHECK, TD_MSECTOLERANCE)
END_PREDICTION_DATA()

class C_FFRagdoll : public C_BaseAnimatingOverlay
Expand Down Expand Up @@ -2725,12 +2720,6 @@ void C_FFPlayer::ClientThink(void)
}
}

// see CFFPlayer::GrenadeThink()
if (m_iGrenadeState != 0 && m_flGrenPrimeTime > 0 && gpGlobals->curtime - m_flGrenPrimeTime >= GREN_TIMER)
{
CC_ThrowGren();
}

_mathackman.Update();

BaseClass::ClientThink();
Expand Down

0 comments on commit 6e915f7

Please sign in to comment.