mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-02-04 13:23:46 +00:00
(svn r6479) -Fix r6424: FS#348 Plane autoreplace glitch
Now the num_engines array is updated for the buying player when merging two players The incorrect caches aren't saved so no savegames will contain incorrect data due to this bug
This commit is contained in:
parent
c52d029bd4
commit
0858bf0d04
@ -312,6 +312,7 @@ void ChangeOwnershipOfPlayerItems(PlayerID old_player, PlayerID new_player)
|
||||
DeleteVehicle(v);
|
||||
} else {
|
||||
v->owner = new_player;
|
||||
if (IsEngineCountable(v)) GetPlayer(new_player)->num_engines[v->engine_type]++;
|
||||
switch (v->type) {
|
||||
case VEH_Train: if (IsFrontEngine(v)) v->unitnumber = ++num_train; break;
|
||||
case VEH_Road: v->unitnumber = ++num_road; break;
|
||||
|
Loading…
Reference in New Issue
Block a user