MantisBT - Zandronum
View Issue Details
0002329Zandronum[All Projects] Bugpublic2015-06-25 02:042018-09-30 22:17
AlexMax 
Edward-san 
immediatemajorrandom
closedfixed 
2.1 
3.0 
0002329: HUD Health Desync
This might happen with other items, but it's easiest to recreate with health pickups. It only happens online. Pick up a stimpack with less than 100% health, you might get 10% health or 20% health. Taking damage appears to reset your health percentage to the correct number, making it appear that you take more damage than you're supposed to.
No tags attached.
txt decorate.txt (216) 2015-06-25 19:49
/tracker/file_download.php?file_id=1571&type=bug
Issue History
2015-06-25 02:04AlexMaxNew Issue
2015-06-25 02:46WaTaKiDNote Added: 0012785
2015-06-25 02:46WaTaKiDProduct Version => 2.1
2015-06-25 06:15Torr SamahoAssigned To => Edward-san
2015-06-25 06:15Torr SamahoStatusnew => assigned
2015-06-25 09:59Edward-sanNote Added: 0012789
2015-06-25 09:59Edward-sanStatusassigned => needs review
2015-06-25 10:06Edward-sanNote Edited: 0012789bug_revision_view_page.php?bugnote_id=12789#r7527
2015-06-25 13:08Edward-sanNote Edited: 0012789bug_revision_view_page.php?bugnote_id=12789#r7528
2015-06-25 18:06Torr SamahoNote Added: 0012793
2015-06-25 18:35Edward-sanNote Added: 0012795
2015-06-25 18:36Edward-sanNote Edited: 0012795bug_revision_view_page.php?bugnote_id=12795#r7530
2015-06-25 18:39DuskPrioritynormal => immediate
2015-06-25 19:34WaTaKiDNote Added: 0012801
2015-06-25 19:41WaTaKiDNote Edited: 0012801bug_revision_view_page.php?bugnote_id=12801#r7535
2015-06-25 19:49Edward-sanFile Added: decorate.txt
2015-06-25 19:49Edward-sanNote Added: 0012802
2015-06-25 22:31Edward-sanNote Edited: 0012802bug_revision_view_page.php?bugnote_id=12802#r7537
2015-06-25 22:50AlexMaxNote Added: 0012803
2015-06-27 17:48Torr SamahoNote Added: 0012813
2015-06-27 17:49Torr SamahoStatusneeds review => needs testing
2015-06-28 21:10jwaffeNote Added: 0012822
2015-06-28 21:13jwaffeNote Edited: 0012822bug_revision_view_page.php?bugnote_id=12822#r7555
2015-07-15 19:11Edward-sanNote Added: 0012945
2015-07-15 19:14Edward-sanNote Edited: 0012945bug_revision_view_page.php?bugnote_id=12945#r7686
2015-09-11 03:01Ru5tK1ngNote Added: 0013481
2015-09-11 03:02Ru5tK1ngNote Edited: 0013481bug_revision_view_page.php?bugnote_id=13481#r8051
2015-09-11 03:47WaTaKiDNote Added: 0013482
2015-09-12 20:33Edward-sanNote Added: 0013495
2015-10-04 10:55Edward-sanNote Added: 0013582
2015-10-07 20:04Ru5tK1ngNote Added: 0013626
2015-10-07 20:06Ru5tK1ngStatusneeds testing => resolved
2015-10-07 20:06Ru5tK1ngResolutionopen => fixed
2015-10-07 20:06Ru5tK1ngFixed in Version => 3.0
2018-09-30 22:17Blzut3Statusresolved => closed

Notes
(0012785)
WaTaKiD   
2015-06-25 02:46   
ive found that this commit is causing the issue:'https://bitbucket.org/Torr_Samaho/zandronum-stable/commits/bbae072ed58f8c6645854220b846c4bd61245901 [^]'
(0012789)
Edward-san   
2015-06-25 09:59   
(edited on: 2015-06-25 13:08)
I'm sorry for this incredible mistake.'https://bitbucket.org/crimsondusk/zandronum-sandbox-stable/commits/ae2faf8ca42da4f7873b6b3dc489ebbf0a27b54f [^]' should fix the issue. I'll take care of the 3.0 merge when it's accepted.

