MantisBT - Soldat
View Issue Details
0000619SoldatOtherpublic2015-06-28 14:582015-07-13 01:17
homerofgods 
 
normalminorhave not tried
confirmedopen 
 
 
0000619: OnWeaponChange called twice
I quote deguix:

- TActivePlayer.ForceWeapon on TActivePlayer.OnAfterRespawn is working while in 1.6.8 it isn't - at least when all weapons in soldat.ini are disabled. There are still bad things though:

Bug: Player chooses a secondary that is not "No weapon" in game options. Then when the player joins a game with that weapon disabled in soldat.ini, server still forces that secondary weapon, then it forces it to WTYPE_NOWEAPON (2 OnWeaponChange are called). It should force weapons directly to WTYPE_NOWEAPON (with only 1 call to OnWeaponChange), like what happens when the secondary chosen in menu is "No weapon".
http://forums.soldat.pl/index.php?topic=43954.msg524107#msg524107 [^]
No tags attached.
related to 0000618closed ExHunter Weapon IDs of WTYPE_M2 and other new weaponsreverts to WTYPE_NOWEAPON 
related to 0000617closed ExHunter Access violations when aiming WTYPE_M2 and WTYPE_THROWNKNIFE to the right 
related to 0000620new  Server forces player WTYPE_NOWEAPON 
Issue History
2015-06-28 14:58homerofgodsNew Issue
2015-06-28 14:59homerofgodsRelationship addedrelated to 0000618
2015-06-28 14:59homerofgodsRelationship addedrelated to 0000617
2015-06-28 15:01homerofgodsRelationship addedrelated to 0000620
2015-07-13 01:17ExHunterNote Added: 0002480
2015-07-13 01:17ExHunterStatusnew => confirmed

Notes
(0002480)
ExHunter   
2015-07-13 01:17   
I am aware of that issue - it has been present since ever.

No easy way* to fix this though atm. Would result in a kind of workaround in the code, which we really do not need more of at this point.

Explanation: Client informs server that it has this weapon, so weaponchange is called, but server notices that this weapon is not enabled, so it forces another secondary, so it is called again.

(*actually easy, but more spagetthi code...)