MantisBT - Soldat Dedicated Server
View Issue Details
0000310Soldat Dedicated ServerScripting Corepublic2013-02-05 16:172015-01-21 12:45
TheOne 
ExHunter 
lowminoralways
resolvedfixed 
x86WindowsXP SP3
2.7.3 
2.7.9 
0000310: ForceWeapon falsifies GetPlayerStat(Ammo)
Description of script:
When a player reloads his weapon, I detect that his ammunition is >0 and want to force his ammo to a specific value. I call ForceWeapon with that ammunition parameter and the player's weapon has now that number of bullets.

Problem:
When I use GetPlayerStat('Ammo') anytime after this event, it will return that the player has full clip ammunition. This lasts until the player turns to the other direction, sits or lays down. I assume that in those cases a new packet is sent which contains the real ammunition value. Forcing the weapon with the ammo on the player again doesn't help, the ammo value on the server is still set as if the weapon was full. As note, when the player shoots a bullet, the value on the server is just subtracted by one. Example with numbers, player reloads an ussocom with 12 shots, I force 5 bullets, server returns 12 as Ammo value, player shoots a bullet (has now actually 4 bullets), server returns 11 as Ammo value.
No tags attached.
Issue History
2013-02-05 16:17TheOneNew Issue
2013-02-05 16:18TheOneNote Added: 0001706
2013-02-05 18:09FalconPriorityurgent => low
2013-02-05 18:09FalconSeveritymajor => minor
2013-02-05 18:09FalconStatusnew => acknowledged
2013-02-05 22:21FalconProjectSoldat => Soldat Dedicated Server
2013-02-05 22:21FalconCategoryMultiplayer => General
2013-02-05 22:23FalconCategoryGeneral => Scripting Core
2013-02-05 22:23FalconProduct Version1.6.3 =>
2013-02-05 22:24FalconProduct Version => 2.7.3
2015-01-21 12:45ExHunterNote Added: 0002391
2015-01-21 12:45ExHunterStatusacknowledged => resolved
2015-01-21 12:45ExHunterFixed in Version => 2.7.9
2015-01-21 12:45ExHunterResolutionopen => fixed
2015-01-21 12:45ExHunterAssigned To => ExHunter

Notes
(0001706)
TheOne   
2013-02-05 16:18   
Well, what I'd like you to do is correct the value serversided when I use ForceWeapon.
(0002391)
ExHunter   
2015-01-21 12:45   
done for 1.6.9