Skip to content

Commit

Permalink
Only spawn all monsters if co-op is on
Browse files Browse the repository at this point in the history
  • Loading branch information
sabianroberts committed Oct 25, 2024
1 parent d6313c5 commit 17da039
Show file tree
Hide file tree
Showing 18 changed files with 180 additions and 0 deletions.
10 changes: 10 additions & 0 deletions binary/dlls/apache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,16 @@ IMPLEMENT_SAVERESTORE( CApache, CBaseMonster );

void CApache :: Spawn( void )
{
// Only spawn if coopmode is enabled
if (CVAR_GET_FLOAT("sv_aura_coop") == 1)
{
CBaseMonster::Spawn(); // Proceed with spawning if coopmode is on
}
else
{
// Optionally, log or remove entity if coopmode is off
UTIL_Remove(this);
}
Precache( );
// motor
pev->movetype = MOVETYPE_FLY;
Expand Down
10 changes: 10 additions & 0 deletions binary/dlls/barnacle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,16 @@ void CBarnacle :: HandleAnimEvent( MonsterEvent_t *pEvent )
//=========================================================
void CBarnacle :: Spawn()
{
// Only spawn if coopmode is enabled
if (CVAR_GET_FLOAT("sv_aura_coop") == 1)
{
CBaseMonster::Spawn(); // Proceed with spawning if coopmode is on
}
else
{
// Optionally, log or remove entity if coopmode is off
UTIL_Remove(this);
}
Precache( );

SET_MODEL(ENT(pev), "models/barnacle.mdl");
Expand Down
10 changes: 10 additions & 0 deletions binary/dlls/bigmomma.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -657,6 +657,16 @@ void CBigMomma::LaunchMortar( void )
//=========================================================
void CBigMomma :: Spawn()
{
// Only spawn if coopmode is enabled
if (CVAR_GET_FLOAT("sv_aura_coop") == 1)
{
CBaseMonster::Spawn(); // Proceed with spawning if coopmode is on
}
else
{
// Optionally, log or remove entity if coopmode is off
UTIL_Remove(this);
}
Precache( );

SET_MODEL(ENT(pev), "models/big_mom.mdl");
Expand Down
10 changes: 10 additions & 0 deletions binary/dlls/bullsquid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -668,6 +668,16 @@ void CBullsquid :: HandleAnimEvent( MonsterEvent_t *pEvent )
//=========================================================
void CBullsquid :: Spawn()
{
// Only spawn if coopmode is enabled
if (CVAR_GET_FLOAT("sv_aura_coop") == 1)
{
CBaseMonster::Spawn(); // Proceed with spawning if coopmode is on
}
else
{
// Optionally, log or remove entity if coopmode is off
UTIL_Remove(this);
}
Precache( );

SET_MODEL(ENT(pev), "models/bullsquid.mdl");
Expand Down
10 changes: 10 additions & 0 deletions binary/dlls/controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,16 @@ void CController :: HandleAnimEvent( MonsterEvent_t *pEvent )
//=========================================================
void CController :: Spawn()
{
// Only spawn if coopmode is enabled
if (CVAR_GET_FLOAT("sv_aura_coop") == 1)
{
CBaseMonster::Spawn(); // Proceed with spawning if coopmode is on
}
else
{
// Optionally, log or remove entity if coopmode is off
UTIL_Remove(this);
}
Precache( );

SET_MODEL(ENT(pev), "models/controller.mdl");
Expand Down
10 changes: 10 additions & 0 deletions binary/dlls/gargantua.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -749,6 +749,16 @@ void CGargantua :: SetYawSpeed ( void )
//=========================================================
void CGargantua :: Spawn()
{
// Only spawn if coopmode is enabled
if (CVAR_GET_FLOAT("sv_aura_coop") == 1)
{
CBaseMonster::Spawn(); // Proceed with spawning if coopmode is on
}
else
{
// Optionally, log or remove entity if coopmode is off
UTIL_Remove(this);
}
Precache( );

SET_MODEL(ENT(pev), "models/garg.mdl");
Expand Down
10 changes: 10 additions & 0 deletions binary/dlls/hassassin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,16 @@ void CHAssassin :: HandleAnimEvent( MonsterEvent_t *pEvent )
//=========================================================
void CHAssassin :: Spawn()
{
// Only spawn if coopmode is enabled
if (CVAR_GET_FLOAT("sv_aura_coop") == 1)
{
CBaseMonster::Spawn(); // Proceed with spawning if coopmode is on
}
else
{
// Optionally, log or remove entity if coopmode is off
UTIL_Remove(this);
}
Precache( );

SET_MODEL(ENT(pev), "models/hassassin.mdl");
Expand Down
10 changes: 10 additions & 0 deletions binary/dlls/headcrab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,16 @@ void CHeadCrab :: HandleAnimEvent( MonsterEvent_t *pEvent )
//=========================================================
void CHeadCrab :: Spawn()
{
// Only spawn if coopmode is enabled
if (CVAR_GET_FLOAT("sv_aura_coop") == 1)
{
CBaseMonster::Spawn(); // Proceed with spawning if coopmode is on
}
else
{
// Optionally, log or remove entity if coopmode is off
UTIL_Remove(this);
}
Precache( );

SET_MODEL(ENT(pev), "models/headcrab.mdl");
Expand Down
10 changes: 10 additions & 0 deletions binary/dlls/hgrunt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -978,6 +978,16 @@ void CHGrunt :: HandleAnimEvent( MonsterEvent_t *pEvent )
//=========================================================
void CHGrunt :: Spawn()
{
// Only spawn if coopmode is enabled
if (CVAR_GET_FLOAT("sv_aura_coop") == 1)
{
CBaseMonster::Spawn(); // Proceed with spawning if coopmode is on
}
else
{
// Optionally, log or remove entity if coopmode is off
UTIL_Remove(this);
}
Precache( );

SET_MODEL(ENT(pev), "models/hgrunt.mdl");
Expand Down
10 changes: 10 additions & 0 deletions binary/dlls/houndeye.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,16 @@ void CHoundeye :: HandleAnimEvent( MonsterEvent_t *pEvent )
//=========================================================
void CHoundeye :: Spawn()
{
// Only spawn if coopmode is enabled
if (CVAR_GET_FLOAT("sv_aura_coop") == 1)
{
CBaseMonster::Spawn(); // Proceed with spawning if coopmode is on
}
else
{
// Optionally, log or remove entity if coopmode is off
UTIL_Remove(this);
}
Precache( );

SET_MODEL(ENT(pev), "models/houndeye.mdl");
Expand Down
10 changes: 10 additions & 0 deletions binary/dlls/ichthyosaur.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,16 @@ void CIchthyosaur :: HandleAnimEvent( MonsterEvent_t *pEvent )
//=========================================================
void CIchthyosaur :: Spawn()
{
// Only spawn if coopmode is enabled
if (CVAR_GET_FLOAT("sv_aura_coop") == 1)
{
CBaseMonster::Spawn(); // Proceed with spawning if coopmode is on
}
else
{
// Optionally, log or remove entity if coopmode is off
UTIL_Remove(this);
}
Precache( );

SET_MODEL(ENT(pev), "models/icky.mdl");
Expand Down
10 changes: 10 additions & 0 deletions binary/dlls/islave.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,16 @@ void CISlave :: StartTask ( Task_t *pTask )
//=========================================================
void CISlave :: Spawn()
{
// Only spawn if coopmode is enabled
if (CVAR_GET_FLOAT("sv_aura_coop") == 1)
{
CBaseMonster::Spawn(); // Proceed with spawning if coopmode is on
}
else
{
// Optionally, log or remove entity if coopmode is off
UTIL_Remove(this);
}
Precache( );

SET_MODEL(ENT(pev), "models/islave.mdl");
Expand Down
10 changes: 10 additions & 0 deletions binary/dlls/nihilanth.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,16 @@ const char *CNihilanth::pDeathSounds[] =

void CNihilanth :: Spawn( void )
{
// Only spawn if coopmode is enabled
if (CVAR_GET_FLOAT("sv_aura_coop") == 1)
{
CBaseMonster::Spawn(); // Proceed with spawning if coopmode is on
}
else
{
// Optionally, log or remove entity if coopmode is off
UTIL_Remove(this);
}
Precache( );
// motor
pev->movetype = MOVETYPE_FLY;
Expand Down
10 changes: 10 additions & 0 deletions binary/dlls/osprey.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,16 @@ IMPLEMENT_SAVERESTORE( COsprey, CBaseMonster );

void COsprey :: Spawn( void )
{
// Only spawn if coopmode is enabled
if (CVAR_GET_FLOAT("sv_aura_coop") == 1)
{
CBaseMonster::Spawn(); // Proceed with spawning if coopmode is on
}
else
{
// Optionally, log or remove entity if coopmode is off
UTIL_Remove(this);
}
Precache( );
// motor
pev->movetype = MOVETYPE_FLY;
Expand Down
10 changes: 10 additions & 0 deletions binary/dlls/tentacle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,16 @@ int CTentacle :: Classify ( void )
//
void CTentacle :: Spawn( )
{
// Only spawn if coopmode is enabled
if (CVAR_GET_FLOAT("sv_aura_coop") == 1)
{
CBaseMonster::Spawn(); // Proceed with spawning if coopmode is on
}
else
{
// Optionally, log or remove entity if coopmode is off
UTIL_Remove(this);
}
Precache( );

pev->solid = SOLID_BBOX;
Expand Down
10 changes: 10 additions & 0 deletions binary/dlls/turret.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,16 @@ void CBaseTurret::KeyValue( KeyValueData *pkvd )

void CBaseTurret::Spawn()
{
// Only spawn if coopmode is enabled
if (CVAR_GET_FLOAT("sv_aura_coop") == 1)
{
CBaseMonster::Spawn(); // Proceed with spawning if coopmode is on
}
else
{
// Optionally, log or remove entity if coopmode is off
UTIL_Remove(this);
}
Precache( );
pev->nextthink = gpGlobals->time + 1;
pev->movetype = MOVETYPE_FLY;
Expand Down
10 changes: 10 additions & 0 deletions binary/dlls/zamn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,16 @@ void CZamnZombie::HandleAnimEvent(MonsterEvent_t* pEvent)
//=========================================================
void CZamnZombie::Spawn()
{
// Only spawn if coopmode is enabled
if (CVAR_GET_FLOAT("sv_aura_coop") == 1)
{
CBaseMonster::Spawn(); // Proceed with spawning if coopmode is on
}
else
{
// Optionally, log or remove entity if coopmode is off
UTIL_Remove(this);
}
Precache();

SET_MODEL(ENT(pev), "models/zamnzombie.mdl");
Expand Down
10 changes: 10 additions & 0 deletions binary/dlls/zombie.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,16 @@ void CZombie :: HandleAnimEvent( MonsterEvent_t *pEvent )
//=========================================================
void CZombie :: Spawn()
{
// Only spawn if coopmode is enabled
if (CVAR_GET_FLOAT("sv_aura_coop") == 1)
{
CBaseMonster::Spawn(); // Proceed with spawning if coopmode is on
}
else
{
// Optionally, log or remove entity if coopmode is off
UTIL_Remove(this);
}
Precache( );

SET_MODEL(ENT(pev), "models/zombie.mdl");
Expand Down

0 comments on commit 17da039

Please sign in to comment.