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:
Michael Fabian 'Xaymar' Dirks
2018-08-07 02:38:39 +02:00
parent 69d22a0a20
commit c56d0cee3e
@@ -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