From 83b321854665396f36f6f35b16bac26a617d310f Mon Sep 17 00:00:00 2001 From: Sam V Date: Thu, 5 May 2022 14:28:36 +0200 Subject: [PATCH] Fix monster_tentacle missing spawnflag 64 (different model option) Resolves #65 --- dlls/tentacle.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/dlls/tentacle.cpp b/dlls/tentacle.cpp index c62f39d75..bc9765659 100644 --- a/dlls/tentacle.cpp +++ b/dlls/tentacle.cpp @@ -32,6 +32,8 @@ #define ACT_T_STRIKE 1030 #define ACT_T_REARIDLE 1040 +constexpr int SF_TENTACLE_USE_LOWER_MODEL = 1 << 6; + class CTentacle : public CBaseMonster { public: @@ -260,7 +262,15 @@ void CTentacle::Spawn() //Always interpolate tentacles since they don't actually move. m_EFlags |= EFLAG_SLERP; - SET_MODEL(ENT(pev), "models/tentacle2.mdl"); + if (pev->spawnflags & SF_TENTACLE_USE_LOWER_MODEL) + { + 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; @@ -298,6 +308,7 @@ void CTentacle::Spawn() void CTentacle::Precache() { PRECACHE_MODEL("models/tentacle2.mdl"); + PRECACHE_MODEL("models/tentacle3.mdl"); PRECACHE_SOUND("ambience/flies.wav"); PRECACHE_SOUND("ambience/squirm2.wav");