From 06dbc02bc1397915e37c1209db84e5c2e5784e53 Mon Sep 17 00:00:00 2001 From: Roman Chistokhodov Date: Thu, 2 Mar 2023 17:09:33 +0300 Subject: [PATCH] Make shock rifle use w_shock_rifle.mdl as W model, instead of w_shock.mdl. Add idle animation (#358) --- dlls/gearbox/shockrifle.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/dlls/gearbox/shockrifle.cpp b/dlls/gearbox/shockrifle.cpp index 275b7a64..4de8c42f 100644 --- a/dlls/gearbox/shockrifle.cpp +++ b/dlls/gearbox/shockrifle.cpp @@ -40,19 +40,23 @@ void CShockrifle::Spawn() { Precache(); 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_iFirePhase = 0; FallInit();// get ready to fall down. + + pev->sequence = 0; + pev->animtime = gpGlobals->time; + pev->framerate = 1.0f; } void CShockrifle::Precache(void) { 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_SOUND("weapons/shock_discharge.wav");