Gamerules: ifdef the VALVE specific bits.

This commit is contained in:
Marco Cawthorne 2021-08-01 11:21:58 +02:00
parent c45b7e2b62
commit 5d44660dfa

View file

@ -67,7 +67,12 @@ HLMultiplayerRules::PlayerDeath(base_player pl)
IntermissionStart(); IntermissionStart();
} }
#ifdef VALVE
/* explode all satchels */
s_satchel_detonate((entity)pl);
/* drop their posessions into a weaponbox item */
weaponbox_spawn((player)pl); weaponbox_spawn((player)pl);
#endif
/* either gib, or make a corpse */ /* either gib, or make a corpse */
if (pl.health < -50) { if (pl.health < -50) {
@ -98,9 +103,6 @@ HLMultiplayerRules::PlayerDeath(base_player pl)
Sound_Play(pl, CHAN_AUTO, "player.die"); Sound_Play(pl, CHAN_AUTO, "player.die");
/* explode all satchels */
s_satchel_detonate((entity)pl);
/* force respawn */ /* force respawn */
pl.think = PutClientInServer; pl.think = PutClientInServer;
pl.nextthink = time + 4.0f; pl.nextthink = time + 4.0f;
@ -147,10 +149,13 @@ HLMultiplayerRules::PlayerSpawn(base_player pp)
LevelNewParms(); LevelNewParms();
LevelDecodeParms(pl); LevelDecodeParms(pl);
#if defined (VALVE) || defined (GEARBOX)
pl.g_items = ITEM_CROWBAR | ITEM_GLOCK | ITEM_SUIT; pl.g_items = ITEM_CROWBAR | ITEM_GLOCK | ITEM_SUIT;
pl.activeweapon = WEAPON_GLOCK; pl.activeweapon = WEAPON_GLOCK;
pl.glock_mag = 18; pl.glock_mag = 18;
pl.ammo_9mm = 44; pl.ammo_9mm = 44;
#endif
spot = Spawn_SelectRandom("info_player_deathmatch"); spot = Spawn_SelectRandom("info_player_deathmatch");
setorigin(pl, spot.origin); setorigin(pl, spot.origin);