Generalise pathing, usable with flying creatures
This commit is contained in:
@@ -56,7 +56,11 @@ updateLivingCreature cr =
|
||||
ChaseCrit{} -> \w ->
|
||||
crUpdate cid . performActions cid $
|
||||
over (cWorld . lWorld . creatures . ix cid) (chaseCritInternal w) w
|
||||
_ -> crUpdate cid
|
||||
AutoCrit {} -> crUpdate cid
|
||||
SwarmCrit {} -> crUpdate cid
|
||||
HoverCrit {} -> \w ->
|
||||
crUpdate cid . performActions cid $
|
||||
over (cWorld . lWorld . creatures . ix cid) (hoverCritInternal w) w
|
||||
where
|
||||
cid = cr ^. crID
|
||||
|
||||
@@ -135,6 +139,7 @@ dropAll cr w = foldl' (flip (dropItem cr)) w . reverse . IM.keys . _unNIntMap $
|
||||
|
||||
chasmTestLiving :: Creature -> World -> World
|
||||
chasmTestLiving cr w
|
||||
| Flying {} <- cr ^. crStance . carriage = w
|
||||
| Falling {} <- cr ^. crStance . carriage =
|
||||
w
|
||||
& tocr . crZVel -~ 0.5
|
||||
|
||||
Reference in New Issue
Block a user