(svn r1869) Fix some bugs in the bulldozer movement implementation.
authortron
Sun, 13 Feb 2005 11:31:35 +0000
changeset 1365 7eff6abe942a
parent 1364 9fad41818ac1
child 1366 d2b815eb5265
(svn r1869) Fix some bugs in the bulldozer movement implementation.
Now they move in a sane pattern.
vehicle.c
--- a/vehicle.c	Sun Feb 13 11:27:41 2005 +0000
+++ b/vehicle.c	Sun Feb 13 11:31:35 2005 +0000
@@ -788,8 +788,8 @@
 }
 
 typedef struct BulldozerMovement {
+	byte direction:2;
 	byte image:2;
-	byte direction:2;
 	byte duration:3;
 } BulldozerMovement;
 
@@ -839,7 +839,7 @@
 		v->y_pos += _inc_by_dir[b->direction].y;
 
 		v->u.special.unk2++;
-		if (v->u.special.unk2 < b->duration) {
+		if (v->u.special.unk2 >= b->duration) {
 			v->u.special.unk2 = 0;
 			v->u.special.unk0++;
 			if (v->u.special.unk0 == lengthof(_bulldozer_movement)) {