Skip to content

Commit

Permalink
finally fixed the stupid bug
Browse files Browse the repository at this point in the history
  • Loading branch information
sayterdarkwynd committed Jan 12, 2020
1 parent 25bdc10 commit dca9f95
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
3 changes: 0 additions & 3 deletions items/active/weapons/ranged/gunfire.lua
Original file line number Diff line number Diff line change
Expand Up @@ -316,9 +316,6 @@ function GunFire:uninit()
self.helper:clearPersistent()
end
status.clearPersistentEffects("weaponBonus") --clear bonuses
if (self.isAmmoBased == 1) then
world.sendEntityMessage(self.playerId,"removeBar","ammoBar") --clear ammo bar
end
end

function GunFire:isResetting()
Expand Down
5 changes: 1 addition & 4 deletions items/active/weapons/ranged/gunfirefixed.lua
Original file line number Diff line number Diff line change
Expand Up @@ -370,10 +370,7 @@ function GunFireFixed:damagePerShot()
end

function GunFireFixed:uninit()
status.clearPersistentEffects("weaponBonus")
if (self.isAmmoBased == 1) then
world.sendEntityMessage(self.playerId,"removeBar","ammoBar") --clear ammo bar
end
status.clearPersistentEffects("weaponBonus")
end

function GunFireFixed:isResetting()
Expand Down
13 changes: 12 additions & 1 deletion stats/player_primary_bars.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,20 @@ function init()
if not l then return end
removeBar(barName)
end)


self.timerRemoveAmmoBar = 0
end

function update(dt)
if self.timerRemoveAmmoBar > 10 then
world.sendEntityMessage(entity.id(),"removeBar","ammoBar") --clear ammo bar
self.timerRemoveAmmoBar = 0
else
self.timerRemoveAmmoBar = self.timerRemoveAmmoBar + dt
end
end


function overheadBars()

local bars = {}
Expand Down

0 comments on commit dca9f95

Please sign in to comment.