Commit 86622e1
authored
Fix Edge-case with
Found a very interesting edge case bug with `$Preload briefing icon models:.`
Situation: Mission 1 has a briefing which has a ship class A as the class (and thus loads the model), but the ship class A is not actually in that mission so no subsystems are loaded. Then in mission 2, the ship class A is actually in the mission but FSO tries to reuse the slot that was loaded, but realizes no subsystems were loaded and makes an error message. I that is because the preload code for the briefing icons on `missionparse.cpp` line 6664 just calls `model_load` but does not specify the subsystem argument.
I've also attached a retail mod reproducible campaign (2 missions, first is 5 seconds long). When the second mission loads the incorrect subsystem warning appears.
This PR properly loads the subsystems and fixes the bug. Tested and works as expected.$Preload briefing icon models: (#6850)1 parent 199c7b7 commit 86622e1
1 file changed
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6661 | 6661 | | |
6662 | 6662 | | |
6663 | 6663 | | |
6664 | | - | |
| 6664 | + | |
| 6665 | + | |
6665 | 6666 | | |
6666 | 6667 | | |
6667 | 6668 | | |
| |||
0 commit comments