Add file, fix lamp doDamage space leak

This commit is contained in:
2021-05-12 20:48:55 +02:00
parent ead87af3c1
commit 9b3fbba393
13 changed files with 165 additions and 226 deletions
+2 -2
View File
@@ -39,7 +39,7 @@ colCrWall w c
-- -- probably best to push check pushing through walls before creature springs
-- the amount to push creatures out from walls, extra to their radius
wallBuffer = 3
wallBuffer = 0
-- the following tests whether or not a point is on a wall, and if so pushes it
-- out from the wall
@@ -49,7 +49,7 @@ collideWalls rad cp1 walls cp2 = case (listToMaybe.mapMaybe (pushOutFromWall rad
Nothing -> cp2
Just cp3 -> case (listToMaybe.reverse.mapMaybe (pushOutFromWall rad cp3)) walls of
Nothing -> cp3
Just cp4 -> cp1
Just cp4 -> 0.5 *.* (cp4 +.+ cp1)
-- pushes a point out from a list of walls
-- if multiple new points occur, chooses the one closest to the orignal point