CBaseMonster: Add MSF_MULTIPLAYER flag, so monsters can be made available in multiplayer on a per-class basis.
This commit is contained in:
parent
9cde95495d
commit
12c26958e1
2 changed files with 5 additions and 1 deletions
|
@ -47,7 +47,8 @@ enumflags
|
|||
MSF_RESERVED3,
|
||||
MSF_WAITFORSCRIPT,
|
||||
MSF_PREDISASTER,
|
||||
MSF_FADECORPSE
|
||||
MSF_FADECORPSE,
|
||||
MSF_MULTIPLAYER
|
||||
};
|
||||
|
||||
class CBaseMonster:CBaseEntity
|
||||
|
@ -419,6 +420,7 @@ void
|
|||
CBaseMonster::CBaseMonster(void)
|
||||
{
|
||||
/* FIXME: Put this somewhere else? */
|
||||
if (!(spawnflags & MSF_MULTIPLAYER))
|
||||
if (!(cvar("coop") == 1 || cvar("sv_playerslots") == 1)) {
|
||||
remove(this);
|
||||
return;
|
||||
|
|
|
@ -661,6 +661,8 @@ void monster_scientist::Respawn(void)
|
|||
|
||||
void monster_scientist::monster_scientist(void)
|
||||
{
|
||||
spawnflags |= MSF_MULTIPLAYER;
|
||||
|
||||
for (int i = 0; i < sci_sndpain.length; i++) {
|
||||
precache_sound(sci_sndpain[i]);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue