Zandronum Chat on our Discord Server Get the latest version: 3.2
Source Code

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001868Zandronum[All Projects] Bugpublic2014-07-02 15:192018-09-30 21:40
ReporterIvan 
Assigned ToTorr Samaho 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformMicrosoftOSWindowsOS VersionXP/Vista/7
Product Version1.2 
Target Version2.2Fixed in Version2.2 
Summary0001868: SetAmmoCapacity is not recognized after map is finished
DescriptionTake this wad, summon a backpack. See that your ammo capacities have changed. Now, exit the map. Notice your ammo capacity is back to the old values.

'https://www.dropbox.com/s/22ayuy1a0hu1xma/ammoc.wad [^]'
Attached Filespng file icon Screenshot_Doom_20140810_193017.png [^] (119,839 bytes) 2014-08-10 16:34


? file icon ammoc.wad [^] (1,465 bytes) 2015-08-11 23:33

- Relationships
related to 0001914new MaxHealthBonus/MaxArmorBonus are not recognized properly 
related to 0001972closed SetAmmoCapacity() not executed in ENTER script 

-  Notes
User avatar (0010165)
Dusk (developer)
2014-08-10 16:35

It's a desync, the client is left in the dark about the ammo capacity after the map change.
User avatar (0010168)
Dusk (developer)
2014-08-10 17:32

I'm baffled as to why this happens. I cannot find the reason the client resets the variable.. I cannot use 'watch' in gdb without an instance of the variable and I also cannot use 'break' because MaxAmount is a public member and not a function like it should be.

How do I go about figuring out why this happens? ZDoom is a horrible tangled mess and I am most definitely not going to try find the solution by examining all of the code...
User avatar (0011247)
Torr Samaho (administrator)
2015-01-03 19:29
edited on: 2015-01-03 19:32

Quote from Dusk
How do I go about figuring out why this happens?

I'd start with a full text search (Match case + whole words only) for MaxAmount to identify the places where the value is potentially changed. If you are lucky, you can get away using "MaxAmount = " as string. Otherwise use some RegEx to allow arbitrary types and amount of white space before and after the equality sign.
Quote from Dusk
ZDoom is a horrible tangled mess and I am most definitely not going to try find the solution by examining all of the code...

If you are not willing to venture through large parts of the code, you most likely won't be able to fix this bug or many others. I can't even count how often I had to do something like this over the years. 0001588 is just a very recent example.

User avatar (0013189)
Ivan (reporter)
2015-08-10 12:01

What are the chances of this being fixed? I've tried many hacks and workarounds but none of them seem to be working at all. I've even tried to force the ammo capacity changes through clientside scripts, but something is just overriding it.
User avatar (0013203)
Edward-san (developer)
2015-08-10 16:19
edited on: 2015-08-10 16:20

I believe the issue is partially caused by SERVER_ResetInventory , as the players are asked to destroy their inventory, then they receive it without the updated MaxAmount.

I say partially, because I tried to fix it by changing SERVERCOMMANDS_GiveInventory and SERVERCOMMANDS_GiveInventoryNotOverwritingAmount by taking MaxAmount into account, but it partially fixed the issue. Some ammo capabilities are still reset, no idea why.

User avatar (0013845)
Torr Samaho (administrator)
2015-11-18 19:14

Should be fixed now in 2.2. Please test.
User avatar (0013846)
cobalt (updater)
2015-11-18 19:27

Issue addressed by commit e1b83805b006: Fixed: Clients were not properly informed about the effects of SetAmmoCapacity after a changemap map change (fixes 1868).
Committed by Benjamin Berkels [Torr Samaho] on Wednesday 18 November 2015 20:11:45

Changes in files:

 docs/zandronum-history.txt | 1 +
 src/sv_main.cpp | 5 +++++
 2 files changed, 6 insertions(+), 0 deletions(-)

User avatar (0013946)
Ru5tK1ng (updater)
2015-12-07 01:16

Using:'https://www.dropbox.com/s/obffhny5vh06g6e/zandronum-3.0-r150809-0703-83ceae7-windows.zip?dl=0 [^]'

I didn't see any desyncs when moving to a new map. Ammo capacities were correct.

Issue Community Support
This issue is already marked as resolved.
If you feel that is not the case, please reopen it and explain why.
Supporters: Gummywormz
Opponents: No one explicitly opposes this issue yet.

- Issue History
Date Modified Username Field Change
2014-07-02 15:19 Ivan New Issue
2014-07-02 17:01 Dusk Assigned To => Dusk
2014-07-02 17:01 Dusk Status new => confirmed
2014-08-10 16:01 Dusk Relationship added related to 0001914
2014-08-10 16:01 Dusk Status confirmed => assigned
2014-08-10 16:34 Dusk File Added: Screenshot_Doom_20140810_193017.png
2014-08-10 16:35 Dusk Note Added: 0010165
2014-08-10 17:32 Dusk Note Added: 0010168
2014-10-25 17:46 Borg Note Added: 0010687
2014-10-25 20:32 Borg Note Added: 0010689
2014-10-25 20:44 Borg Note Deleted: 0010689
2014-10-25 20:44 Borg Note Deleted: 0010687
2014-10-26 09:10 Dusk Relationship added related to 0001972
2015-01-03 19:29 Torr Samaho Note Added: 0011247
2015-01-03 19:32 Torr Samaho Note Edited: 0011247 View Revisions
2015-08-10 12:01 Ivan Note Added: 0013189
2015-08-10 16:19 Edward-san Note Added: 0013203
2015-08-10 16:20 Edward-san Note Edited: 0013203 View Revisions
2015-08-11 23:33 Dusk File Added: ammoc.wad
2015-11-18 19:14 Torr Samaho Note Added: 0013845
2015-11-18 19:14 Torr Samaho Assigned To Dusk => Torr Samaho
2015-11-18 19:14 Torr Samaho Status assigned => needs testing
2015-11-18 19:27 cobalt Target Version => 2.2
2015-11-18 19:27 cobalt Description Updated View Revisions
2015-11-18 19:27 cobalt Note Added: 0013846
2015-12-07 01:16 Ru5tK1ng Note Added: 0013946
2015-12-07 01:17 Ru5tK1ng Status needs testing => resolved
2015-12-07 01:17 Ru5tK1ng Resolution open => fixed
2015-12-07 01:17 Ru5tK1ng Fixed in Version => 2.2
2015-12-07 01:17 Ru5tK1ng Description Updated View Revisions
2018-09-30 21:40 Blzut3 Status resolved => closed






Questions or other issues? Contact Us.

Links


Copyright © 2000 - 2025 MantisBT Team
Powered by Mantis Bugtracker