Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if inst.components.combat then
- if self.defaultattackperiod == nil then
- if inst.components.combat.min_attack_period ~= nil then
- self.defaultattackperiod = inst.components.combat.min_attack_period
- else
- print("Time Control [API]: Attack Perioid adjustment failed, entity missing min_attack_period")
- end
- end
- local attackperiod = (self.defaultattackperiod / speed) or nil
- if speed == nil or speed == "reset" or speed == 1 then
- self.inst.components.combat:SetAttackPeriod(self.defaultattackperiod)
- elseif attackperiod ~= nil then
- self.inst.components.combat:SetAttackPeriod(attackperiod)
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment