Separate out concrete part of world
This commit is contained in:
@@ -92,7 +92,7 @@ chooseMovementSpreadGun cr w
|
||||
where
|
||||
d = dist cpos p
|
||||
cpos = _crPos cr
|
||||
tcr = _creatures w IM.! 0
|
||||
tcr = _creatures (_cWorld w) IM.! 0
|
||||
p = _crPos tcr
|
||||
|
||||
chooseMovementLtAuto :: Creature -> World -> Action
|
||||
@@ -105,7 +105,7 @@ chooseMovementLtAuto cr w
|
||||
= DoImpulses [UseItem,TurnToward p' 0.05, Move (V2 0 3)]
|
||||
where
|
||||
cpos = _crPos cr
|
||||
tcr = _creatures w IM.! 0
|
||||
tcr = _creatures (_cWorld w) IM.! 0
|
||||
p = _crPos tcr
|
||||
v = vNormal $ p -.- cpos
|
||||
p' = p +.+ 0.5 *.* (v -.- 20 *.* normalizeV v)
|
||||
|
||||
Reference in New Issue
Block a user