summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-02-13 11:31:35 +0000
committertron <tron@openttd.org>2005-02-13 11:31:35 +0000
commit2b4b9353517a5d436095c0f311ca5966ccdacb56 (patch)
treeddcd903943bdce618a8d2a95e459b16ff0da49ae
parent8391c96facc66dc84ad99969aadc4307fcd153bd (diff)
downloadopenttd-2b4b9353517a5d436095c0f311ca5966ccdacb56.tar.xz
(svn r1869) Fix some bugs in the bulldozer movement implementation.
Now they move in a sane pattern.
-rw-r--r--vehicle.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/vehicle.c b/vehicle.c
index c32be67af..e11b25642 100644
--- a/vehicle.c
+++ b/vehicle.c
@@ -788,8 +788,8 @@ static void BulldozerInit(Vehicle *v)
}
typedef struct BulldozerMovement {
- byte image:2;
byte direction:2;
+ byte image:2;
byte duration:3;
} BulldozerMovement;
@@ -839,7 +839,7 @@ static void BulldozerTick(Vehicle *v)
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)) {