NSMonster: handle the check for MSF_MULTIPLAYER inside Spawned() instead of the constructor
This commit is contained in:
parent
0cd5d0e5a7
commit
29e7b84e4b
2 changed files with 15 additions and 6 deletions
|
@ -310,6 +310,7 @@ public:
|
|||
virtual float SendEntity(entity,float);
|
||||
virtual void Touch(entity);
|
||||
//virtual void Hide(void);
|
||||
virtual void Spawned(void);
|
||||
virtual void Respawn(void);
|
||||
virtual void Pain(void);
|
||||
virtual void Death(void);
|
||||
|
|
|
@ -21,12 +21,6 @@ void
|
|||
NSMonster::NSMonster(void)
|
||||
{
|
||||
#ifdef SERVER
|
||||
if (!HasSpawnFlags(MSF_MULTIPLAYER))
|
||||
if (g_grMode.MonstersSpawn() == FALSE) {
|
||||
remove(this);
|
||||
return;
|
||||
}
|
||||
|
||||
m_ssLast = __NULL__;
|
||||
oldnet_velocity = g_vec_null;
|
||||
m_flPitch = 1.0f;
|
||||
|
@ -1771,6 +1765,20 @@ NSMonster::Hide(void)
|
|||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
NSMonster::Spawned(void)
|
||||
{
|
||||
if (!HasSpawnFlags(MSF_MULTIPLAYER)) {
|
||||
if (g_grMode.MonstersSpawn() == FALSE) {
|
||||
ReleaseThink();
|
||||
Destroy();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
super::Spawned();
|
||||
}
|
||||
|
||||
void
|
||||
NSMonster::Respawn(void)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue