Fix bug determining max radius of convex polys, fixes bugs in room positioning
This commit is contained in:
@@ -16,13 +16,16 @@ startReloadingWeapon cr = (creatures . ix (_crID cr) . crInv . ix (_crInvSel cr)
|
||||
|
||||
icTryStartReloading :: Item -> Maybe Item
|
||||
icTryStartReloading it = do
|
||||
am <- it ^? itConsumption
|
||||
amloaded <- am ^? ammoLoaded
|
||||
ammax <- am ^? ammoBaseMax
|
||||
rstate <- am ^? reloadState
|
||||
am <- it ^? itConsumption
|
||||
amloaded <- am ^? ammoLoaded
|
||||
ammax <- am ^? ammoBaseMax
|
||||
rstate <- am ^? reloadState
|
||||
if amloaded < ammax && rstate == Nothing'
|
||||
then Just $ it & itConsumption . reloadState .~ Just' (_reloadTime am)
|
||||
& if _reloadType am == ActiveClear then itConsumption . ammoLoaded .~ 0 else id
|
||||
then Just $ it
|
||||
& itConsumption . reloadState .~ Just' (_reloadTime am)
|
||||
& if _reloadType am == ActiveClear
|
||||
then itConsumption . ammoLoaded .~ 0
|
||||
else id
|
||||
else Nothing
|
||||
|
||||
crStopReloading :: Creature -> Creature
|
||||
|
||||
Reference in New Issue
Block a user