Summary: When calling Mission.Current.SpawnWeaponWithNewEntity(....) the server crashes because the SpawnWeaponWithNewEntityAux method access the optional attachedMissionObject parameter which can be null.
Thats also how it is done in the MissionNetworkComponent in the SendSpawnedMissionObjectsToPeer method.
How to Reproduce:
Just somehow try to spawn an item through the named function.
Scene Name (if related): Any
Media (Screenshots & Video): /
Computer Specs:
OS: W11
GPU: AMD 7900XTX
GPU Driver Version: Up to date
CPU: AMD 5900X
RAM: 32GB
Storage Device (HDD/SSD): SSD
C#:
GameNetwork.WriteMessage(new SpawnWeaponWithNewEntity(weapon, spawnFlags, firstScriptOfType.Id.Id, frame, attachedMissionObject.Id, isVisible: true, hasLifeTime));
// Should be:
GameNetwork.WriteMessage(new SpawnWeaponWithNewEntity(weapon, spawnFlags, firstScriptOfType.Id.Id, frame, attachedMissionObject != null ? attachedMissionObject.Id : MissionObjectId.Invalid, isVisible: true, hasLifeTime));
Thats also how it is done in the MissionNetworkComponent in the SendSpawnedMissionObjectsToPeer method.
How to Reproduce:
Just somehow try to spawn an item through the named function.
Scene Name (if related): Any
Media (Screenshots & Video): /
Computer Specs:
OS: W11
GPU: AMD 7900XTX
GPU Driver Version: Up to date
CPU: AMD 5900X
RAM: 32GB
Storage Device (HDD/SSD): SSD
Last edited: