Browse Source

Implement spawnflag 64 for monster_tentacle (#336)

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

8
dlls/tentacle.cpp

@ -32,6 +32,8 @@
#define ACT_T_STRIKE 1030 #define ACT_T_STRIKE 1030
#define ACT_T_REARIDLE 1040 #define ACT_T_REARIDLE 1040
#define SF_TENTACLE_USE_TENTACLE3 64
class CTentacle : public CBaseMonster class CTentacle : public CBaseMonster
{ {
public: public:
@ -251,6 +253,9 @@ void CTentacle::Spawn()
pev->health = 75; pev->health = 75;
pev->sequence = 0; pev->sequence = 0;
if (FBitSet(pev->spawnflags, SF_TENTACLE_USE_TENTACLE3))
SET_MODEL( ENT( pev ), "models/tentacle3.mdl" );
else
SET_MODEL( ENT( pev ), "models/tentacle2.mdl" ); SET_MODEL( ENT( pev ), "models/tentacle2.mdl" );
UTIL_SetSize( pev, Vector( -32, -32, 0 ), Vector( 32, 32, 64 ) ); UTIL_SetSize( pev, Vector( -32, -32, 0 ), Vector( 32, 32, 64 ) );
@ -288,6 +293,9 @@ void CTentacle::Spawn()
void CTentacle::Precache() void CTentacle::Precache()
{ {
if (FBitSet(pev->spawnflags, SF_TENTACLE_USE_TENTACLE3))
PRECACHE_MODEL( "models/tentacle3.mdl" );
else
PRECACHE_MODEL( "models/tentacle2.mdl" ); PRECACHE_MODEL( "models/tentacle2.mdl" );
PRECACHE_SOUND( "ambience/flies.wav" ); PRECACHE_SOUND( "ambience/flies.wav" );

Loading…
Cancel
Save