Mercurial > hg > openttd
diff src/train_cmd.cpp @ 10492:28fa021b003c draft
(svn r14747) -Codechange: remove DeleteVehicleChain in favour of the vehicle destructor as that was already doing the same for a few vehicle types.
author | rubidium <rubidium@openttd.org> |
---|---|
date | Fri, 26 Dec 2008 20:45:02 +0000 |
parents | a9ecb9be9814 |
children | 5531e81401ee |
line wrap: on
line diff
--- a/src/train_cmd.cpp +++ b/src/train_cmd.cpp @@ -938,6 +938,7 @@ if (v == NULL) return NULL; if (IsTrainWagon(v)) SetFreeWagon(v); + first->SetNext(NULL); return v; } @@ -4392,7 +4393,7 @@ TrainLocoHandler(this, true); } else if (IsFreeWagon(this) && HASBITS(this->vehstatus, VS_CRASHED)) { /* Delete flooded standalone wagon chain */ - if (++this->u.rail.crash_anim_pos >= 4400) DeleteVehicleChain(this); + if (++this->u.rail.crash_anim_pos >= 4400) delete this; } }