Skip to content

Commit

Permalink
Properly set up hand grenade sequence
Browse files Browse the repository at this point in the history
  • Loading branch information
Toodles2You committed Aug 1, 2023
1 parent d9e0a5a commit 2ee36b4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion dlls/ggrenade.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@ void CGrenade::BounceTouch(CBaseEntity* pOther)
pev->velocity = pev->velocity * 0.8;

pev->sequence = RANDOM_LONG(1, 1);
ResetSequenceInfo();
}
else
{
Expand Down Expand Up @@ -421,16 +422,17 @@ CGrenade* CGrenade::ShootTimed(entvars_t* pevOwner, Vector vecStart, Vector vecV
pGrenade->pev->velocity = Vector(0, 0, 0);
}

SET_MODEL(ENT(pGrenade->pev), "models/w_grenade.mdl");
pGrenade->pev->sequence = RANDOM_LONG(3, 6);
pGrenade->pev->framerate = 1.0;
pGrenade->ResetSequenceInfo();

// Tumble through the air
// pGrenade->pev->avelocity.x = -400;

pGrenade->pev->gravity = 0.5;
pGrenade->pev->friction = 0.8;

SET_MODEL(ENT(pGrenade->pev), "models/w_grenade.mdl");
pGrenade->pev->dmg = 100;

return pGrenade;
Expand Down

0 comments on commit 2ee36b4

Please sign in to comment.