gamemode: Implement Alive() function in player classes

This allows checking if the player is actually alive according to the current player class. Some classes are alive to the game, but not to the actual game mode, for example Spectators are alive, but not really.
This commit is contained in:
Michael Fabian 'Xaymar' Dirks
2017-11-26 12:40:28 +01:00
parent be456dc323
commit 7349a96603
3 changed files with 7 additions and 0 deletions
@@ -126,6 +126,7 @@ function CLASS:ShowSpare2() end
function CLASS:PostThink() end
function CLASS:Tick(mv) end
function CLASS:FindUseEntity(defEnt) return defEnt end
function CLASS:Alive() return false end
-- ------------------------------------------------------------------------- --
--! Client-Side
@@ -206,6 +206,7 @@ if SERVER then
end
end
end
function CLASS:Alive() return true end
-- ------------------------------------------------------------------------- --
--! Client-Side
@@ -205,6 +205,11 @@ function CLASS:ShowSpare1()
if GAMEMODE.Config:DebugLog() then print("Prop Hunt: Seeker '"..self.Player:GetName().."' (SteamID: "..self.Player:SteamID()..") taunted with sound '"..tauntList[index].."'.") end
end
-- ------------------------------------------------------------------------- --
--! Shared
-- ------------------------------------------------------------------------- --
function CLASS:Alive() return true end
-- ------------------------------------------------------------------------- --
--! Client-Side
-- ------------------------------------------------------------------------- --