mirror of
https://github.com/MaSzyna-EU07/StarterNG.git
synced 2026-11-19 15:02:15 +01:00
Tell apart the halves of a unit that share one skin
The ET42-026 dresses both halves in 112E-026 and the scenery tells them apart by the model. Textures were keyed by the skin alone, so the B half became a second A: not part of the set, and listed on its own. A shared skin now gets the model in its id, vehicles are looked up by skin and model, and the vehicle cache is rebuilt for the new ids.
This commit is contained in:
@@ -590,7 +590,7 @@ public sealed class VehicleBrowser
|
||||
|
||||
public void SelectInBrowser(Dynamic car)
|
||||
{
|
||||
var texture = _db.TextureForSkin(car.SkinFile);
|
||||
var texture = _db.TextureFor(car.SkinFile, car.MmdFile);
|
||||
if (texture is null)
|
||||
return;
|
||||
|
||||
@@ -635,6 +635,7 @@ public sealed class VehicleBrowser
|
||||
foreach (var obj in vehicleListBox.Items)
|
||||
if (obj is ListBoxItem { Tag: VehicleTexture t } entry &&
|
||||
string.Equals(t.Skinfile, texture.Skinfile, StringComparison.OrdinalIgnoreCase) &&
|
||||
string.Equals(t.Model, texture.Model, StringComparison.OrdinalIgnoreCase) &&
|
||||
string.Equals(t.Directory, texture.Directory, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
vehicleListBox.SelectedItem = entry;
|
||||
|
||||
Reference in New Issue
Block a user