(svn r10363) -Fix [FS#911]: invalidating autoreplace windows didn't take account of vehicle group (Matthias Wolf)
This commit is contained in:
@@ -677,7 +677,7 @@ void DestroyVehicle(Vehicle *v)
|
||||
|
||||
if (IsEngineCountable(v)) {
|
||||
GetPlayer(v->owner)->num_engines[v->engine_type]--;
|
||||
if (v->owner == _local_player) InvalidateAutoreplaceWindow(v->engine_type);
|
||||
if (v->owner == _local_player) InvalidateAutoreplaceWindow(v->engine_type, v->group_id);
|
||||
|
||||
if (IsValidGroupID(v->group_id)) GetGroup(v->group_id)->num_engines[v->engine_type]--;
|
||||
if (v->IsPrimaryVehicle()) DecreaseGroupNumVehicle(v->group_id);
|
||||
|
Reference in New Issue
Block a user