(0012793)
Torr Samaho   
2015-06-25 18:06   
Can you elaborate what the problem is? Just looking at the patch, it seems counter-intuitive to synchronize the health less often as a fix for sync problems.
(0012795)
Edward-san   
2015-06-25 18:35   
(edited on: 2015-06-25 18:36)
Ok, trying to explain: clients and servers both executed AHealth::TryPickup, but the additions I made for ticket 0002187 made possible for clients to change the health after the clients were informed by the server to change the health by SVC_SETPLAYERHEALTH, leading to an increase of health twice.

Anyways, I discovered just now that even health inventories did not work well, because of the serverside code in P_GiveBody. In the end, the whole approach was a complete failure, so I had to revert the whole changeset and redo the fix for ticket 2187.'https://bitbucket.org/crimsondusk/zandronum-sandbox-stable/commits/27327d72adfe68081315322b68cf634f4ef89c63 [^]' should fix this, while keeping the fix for 2187 + a fix for A_Saw, which had the same issue as A_CustomPunch. The serverside code must be added only if clients can't call P_GiveBody directly.

(0012801)
WaTaKiD   
2015-06-25 19:34   
(edited on: 2015-06-25 19:41)
using'https://bitbucket.org/crimsondusk/zandronum-sandbox-stable/commits/27327d72adfe68081315322b68cf634f4ef89c63 [^]'

<WaTaKiD>edward-san: ive tested the doom health items, heretic health items and inventory items, the powered gauntlet lifesteal, hexen health items and inventory items, and the cleric staff melee lifesteal, and so far so good

i then proceeded to check lifesteal with a_custompunch from ticket 2187 and a_saw from edward-san, and those also seemed to work fine off and online

edit: i just tested the strife inventory items too and they seem to work fine as well

(0012802)
Edward-san   
2015-06-25 19:49   
(edited on: 2015-06-25 22:31)
Attached the decorate containing A_Saw + lifesteal as the testcase for the fix included in the mentioned changeset.

(0012803)
AlexMax   
2015-06-25 22:50   
I'm currently hosting 2.1 + 27327d7 on all FUNCRUSHER servers, if you want to test.
(0012813)
Torr Samaho   
2015-06-27 17:48   
Before pulling anything, I'd like to hear some testing feedback from the build with the proposed fix running on FUNCRUSHER.
(0012822)
jwaffe   
2015-06-28 21:10   
(edited on: 2015-06-28 21:13)
I haven't been able to reproduce the problem on [UK] -->Grandvoid--> Hell Revealed II -- Realistic Survival, stimpacks consistently give me 10 health.

Konar6 said he's running the same build as NJ.

(0012945)
Edward-san   
2015-07-15 19:11   
(edited on: 2015-07-15 19:14)
Merged the changes to 3.0 repository here. Changeset 2037f61 should be part of 1ce37b3a.

(0013481)
Ru5tK1ng   
2015-09-11 03:01   
(edited on: 2015-09-11 03:02)
I loaded up a 3.0 server and tested Doom, Heretic, Strife and the Serpent Staff from Hexen. While the health packs and related inventory items didn't desync and gave me the proper health amounts, I did find out that the Powered Gauntlets in Heretic did desync. Health was drained from the enemy but it wasn't updated on the client. The Serpent staff didn't have any issue updating health gained from draining.

A_Saw and A_CustomPunch both updated their health steals.

(0013482)
WaTaKiD   
2015-09-11 03:47   
regarding heretic's powered gauntlets:'https://bitbucket.org/crimsondusk/zandronum-sandbox-stable-old/commits/8bbc3e7174bea5d7bc61706a07cbb7163742e75e [^]'

edward-san made this fix a while back and i gave it a test, build here:'https://www.dropbox.com/s/82hm7iviqi8ky0b/zandronum-2.1.1-r150712-2119-8bbc3e7-windows.zip?dl=0 [^]'

<WaTaKiD> yes, on my little local windows server with 2 of my own clients, the gauntlets fix seems to work just fine, and i didnt notice anything else health related getting any weird side effects in the other iwads (or that decorate.txt with fist and chainsaw lifesteal)
(0013495)
Edward-san   
2015-09-12 20:33   
Ported the changes to the new repository:'https://bitbucket.org/crimsondusk/zandronum-sandbox-stable/commits/31630bcdb3701a1aeeb8615e2d0f0d05349e035a [^]'
(0013582)
Edward-san   
2015-10-04 10:55   
The gauntlet fix has been added. Please test this.
(0013626)
Ru5tK1ng   
2015-10-07 20:04   
I tested out the latest beta and the powered gauntlets health steal was updated properly on the clients. Hopefully no more desync.