Goods at the consist have changed, update the graphics, cargo, and acceleration. */
| 2997 | |
| 2998 | /** Goods at the consist have changed, update the graphics, cargo, and acceleration. */ |
| 2999 | void Train::MarkDirty() |
| 3000 | { |
| 3001 | Train *v = this; |
| 3002 | do { |
| 3003 | v->colourmap = PAL_NONE; |
| 3004 | v->UpdateViewport(true, false); |
| 3005 | } while ((v = v->Next()) != nullptr); |
| 3006 | |
| 3007 | /* need to update acceleration and cached values since the goods on the train changed. */ |
| 3008 | this->CargoChanged(); |
| 3009 | this->UpdateAcceleration(); |
| 3010 | } |
| 3011 | |
| 3012 | /** |
| 3013 | * This function looks at the vehicle and updates its speed (cur_speed |
no test coverage detected