Dateien nach "/" hochladen
This commit is contained in:
4
ai.lua
4
ai.lua
@@ -113,11 +113,11 @@ local function try_fire(self_ent, target_pos)
|
||||
local cd = weapon == "plasma" and SHOOT_COOLDOWN_PLASMA or SHOOT_COOLDOWN_BULLET
|
||||
if (now - (self_ent._ai_last_shot or 0)) < cd then return false end
|
||||
|
||||
-- Spider-Ammo pruefen
|
||||
-- Spider ammo check
|
||||
if weapon == "plasma" then
|
||||
local ammo = self_ent._spider_ammo or SPIDER_AMMO_MAX
|
||||
if ammo < SPIDER_AMMO_MIN_TO_FIRE then return false end
|
||||
-- Ammo verbrauchen
|
||||
-- Consume ammo
|
||||
self_ent._spider_ammo = math.max(0, ammo - SPIDER_AMMO_COST)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user