fixing range limit of interaction

This commit is contained in:
nek0 2018-08-07 14:05:08 +02:00
parent 1a058d5c2f
commit a0f198a18d

View file

@ -265,7 +265,7 @@ playerInteract (MsgMouseButton _ _ SDL.Pressed _ SDL.ButtonRight _ m) = do
ent <- queryEnt ent <- queryEnt
if (fmap floor ppos == fmap floor pos' || if (fmap floor ppos == fmap floor pos' ||
fmap floor ppos == fmap floor pos' + rel) && fmap floor ppos == fmap floor pos' + rel) &&
fmap floor ppos + fmap floor (V2 dr dc) == fmap floor pos' && fmap floor (ppos + V2 dr dc) == fmap floor pos' &&
pdir == dir pdir == dir
then return $ Just (otype, ent) then return $ Just (otype, ent)
else return Nothing else return Nothing