HLMultiplayerRules: add PlayerRequestSpawn method override
This commit is contained in:
parent
70167ed233
commit
bef240a1de
2 changed files with 21 additions and 8 deletions
|
@ -16,16 +16,17 @@
|
|||
|
||||
class HLGameRules:CGameRules
|
||||
{
|
||||
virtual void(NSClientPlayer) PlayerConnect;
|
||||
virtual void(NSClientPlayer) PlayerDisconnect;
|
||||
virtual void(NSClientPlayer) PlayerKill;
|
||||
virtual void(NSClientPlayer) PlayerPostFrame;
|
||||
virtual void PlayerConnect(NSClientPlayer);
|
||||
virtual void PlayerDisconnect(NSClientPlayer);
|
||||
virtual void PlayerKill(NSClientPlayer);
|
||||
virtual void PlayerPostFrame(NSClientPlayer);
|
||||
|
||||
virtual void(NSClientPlayer) LevelDecodeParms;
|
||||
virtual void(NSClientPlayer) LevelChangeParms;
|
||||
virtual void(void) LevelNewParms;
|
||||
virtual void LevelDecodeParms(NSClientPlayer);
|
||||
virtual void LevelChangeParms(NSClientPlayer);
|
||||
virtual void LevelNewParms(void);
|
||||
|
||||
virtual bool IsMultiplayer(void);
|
||||
|
||||
virtual bool(void) IsMultiplayer;
|
||||
virtual bool ImpulseCommand(NSClient, float);
|
||||
};
|
||||
|
||||
|
@ -57,4 +58,5 @@ class HLMultiplayerRules:HLGameRules
|
|||
virtual bool(void) IsMultiplayer;
|
||||
virtual bool(void) IsTeamplay;
|
||||
virtual void(void) InitPostEnts;
|
||||
virtual bool PlayerRequestRespawn(NSClientPlayer);
|
||||
};
|
||||
|
|
|
@ -23,6 +23,17 @@ HLMultiplayerRules::IsMultiplayer(void)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
HLMultiplayerRules::PlayerRequestRespawn(NSClientPlayer bp)
|
||||
{
|
||||
if (bp.TimeSinceDeath() > 0.5f) {
|
||||
bp.ScheduleThink(PutClientInServer, 0.0f);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool
|
||||
HLMultiplayerRules::IsTeamplay(void)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue