MantisBT - Zandronum
View Issue Details
0000006Zandronum[All Projects] Bugpublic2010-09-06 20:592018-09-30 22:52
Konda 
Torr Samaho 
noneminoralways
closedno change required 
MicrosoftWindowsXP/Vista/7
98c 
 
0000006: ONLINE - Weapon shows 0 ammo but functions almost normally
I have been working on a project, and there you pick up custom inventory that do checks before giving you the weapon (checking for slots taken, if the player already has the weapon, etc.). The weapon's ammo maximum amount is 1 and it disappears from your inventory after you use it. It all works perfectly fine offline but online when you pick up the weapon it shows 0 ammo. After using it, it works normally, but doesn't disappear from your inventory after using it. Alt fire works the same way but it spawns the projectile that spawns the weapon (weapon drop) but that is probably because the weapon uses no ammo for alt fire. On alt fire, the weapon is "dropped" and the weapon disappears from your inventory.
Trying to reproduce it online, I have tried the 'give' cheats to give myself ammo of that weapon or the custom inventory that gives me the weapon, but nothing has changed. After that I tried giving myself the weapon and the ammo was showing up like it should, and the weapon disappears from your inventory after fire like it should be. Bingo! I found how to reproduce it! Then in the DECORATE script I tried raising the second parameter of A_GiveInventory (for weapon) which is inventory amount given but it didn't work. So after I was thinking what the hell is wrong now I figured out that there must be a delay between each time the script gives you the weapon. So I did delay 1 between each A_GiveInventory (for weapon).

TL;DR version:
The script gave the weapon to the player once. After researches I found out that the script has to give the weapon to the player at least twice (with a delay between each time), which shouldn't be the only way it works properly.
The ZIP contains 2 files, the WAD with the issue mentioned (smokebomb-onlinebug.wad) and the one which has reproduced the bug via DECORATE script (smokebomb-reproduced.wad). In the game turn on cheats and summon "ISmokeGrenade" and pick it up. First try it with smokebomb-onlinebug.wad and then with smokebomb-reproduced.wad online. The wads must NOT be loaded together

DON'T MIND THE TEXT.TXT, IT IS AN EMPTY TEXT FILE. I COULDN'T REMOVE THE FILE FROM THE UPLOAD ONCE I REALIZED IT HAS MORE THAN 2MB OF SIZE.

DOWNLOAD LINK:http://www.speedyshare.com/files/24145358/smokebomb-report.zip [^]
No tags attached.
Issue History
2010-09-06 20:59KondaNew Issue
2010-09-19 07:51Torr SamahoAssigned To => Torr Samaho
2010-09-19 07:51Torr SamahoStatusnew => assigned
2010-09-19 08:23Torr SamahoNote Added: 0000083
2010-09-19 08:23Torr SamahoStatusassigned => feedback
2010-09-19 08:25Torr SamahoView Statusprivate => public
2010-09-19 16:02KondaNote Added: 0000096
2010-09-19 16:02KondaStatusfeedback => assigned
2010-09-19 16:05KondaNote Edited: 0000096bug_revision_view_page.php?bugnote_id=96#r52
2010-09-19 16:24Torr SamahoNote Added: 0000097
2010-09-19 16:24Torr SamahoStatusassigned => resolved
2010-09-19 16:24Torr SamahoFixed in Version => 98d
2010-09-19 16:24Torr SamahoResolutionopen => fixed
2010-09-22 20:31Torr SamahoNote Added: 0000138
2010-09-22 20:31Torr SamahoResolutionfixed => no change required
2010-09-22 20:31Torr SamahoFixed in Version98d =>
2012-06-09 13:22Torr SamahoCategoryGeneral => Bug
2018-09-30 22:52Blzut3Statusresolved => closed

Notes
(0000083)
Torr Samaho   
2010-09-19 08:23   
http://www.dailydoomer.com/tsst/misc/SkullDev98dAmmoFixTest.7z [^] should fix the issue. Please test and report back.
(0000096)
Konda   
2010-09-19 16:02   
(edited on: 2010-09-19 16:05)
After trying the skulltag version you posted, everything works fine - It shows me 1/1 in ammo like it should and the weapon disappears after fire like it should.
EDIT: I tried it online too, and everything works fine just like in single player. Good job

(0000097)
Torr Samaho   
2010-09-19 16:24   
Thanks for testing! I'll consider this to be fixed then.
(0000138)
Torr Samaho   
2010-09-22 20:31   
It turned out that this is not a Skulltag bug at all, but a bug in the example wad. SNadeAmmo is not an ammo type because it is not directly derived from AAmmo and hence can't be used as ammo type for SmokeGrenade. Seehttp://zdoom.org/wiki/Classes:Ammo [^]