refactor 'dir = ' into 'set_dir()'

This should have little/no gameplay effect right now, just paving the
 way for directional lights.
Replaced handle_rotation() on buckly things with this.

Signed-off-by: Mloc-Argent <colmohici@gmail.com>
This commit is contained in:
Mloc-Argent
2014-11-27 21:33:55 +00:00
committed by Mloc
parent a1a66870ca
commit 117ca6a135
143 changed files with 480 additions and 480 deletions

View File

@@ -23,16 +23,16 @@
if(dy || dx)
if(abs(dx) < abs(dy))
if(dy > 0) usr.dir = NORTH
else usr.dir = SOUTH
if(dy > 0) usr.set_dir(NORTH)
else usr.set_dir(SOUTH)
else
if(dx > 0) usr.dir = EAST
else usr.dir = WEST
if(dx > 0) usr.set_dir(EAST)
else usr.set_dir(WEST)
else
if(pixel_y > 16) usr.dir = NORTH
else if(pixel_y < -16) usr.dir = SOUTH
else if(pixel_x > 16) usr.dir = EAST
else if(pixel_x < -16) usr.dir = WEST
if(pixel_y > 16) usr.set_dir(NORTH)
else if(pixel_y < -16) usr.set_dir(SOUTH)
else if(pixel_x > 16) usr.set_dir(EAST)
else if(pixel_x < -16) usr.set_dir(WEST)