MantisBT

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000616Soldat Dedicated ServerScripting Corepublic2015-06-10 09:282016-03-15 01:27
Reporterdeguix 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusconfirmedResolutionopen 
Platformamd64OSDebian GNU/LinuxOS Version7.0
Product Version2.7.9b1 
Target VersionFixed in Version 
Summary0000616: TPlayer.ForceWeapon reloads secondary whenever its ammo is set to 0
DescriptionI was trying to make force weapon to jam the primary weapon artificially (by setting its ammo to 0 every second with TGame.OnClockTick), but whenever I do that after the secondary weapon is reloading, that secondary weapon is automatically fully reloaded.

The "workaround" is to save that ammo in another variable, and whenever weapons are switched again, use it, and save the new one in this one, and then do another force weapon, but then the weapon will starting reloading from the beginning if its ammo is 0, which is what I don't want.

(I didn't test with 2.7.8, but it should be there too)
Steps To ReproduceUse the script as in http://wiki.soldat.pl/index.php/TActivePlayer.ForceWeapon, [^] except set NewSecondary.WType to an actual weapon id (like 1 for deagles).
Additional InformationHistorically with ScriptCore 2 ForceWeapon, 0 meant "max ammo" for primary, but it shouldn't. 255 should be "max ammo" instead, and 0 should make it stay in reloading state. Preferably there should also be another variable for the reloading percentage, but I think that's pushing it.
TagsNo tags attached.
John
Attached Files

- Relationships

-  Notes
(0002470)
deguix (reporter)
2015-06-11 01:41

Setting ammo to 255 when weapon can't store that much will make it set it to 0 right now, which does what I need (currently)... but it's still very weird, and it won't work if a weapon has 255 bullets.

- Issue History
Date Modified Username Field Change
2015-06-10 09:28 deguix New Issue
2015-06-11 01:41 deguix Note Added: 0002470
2016-03-15 01:27 Falcon Status new => confirmed


Copyright © 2000 - 2024 MantisBT Team
Powered by Mantis Bugtracker