mirror of
https://github.com/isledecomp/isle.pizza.git
synced 2026-03-01 06:17:38 +00:00
Fix vehicle texture not updating when switching save slots
Include slot number in the part key so that switching save slots triggers a full part reload with the new slot's textures.
This commit is contained in:
parent
cf8ccf5b85
commit
c3083b02af
@ -103,9 +103,9 @@
|
|||||||
renderer?.dispose();
|
renderer?.dispose();
|
||||||
});
|
});
|
||||||
|
|
||||||
// Reload part when index changes
|
// Reload part when index or slot changes
|
||||||
$: if (renderer && !loading && currentPart) {
|
$: if (renderer && !loading && currentPart) {
|
||||||
const partKey = `${vehicle}-${globalIndex}`;
|
const partKey = `${slot?.slotNumber}-${vehicle}-${globalIndex}`;
|
||||||
if (partKey !== loadedPartKey) {
|
if (partKey !== loadedPartKey) {
|
||||||
loadCurrentPart();
|
loadCurrentPart();
|
||||||
}
|
}
|
||||||
@ -136,7 +136,7 @@
|
|||||||
if (!wdbData || !wdbParser || !currentPart || !renderer) return;
|
if (!wdbData || !wdbParser || !currentPart || !renderer) return;
|
||||||
|
|
||||||
partError = null;
|
partError = null;
|
||||||
const partKey = `${vehicle}-${globalIndex}`;
|
const partKey = `${slot?.slotNumber}-${vehicle}-${globalIndex}`;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const worldName = VehicleWorlds[vehicle];
|
const worldName = VehicleWorlds[vehicle];
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user