(svn r25648) -Change [FS#5669]: [NewGRF] Invalidate vehicle recolour palette during (un)loading.

This commit is contained in:
frosch
2013-08-04 14:02:27 +00:00
parent 1234bef985
commit 206616bf37
6 changed files with 13 additions and 15 deletions

View File

@@ -165,9 +165,6 @@ void Train::ConsistChanged(bool same_length)
/* Cache wagon override sprite group. NULL is returned if there is none */
u->tcache.cached_override = GetWagonOverrideSpriteSet(u->engine_type, u->cargo_type, u->gcache.first_engine);
/* Reset colour map */
u->colourmap = PAL_NONE;
/* Update powered-wagon-status and visual effect */
u->UpdateVisualEffect(true);
@@ -2762,7 +2759,8 @@ void Train::MarkDirty()
{
Train *v = this;
do {
v->UpdateViewport(false, false);
v->colourmap = PAL_NONE;
v->UpdateViewport(true, false);
} while ((v = v->Next()) != NULL);
/* need to update acceleration and cached values since the goods on the train changed. */