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
|
class HLGameRules:CGameRules
|
||||||
{
|
{
|
||||||
virtual void(NSClientPlayer) PlayerConnect;
|
virtual void PlayerConnect(NSClientPlayer);
|
||||||
virtual void(NSClientPlayer) PlayerDisconnect;
|
virtual void PlayerDisconnect(NSClientPlayer);
|
||||||
virtual void(NSClientPlayer) PlayerKill;
|
virtual void PlayerKill(NSClientPlayer);
|
||||||
virtual void(NSClientPlayer) PlayerPostFrame;
|
virtual void PlayerPostFrame(NSClientPlayer);
|
||||||
|
|
||||||
virtual void(NSClientPlayer) LevelDecodeParms;
|
virtual void LevelDecodeParms(NSClientPlayer);
|
||||||
virtual void(NSClientPlayer) LevelChangeParms;
|
virtual void LevelChangeParms(NSClientPlayer);
|
||||||
virtual void(void) LevelNewParms;
|
virtual void LevelNewParms(void);
|
||||||
|
|
||||||
|
virtual bool IsMultiplayer(void);
|
||||||
|
|
||||||
virtual bool(void) IsMultiplayer;
|
|
||||||
virtual bool ImpulseCommand(NSClient, float);
|
virtual bool ImpulseCommand(NSClient, float);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -57,4 +58,5 @@ class HLMultiplayerRules:HLGameRules
|
||||||
virtual bool(void) IsMultiplayer;
|
virtual bool(void) IsMultiplayer;
|
||||||
virtual bool(void) IsTeamplay;
|
virtual bool(void) IsTeamplay;
|
||||||
virtual void(void) InitPostEnts;
|
virtual void(void) InitPostEnts;
|
||||||
|
virtual bool PlayerRequestRespawn(NSClientPlayer);
|
||||||
};
|
};
|
||||||
|
|
|
@ -23,6 +23,17 @@ HLMultiplayerRules::IsMultiplayer(void)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
HLMultiplayerRules::PlayerRequestRespawn(NSClientPlayer bp)
|
||||||
|
{
|
||||||
|
if (bp.TimeSinceDeath() > 0.5f) {
|
||||||
|
bp.ScheduleThink(PutClientInServer, 0.0f);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
HLMultiplayerRules::IsTeamplay(void)
|
HLMultiplayerRules::IsTeamplay(void)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue