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:
@@ -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
|
||||
-- ------------------------------------------------------------------------- --
|
||||
|
||||
Reference in New Issue
Block a user