Browse Source

Make shock rifle use w_shock_rifle.mdl as W model, instead of w_shock.mdl. Add idle animation (#358)

opfor
Roman Chistokhodov 2 years ago committed by GitHub
parent
commit
06dbc02bc1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      dlls/gearbox/shockrifle.cpp

8
dlls/gearbox/shockrifle.cpp

@ -40,19 +40,23 @@ void CShockrifle::Spawn()
{ {
Precache(); Precache();
m_iId = WEAPON_SHOCKRIFLE; m_iId = WEAPON_SHOCKRIFLE;
SET_MODEL(ENT(pev), "models/w_shock.mdl"); SET_MODEL(ENT(pev), "models/w_shock_rifle.mdl");
m_iDefaultAmmo = SHOCKRIFLE_DEFAULT_GIVE; m_iDefaultAmmo = SHOCKRIFLE_DEFAULT_GIVE;
m_iFirePhase = 0; m_iFirePhase = 0;
FallInit();// get ready to fall down. FallInit();// get ready to fall down.
pev->sequence = 0;
pev->animtime = gpGlobals->time;
pev->framerate = 1.0f;
} }
void CShockrifle::Precache(void) void CShockrifle::Precache(void)
{ {
PRECACHE_MODEL("models/v_shock.mdl"); PRECACHE_MODEL("models/v_shock.mdl");
PRECACHE_MODEL("models/w_shock.mdl"); PRECACHE_MODEL("models/w_shock_rifle.mdl");
PRECACHE_MODEL("models/p_shock.mdl"); PRECACHE_MODEL("models/p_shock.mdl");
PRECACHE_SOUND("weapons/shock_discharge.wav"); PRECACHE_SOUND("weapons/shock_discharge.wav");

Loading…
Cancel
Save