gamemode/player_class/class_default: Ignore players and increase use time
Players should be ignored for use commands, since it does not actually change things. Also increase the abuse cooldown to 0.5 seconds for non-blacklisted items.
This commit is contained in:
@@ -91,14 +91,14 @@ function CLASS:SetModel() BaseClass.SetModel( self ) end
|
||||
-- Interaction
|
||||
function CLASS:Use(ent)
|
||||
-- Entity must be valid and not a player.
|
||||
if (!ent) || (!ent:IsValid()) || (ent:IsPlayer()) then
|
||||
if (!ent || !ent:IsValid()) then
|
||||
return false
|
||||
end
|
||||
|
||||
-- Cool Down
|
||||
if (self.Player.Data.UseTime) then
|
||||
local timeSinceUse = (CurTime() - self.Player.Data.UseTime)
|
||||
if (0.2 > timeSinceUse) then
|
||||
if (0.5 > timeSinceUse) then
|
||||
return false
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user