From b79786505a17e78a7174ceddd5de2765d1d104c9 Mon Sep 17 00:00:00 2001 From: Roman Chistokhodov Date: Tue, 4 Oct 2022 02:25:59 +0300 Subject: [PATCH] Implement spawnflag 64 for monster_tentacle (#336) --- dlls/tentacle.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/dlls/tentacle.cpp b/dlls/tentacle.cpp index d6ef379b..107f612f 100644 --- a/dlls/tentacle.cpp +++ b/dlls/tentacle.cpp @@ -32,6 +32,8 @@ #define ACT_T_STRIKE 1030 #define ACT_T_REARIDLE 1040 +#define SF_TENTACLE_USE_TENTACLE3 64 + class CTentacle : public CBaseMonster { public: @@ -251,7 +253,10 @@ void CTentacle::Spawn() pev->health = 75; pev->sequence = 0; - SET_MODEL( ENT( pev ), "models/tentacle2.mdl" ); + if (FBitSet(pev->spawnflags, SF_TENTACLE_USE_TENTACLE3)) + SET_MODEL( ENT( pev ), "models/tentacle3.mdl" ); + else + SET_MODEL( ENT( pev ), "models/tentacle2.mdl" ); UTIL_SetSize( pev, Vector( -32, -32, 0 ), Vector( 32, 32, 64 ) ); pev->takedamage = DAMAGE_AIM; @@ -288,7 +293,10 @@ void CTentacle::Spawn() void CTentacle::Precache() { - PRECACHE_MODEL( "models/tentacle2.mdl" ); + if (FBitSet(pev->spawnflags, SF_TENTACLE_USE_TENTACLE3)) + PRECACHE_MODEL( "models/tentacle3.mdl" ); + else + PRECACHE_MODEL( "models/tentacle2.mdl" ); PRECACHE_SOUND( "ambience/flies.wav" ); PRECACHE_SOUND( "ambience/squirm2.wav" );