Soliders-in-Arms-Arma-3-Group / sia3f

MIT License
1 stars 0 forks source link

Prevent losing rifle when loading death loadout on respawn #102

Open L-McKendrick opened 11 months ago

L-McKendrick commented 11 months ago

There's a bug with ace and ARMA that a player's primary is not maintained when loading their loadout saved through onPlayerKilled.sqf (if I had to guess it's because the rifle is dropped to the ground a frame before the player is dead?). This causes the player to respawn without their primary and getting pretty mad about it too like you did it on purpose to them.

A code workaround is possible, such as having a separate variable for the player's primary that is saved every X seconds as a fallback, or checking a small radius around the player's corpse for a primary.

SiegeToaster commented 11 months ago

Is it always the primary weapon or the one they're currently holding?

L-McKendrick commented 1 week ago

getCorpseWeaponholders should make this a lot easier to implement