Separate out concrete part of world
This commit is contained in:
@@ -91,7 +91,7 @@ chaseCritAwarenessUpdate w cr = case _cpAttention $ _crPerception cr of
|
||||
in crActionPlan . apStrategy .~ StrategyActions WarningCry
|
||||
[ImpulsesList ([Bark soundid]: replicate numjits [RandomImpulse thejitter]++
|
||||
[[ChangeStrategy $ CloseToMelee 0] ])
|
||||
, AimAt 0 (_crPos $ _creatures w IM.! 0)
|
||||
, AimAt 0 (_crPos $ _creatures (_cWorld w) IM.! 0)
|
||||
]
|
||||
| otherwise = id
|
||||
|
||||
@@ -139,7 +139,7 @@ newExtraAwareness cr w cid
|
||||
| otherwise = Just . Suspicious $ doFloatFloat (_viFOV vi) ang * doFloatFloat (_viDist vi) d * awakeLevelPerception cr
|
||||
where
|
||||
vi = _cpVision $ _crPerception cr
|
||||
tpos = _crPos $ _creatures w IM.! cid
|
||||
tpos = _crPos $ _creatures (_cWorld w) IM.! cid
|
||||
cpos = _crPos cr
|
||||
ang = angleVV (unitVectorAtAngle (_crDir cr)) (tpos - cpos)
|
||||
d = dist tpos cpos
|
||||
|
||||
Reference in New Issue
Block a user