Cleanup, trying to diagnose space leak in crit update
This commit is contained in:
@@ -11,19 +11,19 @@ import Control.Lens
|
||||
import qualified SDL
|
||||
import qualified Data.Set as S
|
||||
import qualified Data.IntMap.Strict as IM
|
||||
import Data.Monoid
|
||||
import Data.Maybe
|
||||
{- | The AI equivalent for your control. -}
|
||||
yourControl
|
||||
:: Creature
|
||||
-> World
|
||||
-> (Endo World, Maybe Creature)
|
||||
-> (World -> World, Maybe Creature)
|
||||
yourControl cr w =
|
||||
( Endo updateUsingInput
|
||||
( updateUsingInput
|
||||
, Just . mouseActionsCr (_mouseButtons w) $ wasdWithAiming w speed 0 cr
|
||||
)
|
||||
where
|
||||
speed = _mvSpeed $ _crMvType cr
|
||||
|
||||
{- | Turn key presses into creature movement. -}
|
||||
wasdWithAiming
|
||||
:: World
|
||||
|
||||
Reference in New Issue
Block a user