Make light position uniform 3d

This commit is contained in:
2021-06-25 01:19:20 +02:00
parent b451953b99
commit b6feccd934
10 changed files with 40 additions and 71 deletions
+2 -1
View File
@@ -55,9 +55,10 @@ updateLamp i = unrandUpdate handleLS internalUpdate
handleLS cr w
| _crHP cr < 0 = explosionFlashAt cPos
$ mkSoundBreakGlass cPos w & lightSources %~ IM.delete i
| otherwise = w & lightSources . ix i . lsPos .~ cPos
| otherwise = w & lightSources . ix i . lsPos .~ f cPos
where
cPos = _crPos cr
f (x,y) = (x,y,0)
internalUpdate cr
| _crHP cr < 0 = Nothing
| otherwise = Just $ doDamage cr