Fix bug when forming convex hull of game room bounds

This commit is contained in:
2021-09-30 23:46:59 +01:00
parent cb23960bd7
commit 1414d08d88
14 changed files with 51 additions and 16 deletions
+2 -2
View File
@@ -124,7 +124,7 @@ placeProp pr p a w = (i, w & props %~ addProp)
where
i = IM.newKey $ _props w
addProp prs = IM.insert i (f pr) prs
f = (pjRot +~ a) . (pjPos %~ ( (p +.+) . (rotateV a) )) . (pjID .~ i)
f = (pjRot +~ a) . (pjPos %~ ( (p +.+) . rotateV a )) . (pjID .~ i)
placeBt
:: Button
@@ -136,7 +136,7 @@ placeBt bt p a w = (i , over buttons addBT w)
where
i = IM.newKey $ _buttons w
addBT xs = IM.insert i (f bt) xs
f = (btRot +~ a) . (btPos %~ ( (p +.+) . (rotateV a) )) . (btID .~ i)
f = (btRot +~ a) . (btPos %~ ( (p +.+) . rotateV a )) . (btID .~ i)
--addBT bts = IM.insert (IM.newKey bts) (bt {_btPos = p, _btRot = rot, _btID = IM.newKey bts}) bts
{- Creates a floor item at a given point.
Assigns an id correctly. -}