changeset 7419:95e6e55cf9d8 draft

(svn r10812) -Fix (r10097) [FS#1093]: Make RoadVehicle::MarkDirty() mark all parts of articulated vehicles as dirty, not just the front.
author maedhros <maedhros@openttd.org>
date Mon, 06 Aug 2007 13:44:50 +0000
parents f167e09640f8
children edb2c250e91c
files src/roadveh_cmd.cpp
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/roadveh_cmd.cpp
+++ b/src/roadveh_cmd.cpp
@@ -556,8 +556,10 @@
 
 void RoadVehicle::MarkDirty()
 {
-	this->cur_image = this->GetImage(this->direction);
-	MarkAllViewportsDirty(this->left_coord, this->top_coord, this->right_coord + 1, this->bottom_coord + 1);
+	for (Vehicle *v = this; v != NULL; v = v->next) {
+		v->cur_image = v->GetImage(v->direction);
+		MarkAllViewportsDirty(v->left_coord, v->top_coord, v->right_coord + 1, v->bottom_coord + 1);
+	}
 }
 
 void RoadVehicle::UpdateDeltaXY(Direction direction)