diff options
author | Matthias Schiffer <matthias@gamezock.de> | 2010-02-25 04:38:14 +0100 |
---|---|---|
committer | Matthias Schiffer <matthias@gamezock.de> | 2010-02-25 04:38:14 +0100 |
commit | b4f295da9183d442b87396f07284b7624b90892e (patch) | |
tree | 4136ca52ff61d23eb97962fc91f73472f0bcde33 /HTanks.hs | |
parent | 656b5e8bc14b7abda8a836f8eeb3b0a972f0484a (diff) | |
download | htanks-b4f295da9183d442b87396f07284b7624b90892e.tar htanks-b4f295da9183d442b87396f07284b7624b90892e.zip |
Added tank texture and turn to drive direction
Diffstat (limited to 'HTanks.hs')
-rw-r--r-- | HTanks.hs | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -97,7 +97,7 @@ simulationStep = do let dx = (speed oldtank) * fromRational (round (x*1000/length)%1000000) dy = (speed oldtank) * fromRational (round (y*1000/length)%1000000) - let tank = oldtank {posx = dx + posx oldtank, posy = dy + posy oldtank} + let tank = oldtank {posx = dx + posx oldtank, posy = dy + posy oldtank, dir = fromRational $ round ((atan2 y x)*1000000*180/pi)%1000000} lift $ modify $ \state -> state {tanks = tank:(tail . tanks $ state)} |