Server: Add support for game_playerspawn triggers. Basically upon any player spawning into the world, all entities named 'game_playerspawn' will be triggered with the player being set as the activator. Nifty
This commit is contained in:
parent
cdad44a79d
commit
7680521379
1 changed files with 10 additions and 0 deletions
|
@ -70,6 +70,16 @@ void PutClientInServer(void)
|
|||
|
||||
pl = (player)self;
|
||||
g_grMode.PlayerSpawn(pl);
|
||||
|
||||
/* activate all game_playerspawn entities */
|
||||
for (entity a = world; (a = findfloat(a, ::gflags, GF_CANRESPAWN));) {
|
||||
CBaseEntity ent = (CBaseEntity)a;
|
||||
|
||||
if (ent.m_strTargetName == "game_playerspawn") {
|
||||
CBaseTrigger t = (CBaseTrigger)a;
|
||||
t.Trigger(self, TRIG_TOGGLE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void PlayerPreThink(void)
|
||||
|
|
Loading…
Reference in a new issue