Mercurial > hg > openttd
diff src/engine.cpp @ 16514:0f4c60894d9b draft
(svn r21240) -Feature: [NewGRF] Implement action0 visual effect properties for ships and RVs (Hirundo)
author | rubidium <rubidium@openttd.org> |
---|---|
date | Thu, 18 Nov 2010 14:32:09 +0000 |
parents | 37ad611b8ce7 |
children | bb429a529a4a |
line wrap: on
line diff
--- a/src/engine.cpp +++ b/src/engine.cpp @@ -86,7 +86,12 @@ /* Set road vehicle tractive effort to the default value */ if (type == VEH_ROAD) this->u.road.tractive_effort = 0x4C; /* Set visual effect to the default value */ - if (type == VEH_TRAIN) this->u.rail.visual_effect = VE_DEFAULT; + switch (type) { + case VEH_TRAIN: this->u.rail.visual_effect = VE_DEFAULT; break; + case VEH_ROAD: this->u.road.visual_effect = VE_DEFAULT; break; + case VEH_SHIP: this->u.ship.visual_effect = VE_DEFAULT; break; + default: break; // The aircraft, disasters and especially visual effects have no NewGRF configured visual effects + } return; }