Mercurial > hg > openttd
comparison src/roadveh_cmd.cpp @ 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 | 79141b3cee29 |
comparison
equal
deleted
inserted
replaced
7418:f167e09640f8 | 7419:95e6e55cf9d8 |
---|---|
554 } | 554 } |
555 | 555 |
556 | 556 |
557 void RoadVehicle::MarkDirty() | 557 void RoadVehicle::MarkDirty() |
558 { | 558 { |
559 this->cur_image = this->GetImage(this->direction); | 559 for (Vehicle *v = this; v != NULL; v = v->next) { |
560 MarkAllViewportsDirty(this->left_coord, this->top_coord, this->right_coord + 1, this->bottom_coord + 1); | 560 v->cur_image = v->GetImage(v->direction); |
561 MarkAllViewportsDirty(v->left_coord, v->top_coord, v->right_coord + 1, v->bottom_coord + 1); | |
562 } | |
561 } | 563 } |
562 | 564 |
563 void RoadVehicle::UpdateDeltaXY(Direction direction) | 565 void RoadVehicle::UpdateDeltaXY(Direction direction) |
564 { | 566 { |
565 #define MKIT(a, b, c, d) ((a & 0xFF) << 24) | ((b & 0xFF) << 16) | ((c & 0xFF) << 8) | ((d & 0xFF) << 0) | 567 #define MKIT(a, b, c, d) ((a & 0xFF) << 24) | ((b & 0xFF) << 16) | ((c & 0xFF) << 8) | ((d & 0xFF) << 0) |