Skip to content

Commit

Permalink
Fix monster_tentacle missing spawnflag 64 (different model option)
Browse files Browse the repository at this point in the history
Resolves #65
  • Loading branch information
SamVanheer committed May 5, 2022
1 parent f632800 commit 83b3218
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion dlls/tentacle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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");
Expand Down

0 comments on commit 83b3218

Please sign in to comment.