MantisBT - Zandronum
View Issue Details
0000408Zandronum[All Projects] Bugpublic2011-04-26 02:442024-03-10 03:22
unknownna 
Torr Samaho 
normalmajoralways
feedbackopen 
98d 
 
0000408: Thing Z-height misprediction online
Attached screenshot. The linedef acts as the catalyst here. If you flip it, it will not desync online.
skulltag -file thingz_spawnrespawn_08.wad -host +sv_weaponstay 0 +sv_itemrespawn 1 +sv_monsterrespawn 1 +sv_barrelrespawn 1 +alwaysapplydmflags 1
Special thanks to EmZee712 for reporting this issue.
No tags attached.
parent of 0000789closed Torr Samaho Strange thing z desync in D2IG20 after "changemap" map changes online if bots are in the game 
parent of 0002753closed Edward-san Floating items in multiplayer 
parent of 0002810new  Barrel Respawn Z-Height misprediction 
parent of 0001997closed Torr Samaho Random spawners respawn items through 3D floors when spawned from another actor 
parent of 0003426closed  Duel makes some actors spawn at floor level 
related to 0000479closed Torr Samaho Thing Z-height misprediction after map resets online 
related to 0000765closed Torr Samaho RandomSpawner thing z desync on 3D floors after map resets online 
Not all the children of this issue are yet resolved or closed.
png Screenshot_Doom_20110426_043327.png (96,459) 2011-04-26 02:44
https://zandronum.com/tracker/file_download.php?file_id=273&type=bug
png

? thingz_spawnrespawn_08.wad (55,698) 2012-04-10 08:12
https://zandronum.com/tracker/file_download.php?file_id=527&type=bug
? thingz_spawnrespawn_09.wad (62,533) 2016-10-18 18:07
https://zandronum.com/tracker/file_download.php?file_id=1956&type=bug
? itemzpos.wad (84,578) 2016-12-04 11:50
https://zandronum.com/tracker/file_download.php?file_id=1977&type=bug
? itemzpos2.wad (95,768) 2016-12-04 11:50
https://zandronum.com/tracker/file_download.php?file_id=1978&type=bug
Issue History
2011-04-26 02:44unknownnaNew Issue
2011-04-26 02:44unknownnaFile Added: Screenshot_Doom_20110426_043327.png
2011-04-26 02:45unknownnaFile Added: thing_z_misprediction_test_01.wad
2011-05-30 01:11unknownnaRelationship addedrelated to 0000479
2011-06-02 11:21unknownnaFile Added: Screenshot_Doom_20110602_131558.png
2011-06-02 11:22unknownnaFile Deleted: Screenshot_Doom_20110602_131558.png
2011-06-02 11:23unknownnaFile Added: Screenshot_Doom_20110602_131558.jpg
2011-07-10 11:42Torr SamahoNote Added: 0001845
2011-07-10 11:42Torr SamahoNote Edited: 0001845bug_revision_view_page.php?bugnote_id=1845#r934
2011-07-10 11:42Torr SamahoAssigned To => Torr Samaho
2011-07-10 11:42Torr SamahoStatusnew => feedback
2011-07-10 12:46unknownnaNote Added: 0001849
2011-07-10 12:46unknownnaStatusfeedback => assigned
2011-07-10 14:04unknownnaNote Added: 0001852
2011-07-10 20:18Torr SamahoNote Added: 0001854
2011-07-10 22:25unknownnaSeverityminor => major
2011-07-10 23:01unknownnaNote Added: 0001867
2011-07-10 23:13Torr SamahoNote Added: 0001870
2011-07-10 23:27unknownnaNote Added: 0001872
2011-07-10 23:31Torr SamahoNote Added: 0001873
2011-07-10 23:31Torr SamahoStatusassigned => feedback
2011-07-10 23:53unknownnaNote Added: 0001874
2011-07-10 23:53unknownnaStatusfeedback => assigned
2011-07-10 23:53unknownnaNote Edited: 0001874bug_revision_view_page.php?bugnote_id=1874#r936
2011-07-11 01:55unknownnaNote Added: 0001879
2011-07-11 02:07unknownnaNote Edited: 0001867bug_revision_view_page.php?bugnote_id=1867#r938
2011-07-26 01:22unknownnaNote Added: 0001958
2012-03-27 02:26Torr SamahoNote Added: 0002911
2012-03-27 02:30TIHanNote Added: 0002912
2012-03-27 02:33Torr SamahoNote Added: 0002913
2012-03-27 02:33Torr SamahoStatusassigned => feedback
2012-03-27 02:57Torr SamahoNote Edited: 0002913bug_revision_view_page.php?bugnote_id=2913#r1487
2012-03-27 05:33TIHanNote Added: 0002915
2012-03-27 17:05unknownnaNote Added: 0002917
2012-03-27 17:05unknownnaStatusfeedback => assigned
2012-03-28 02:00Torr SamahoNote Added: 0002946
2012-03-28 09:28Edward-sanNote Added: 0002956
2012-03-28 11:30Torr SamahoNote Added: 0002959
2012-03-28 23:55unknownnaNote Added: 0002974
2012-03-29 08:40unknownnaNote Deleted: 0002974
2012-03-29 08:41unknownnaNote Added: 0002988
2012-04-01 20:38unknownnaNote Added: 0003094
2012-04-02 02:12Torr SamahoNote Added: 0003108
2012-04-02 03:18unknownnaNote Added: 0003109
2012-04-02 03:19unknownnaFile Added: thing_z_misprediction_test_03.wad
2012-04-02 04:14unknownnaFile Added: ItemRespawnDesynchTest3.wad
2012-04-02 11:30Torr SamahoNote Added: 0003112
2012-04-02 11:44Torr SamahoNote Edited: 0003112bug_revision_view_page.php?bugnote_id=3112#r1618
2012-04-02 12:52Torr SamahoNote Edited: 0003112bug_revision_view_page.php?bugnote_id=3112#r1619
2012-04-02 12:54unknownnaNote Added: 0003113
2012-04-02 13:27unknownnaFile Added: thing_z_misprediction_test_04.wad
2012-04-02 13:32unknownnaNote Added: 0003114
2012-04-02 16:15unknownnaNote Added: 0003115
2012-04-02 16:15unknownnaFile Added: zhbarrel_desync_test_01.wad
2012-04-02 23:28Torr SamahoNote Added: 0003116
2012-04-02 23:29Torr SamahoNote Edited: 0003116bug_revision_view_page.php?bugnote_id=3116#r1621
2012-04-03 10:37Edward-sanNote Added: 0003120
2012-04-03 11:27Torr SamahoSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=1629#r1629
2012-04-03 11:33Torr SamahoNote Added: 0003121
2012-04-03 15:45unknownnaNote Added: 0003122
2012-04-03 15:46unknownnaFile Added: thingz_spawnrespawn_01.wad
2012-04-03 15:46unknownnaFile Deleted: Screenshot_Doom_20110602_131558.jpg
2012-04-04 00:25Torr SamahoNote Added: 0003128
2012-04-04 00:27Torr SamahoNote Edited: 0003128bug_revision_view_page.php?bugnote_id=3128#r1631
2012-04-04 00:27Torr SamahoSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=1632#r1632
2012-04-04 00:28Torr SamahoStatusassigned => feedback
2012-04-04 01:35unknownnaNote Added: 0003131
2012-04-04 01:35unknownnaStatusfeedback => assigned
2012-04-04 01:58unknownnaNote Edited: 0003131bug_revision_view_page.php?bugnote_id=3131#r1634
2012-04-04 10:07Edward-sanNote Added: 0003132
2012-04-04 10:52Edward-sanNote Edited: 0003132bug_revision_view_page.php?bugnote_id=3132#r1636
2012-04-06 05:22unknownnaNote Added: 0003151
2012-04-06 05:27unknownnaFile Added: thingz_spawnrespawn_03.wad
2012-04-06 05:28unknownnaFile Deleted: thingz_spawnrespawn_01.wad
2012-04-06 05:28unknownnaFile Deleted: zhbarrel_desync_test_01.wad
2012-04-06 05:28unknownnaFile Deleted: thing_z_misprediction_test_04.wad
2012-04-06 05:28unknownnaFile Deleted: ItemRespawnDesynchTest3.wad
2012-04-06 05:28unknownnaFile Deleted: thing_z_misprediction_test_03.wad
2012-04-06 05:28unknownnaFile Deleted: thing_z_misprediction_test_01.wad
2012-04-06 05:30unknownnaSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=1645#r1645
2012-04-07 16:07Torr SamahoSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=1665#r1665
2012-04-07 16:08Torr SamahoNote Added: 0003174
2012-04-07 20:37Edward-sanNote Added: 0003177
2012-04-08 05:55unknownnaNote Added: 0003178
2012-04-08 05:56unknownnaNote Deleted: 0003094
2012-04-08 05:57unknownnaNote Deleted: 0001958
2012-04-08 05:57unknownnaNote Edited: 0001874bug_revision_view_page.php?bugnote_id=1874#r1666
2012-04-08 10:57Edward-sanNote Added: 0003181
2012-04-08 14:01Torr SamahoNote Added: 0003182
2012-04-08 20:52unknownnaFile Added: thingz_spawnrespawn_04.wad
2012-04-08 20:55unknownnaSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=1669#r1669
2012-04-08 21:15unknownnaFile Added: thingz_spawnrespawn_05.wad
2012-04-08 21:18unknownnaSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=1670#r1670
2012-04-08 21:18unknownnaFile Deleted: thingz_spawnrespawn_03.wad
2012-04-08 21:18unknownnaFile Deleted: thingz_spawnrespawn_04.wad
2012-04-08 21:32unknownnaNote Added: 0003183
2012-04-08 22:37Edward-sanNote Added: 0003186
2012-04-08 23:13unknownnaFile Added: thingz_spawnrespawn_06.wad
2012-04-08 23:17unknownnaNote Added: 0003187
2012-04-08 23:33unknownnaNote Edited: 0003187bug_revision_view_page.php?bugnote_id=3187#r1672
2012-04-09 11:39Torr SamahoNote Added: 0003191
2012-04-09 16:47unknownnaNote Added: 0003192
2012-04-09 17:29unknownnaFile Deleted: thingz_spawnrespawn_05.wad
2012-04-09 17:29unknownnaSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=1675#r1675
2012-04-10 03:43unknownnaNote Added: 0003195
2012-04-10 04:25unknownnaNote Edited: 0003195bug_revision_view_page.php?bugnote_id=3195#r1684
2012-04-10 04:58unknownnaFile Added: thingz_spawnrespawn_07.wad
2012-04-10 08:01unknownnaFile Added: thingz_spawnrespawn_08.wad
2012-04-10 08:01unknownnaFile Deleted: thingz_spawnrespawn_07.wad
2012-04-10 08:11unknownnaFile Deleted: thingz_spawnrespawn_08.wad
2012-04-10 08:12unknownnaFile Added: thingz_spawnrespawn_08.wad
2012-04-10 08:12unknownnaFile Deleted: thingz_spawnrespawn_06.wad
2012-04-11 01:23Torr SamahoNote Added: 0003200
2012-04-11 01:24Torr SamahoNote Edited: 0003200bug_revision_view_page.php?bugnote_id=3200#r1697
2012-04-11 01:24Torr SamahoNote Revision Dropped: 3200: 0001696
2012-04-11 19:42unknownnaNote Added: 0003210
2012-04-11 19:50unknownnaSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=1705#r1705
2012-04-11 23:09Torr SamahoNote Added: 0003212
2012-04-12 00:33unknownnaNote Added: 0003216
2012-04-12 00:34unknownnaNote Edited: 0003216bug_revision_view_page.php?bugnote_id=3216#r1711
2012-04-12 05:23unknownnaRelationship addedrelated to 0000765
2012-04-13 00:16unknownnaNote Edited: 0003216bug_revision_view_page.php?bugnote_id=3216#r1719
2012-04-14 04:42unknownnaNote Added: 0003242
2012-04-15 23:18unknownnaNote Added: 0003310
2012-04-15 23:18unknownnaNote Edited: 0003310bug_revision_view_page.php?bugnote_id=3310#r1758
2012-04-16 01:19Torr SamahoNote Added: 0003315
2012-04-16 12:19unknownnaRelationship addedparent of 0000787
2012-04-16 22:11unknownnaRelationship deletedparent of 0000787
2012-04-17 02:54unknownnaRelationship addedparent of 0000789
2012-06-09 13:22Torr SamahoCategoryGeneral => Bug
2016-06-10 10:14Edward-sanRelationship addedparent of 0002753
2016-06-11 15:44Edward-sanNote Added: 0015072
2016-06-11 17:02Edward-sanNote Edited: 0015072bug_revision_view_page.php?bugnote_id=15072#r9128
2016-06-18 03:37WaTaKiDNote Added: 0015091
2016-07-19 15:18Ru5tK1ngNote Added: 0015395
2016-07-19 16:05Ru5tK1ngNote Added: 0015396
2016-08-18 00:46Ru5tK1ngNote Added: 0015465
2016-08-18 09:03Edward-sanNote Added: 0015474
2016-08-18 09:04Edward-sanNote Edited: 0015474bug_revision_view_page.php?bugnote_id=15474#r9414
2016-08-18 15:18Ru5tK1ngRelationship addedparent of 0002810
2016-10-18 18:07unknownnaFile Added: thingz_spawnrespawn_09.wad
2016-10-18 18:37unknownnaNote Added: 0016047
2016-10-18 18:38unknownnaRelationship addedparent of 0001997
2016-12-04 11:50Torr SamahoFile Added: itemzpos.wad
2016-12-04 11:50Torr SamahoFile Added: itemzpos2.wad
2016-12-04 11:52Torr SamahoNote Added: 0016413
2016-12-04 23:39Edward-sanNote Added: 0016427
2016-12-04 23:39Edward-sanStatusassigned => needs testing
2017-05-23 04:12Ru5tK1ngNote Added: 0017752
2017-05-23 04:12Ru5tK1ngStatusneeds testing => feedback
2017-05-23 04:14Ru5tK1ngNote Edited: 0017752bug_revision_view_page.php?bugnote_id=17752#r10649
2017-06-04 20:25Ru5tK1ngNote Added: 0017797
2024-03-10 03:22unknownnaRelationship addedparent of 0003426

Notes
(0001845)
Torr Samaho   
2011-07-10 11:42   
This should fix the issue. Unfortunately it required a change in some very basic client side code. Let's hope that it doesn't break anything else. I only tested this in thing_z_misprediction_test_01.wad though.

(0001849)
unknownna   
2011-07-10 12:46   
* The chaingun still respawns into the wrong position. But this also happens offline and in GZDoom 323. If you reconnect, it corrects itself. Most servers have sv_weaponstay set to 1 anyway.

* I noticed some issues in KDiZD. It seems that the bug in 0000479: Thing Z-height misprediction after map resets online is back. The items are desynced both before and after map resets. But they aren't physically desynced. You can still pick up the battery in KDiZD without cheats.
(0001852)
unknownna   
2011-07-10 14:04   
Some items are physically desynced. I noticed it in Z1M8. There are some SOLID barrels that you can jump on. The movement will start to lag on some of the barrels.
(0001854)
Torr Samaho   
2011-07-10 20:18   
Looks like the fix does more harm than good, so I removed it. Can you check if KDiZD works properly again in this build?

> The chaingun still respawns into the wrong position. But this also happens offline and in GZDoom 323.

This sounds like there is an underlying ZDoom problem that needs to be fixed (or at least understood) first. I'm not even sure if the behavior of items that are exactly on a linedef is defined, i.e. in which of the two adjacent sectors is the item supposed to be?
(0001867)
unknownna   
2011-07-10 23:01   
(edited on: 2011-07-11 02:07)
> Can you check if KDiZD works properly again in this build?

Some of the barrels are still desynced (former behavior), but it seems to work properly now.

> This sounds like there is an underlying ZDoom problem that needs to be fixed (or at least understood) first. I'm not even sure if the behavior of items that are exactly on a linedef is defined, i.e. in which of the two adjacent sectors is the item supposed to be?

In the example WAD, the thing's map z-position is 16. If you flip the linedef, the z-position changes to 0.

Offline:

* When the z-position is 16, the thing uses the higher floor value as its base.
* When the z-position is 0, the thing uses the higher floor value as its base.

Online:

* When the z-position is 16, the thing uses the lower floor value as its base.
* When the z-position is 0, the thing uses the higher floor value as its base.

> Looks like the fix does more harm than good, so I removed it.

I understand, but don't underestimate the importance of having this fixed. There's a classic duel map in Duel32 (DWELLER 2: MAP11) where you can see this bug. According to the duelers that I've spoken with, it would be great to have this issue resolved before 98e.

(0001870)
Torr Samaho   
2011-07-10 23:13   
First let me say that as far as I can say the only difference between the online and offline behavior is where the client displays the weapon. The actual position on the server should be the same online and offline. Actually, the client even spawns the weapon at the correct position, but it thinks that it is in the lower sector and thus on the client the weapon falls down to the lower sector's height.

Furthermore, the offline behavior for the initial spawn and respawning is different even in ZDoom and I'm pretty sure that this ZDoom problem also causes the client side display problem. So it's not really a good idea to find a solution for the client side display problem without resolving the ZDoom issue first.


> I understand, but don't underestimate the importance of having this fixed.

Well, isn't this broken since forever?
(0001872)
unknownna   
2011-07-10 23:27   
> First let me say that as far as I can say the only difference between the online and offline behavior is where the client displays the weapon.

Exactly. Depending on which z-position the thing uses, the thing is displayed either on the higher floor, or on the lower floor.

> Well, isn't this broken since forever?

Probably. FYI, it works as expected online in ZDaemon.
(0001873)
Torr Samaho   
2011-07-10 23:31   
> The chaingun still respawns into the wrong position. But this also happens offline and in GZDoom 323.

Can somebody check if this also happens in the latest ZDoom version and if so, make a bug report over there?
(0001874)
unknownna   
2011-07-10 23:53   
(edited on: 2012-04-08 05:57)
> Can somebody check if this also happens in the latest ZDoom version

* The chaingun doesn't respawn into the floor in ZDaemon 1.08.08b.
* The chaingun doesn't respawn into the floor in Odamex 0.5.3.
* The chaingun respawns into the floor in GZDoom 323.
* The chaingun respawns into the floor in ZDoom 2.5.0.
* The chaingun respawns into the floor in ZDoom SVN build 3263.
* The chaingun doesn't respawn into the floor in Chocolate Doom 1.6.0.

(0001879)
unknownna   
2011-07-11 01:55   
> Can somebody check if this also happens in the latest ZDoom version and if so, make a bug report over there?

'http://forum.zdoom.org/viewtopic.php?f=2&t=30285 [^]'
(0002911)
Torr Samaho   
2012-03-27 02:26   
ZDoom fixed this in revision 3484. Unfortunately, even with the fix (just backported it to test), the item is still at the wrong position for newly connecting clients (actually it is spawned at the correct position but then falls down). I'll investigate this further.
(0002912)
TIHan   
2012-03-27 02:30   
You can also notice this in Doom 2 map01 at the very beginning, the right zombieman is a little in the ground. I remember trying to do this, I sent the floorz over - which it is almost correct! Sadly, it was still off a bit. Hope this helps though.
(0002913)
Torr Samaho   
2012-03-27 02:33   
(edited on: 2012-03-27 02:57)
I think I found a way to fix this, but have no idea if it breaks anything else. Would be nice if somebody can test this binary and see if things spawn / respawn at the proper position. In particular, it's interesting if there are any problems with 3D floors.

EDIT: The change I made doesn't seem to have any effect on the Zombieman in Doom 2 MAP01.

(0002915)
TIHan   
2012-03-27 05:33   
> The change I made doesn't seem to have any effect on the Zombieman in Doom 2 MAP01.

Darn. Do you think it is a similar issue? The zombieman does sink into the ground near the edge of that linedef..

Also, I haven't noticed anything unusual with your binary, yet. I'll give you another update on it soon.
(0002917)
unknownna   
2012-03-27 17:05   
> Would be nice if somebody can test this binary and see if things spawn / respawn at the proper position.

I just did a quick test with this and can tell that the issues in KDiZD are back. However, this time the pre- and post-map reset heights are consistent with one another. It's only a visual desync. But the example WAD seems to be working as intended now.

> The change I made doesn't seem to have any effect on the Zombieman in Doom 2 MAP01

It's probably a ZDoom issue since the zombieman respawns into the floor offline if sv_monsterrespawn is 1.
(0002946)
Torr Samaho   
2012-03-28 02:00   
Since there is still a problem with the zombieman in ZDoom, I reverted the changes for the time being and wait for ZDoom to fix this.
(0002956)
Edward-san   
2012-03-28 09:28   
Fixed by randy.
(0002959)
Torr Samaho   
2012-03-28 11:30   
Hmm, does anybody know whether he intentionally commented out pr_nightmarerespawn?
(0002988)
unknownna   
2012-03-29 08:41   
'http://zdoom.org/Changelog/3488/files [^]'

* Restore randomization of monster respawn times accidentally taken out in r3485.
(0003108)
Torr Samaho   
2012-04-02 02:12   
I think I managed to fix the thing_z_misprediction_test_01.wad issues and the initial Zombieman spawn position now (Randy's monster respawn fix is not in yet, so don't test respawning monsters yet). Here is a new testing binary. I didn't test the KDiZD issues. If anything is broken there (or elsewhere), can you please make a minimal example wad?
(0003109)
unknownna   
2012-04-02 03:18   
thing_z_misprediction_test_01.wad : OK
thing_z_misprediction_test_02.wad : OK
KDiZD : OK
0000380: Teleporters on 3d floors problem : OK
0000425: Desynch upon item respawn when said item started out sitting on top of a 3D floor : Broken

> If anything is broken there (or elsewhere), can you please make a minimal example wad?

There are example WADs in the ticket above. I'll create a new example WAD for the barrel issue.

BTW: Does A_Respawn also use Doom's buggy PointOnSide behavior? It seems that it doesn't, which in turn causes it to desync online when the ExplosiveBarrel actors respawn if sv_barrelrespawn is 1.
(0003112)
Torr Samaho   
2012-04-02 11:30   
(edited on: 2012-04-02 12:52)
3DFloorDesyncTest.wad now also seems to be broken offline, so I guess this is a ZDoom bug. Can you check the latest ZDoom version?

> Does A_Respawn also use Doom's buggy PointOnSide behavior? It seems that it doesn't, which in turn causes it to desync online when the ExplosiveBarrel actors respawn if sv_barrelrespawn is 1.

A_Respawn works differently, you only get desyncs when server and client use different spawn methods.

EDIT: ItemRespawnDesynchTest2.wad seems to be consistently broken online and offline. So it's possibly the same problem.

EDIT2: I suspect that the nightmare monster respawning on 3D floors has the same problems in ZDoom as the items have (didn't test this though) and that this possibly needs to be fixed separately (like it needed two separate fixes in ZDoom before).

(0003113)
unknownna   
2012-04-02 12:54   
> 3DFloorDesyncTest.wad now also seems to be broken offline, so I guess this is a ZDoom bug. Can you check the latest ZDoom version?

[3504] Barrels respawn into wrong positions
[3504] Things on 3D floors respawn into wrong positions
(0003114)
unknownna   
2012-04-02 13:32   
> I suspect that the nightmare monster respawning on 3D floors has the same problems in ZDoom as the items have (didn't test this though) and that this possibly needs to be fixed separately (like it needed two separate fixes in ZDoom before).

It seems that monsters on 3D floors don't respawn at all.

[3504] Monsters on 3D floors don't respawn at all
(0003115)
unknownna   
2012-04-02 16:15   
There's also a new ST desync: Clients think that things fall through 3D floors. I noticed it in Zombie Horde. I created a new example WAD. It has 2 barrels. One of them (red barrel) uses A_Chase + Speed 0 to correct itself, but the other one (brown barrel) simply falls through the 3D floor locally.
(0003116)
Torr Samaho   
2012-04-02 23:28   
(edited on: 2012-04-02 23:29)
I'm pretty sure the zhbarrel_desync_test_01.wad problem is caused by the fact that I used ZDoom's 3D floor incompatible monster respawn fix to fix the spawn problems on the client. We'll have to wait for the ZDoom issues to fixed before we can continue to work on this.

BTW: A joint example wad that combines the different spawn problems in a single area would be very helpful to check all known issues at once.

(0003120)
Edward-san   
2012-04-03 10:37   
All the bugs reported by unknownna are fixed by randy in zdoom.
affected revisions: 3509, 3510, 3514.
(0003121)
Torr Samaho   
2012-04-03 11:33   
Since all the fixes are separate let's try to fix this stuff step by step. This should hopefully fix the initially spawning positions and the respawning for items (not for monsters or barrels).
(0003122)
unknownna   
2012-04-03 15:45   
> This should hopefully fix the initially spawning positions and the respawning for items (not for monsters or barrels).

* Items desync after "changemap" map changes online.
* It seems that if you pick up any items before a map reset, they'll desync. This also happens offline.
* If you pick up the health bonus in the new example WAD, it'll respawn into the wrong position. This also happens offline.

> A joint example wad that combines the different spawn problems in a single area would be very helpful to check all known issues at once.

I agree. I created a new example WAD.

BTW:'http://zdoom.org/Changelog/3513/files [^]'

* Make DF2_BARRELS_RESPAWN work in all game modes without the need for alwaysapplydmflags.
(0003128)
Torr Samaho   
2012-04-04 00:25   
(edited on: 2012-04-04 00:27)
> It seems that if you pick up any items before a map reset, they'll desync. This also happens offline.

What do you mean by desyncing offline? When I talk about desyncing I mean a situation where clients and server disagree on something, i.e. the position of a thing on client and server is different. Offline there is nobody to disagree with.

> If you pick up the health bonus in the new example WAD, it'll respawn into the wrong position. This also happens offline.

Can you test if this works in ZDoom?

(0003131)
unknownna   
2012-04-04 01:35   
(edited on: 2012-04-04 01:58)
> What do you mean by desyncing offline? When I talk about desyncing I mean a situation where clients and server disagree on something, i.e. the position of a thing on client and server is different. Offline there is nobody to disagree with.

I should have been more clear. What I mean is that the things' initial spawn position changes after map resets if you pick them up just before the map reset takes place. It seems to happen if you destroy the barrels too. Monsters seem to be affected too.

> Can you test if this works in ZDoom?

I'll have to wait till a new SVN build is available for testing (FYI, it works fine in build 3504).

(0003132)
Edward-san   
2012-04-04 10:07   
(edited on: 2012-04-04 10:52)
> If you pick up the health bonus in the new example WAD, it'll respawn into the wrong position. This also happens offline.
It's still not working in zdoom with latest svn. I'll report there.

[edit]Done.

(0003151)
unknownna   
2012-04-06 05:22   
> Done.

Thanks.

'http://zdoom.org/Changelog/3518/files [^]'

* Fixed: A_Respawn and P_NightmareRespawn() should not check for collision with world geometry. The initial spawn did not, so this can prevent respawns of things that were initially spawned if they happen to intersect a wall.
* Fixed: Don't respawn actors inside the floor.
* Fixed: The final calls to P_FindFloorCeiling() in P_NightmareRespawn() and A_RestoreSpecialPosition also need to pass true as the second parameter. (Because this parameter is onlyspawnpos, not onlymidtex.)
(0003174)
Torr Samaho   
2012-04-07 16:08   
Did somebody confirm that all the problems are really fixed in ZDoom now? I backported the fixes (except for A_Respawn, needs to be done later) and offline the invisibility sphere falls into the 3D floor after respawning. Can somebody check this in ZDoom?
(0003177)
Edward-san   
2012-04-07 20:37   
It happens also in zdoom. Reported there.
(0003178)
unknownna   
2012-04-08 05:55   
'http://zdoom.org/Changelog/3542/files [^]'

* Added another flag to P_FindFloorCeiling() to get it to do its standard processing but without resetting the actor's sector. The 3D floor checks in P_NightmareRespawn() and A_RestoreSpecialPosition now use this.
* Fixed: P_NightmareRespawn() did its Z clamping before checking for 3D floors.
* Fixed: Respawning actors were not clamped to the ceiling.
(0003181)
Edward-san   
2012-04-08 10:57   
Found another problem in zdoom with that change. I posted it in the same thread.
(0003182)
Torr Samaho   
2012-04-08 14:01   
One wonders if Randy ever tested that example wad...
(0003183)
unknownna   
2012-04-08 21:32   
> One wonders if Randy ever tested that example wad...

The example wad had too long respawn times so he used another example wad.

'http://zdoom.org/Changelog/3545/files [^]'

* Fixed: Do not interpolate from an actor's despawned position to its spawned position when it respawns.
* Use doubles instead of floats, as appropriate, in PIT_FindFloorCeiling().
* Fixed: The second call to P_FindFloorCeiling() in A_RestoreSpecialPosition and P_NightmareRespawn() must only consider 3D floors and midtexes.

Apparently there were some crashes related to the new changes.

'http://zdoom.org/Changelog/3543/files [^]'

* Fixed crash when teleporting. P_TeleportMove() must not pass FFCF_ONLYSPAWNPOS to P_GetFloorCeilingZ(). I got confused because its bool parameter's meaning had been the opposite of P_FindFloorCeiling()'s bool parameter before they got changed to flags.
(0003186)
Edward-san   
2012-04-08 22:37   
is it working the respawn for 3d midtextures?
(0003187)
unknownna   
2012-04-08 23:17   
(edited on: 2012-04-08 23:33)
> Is it working the respawn for 3d midtextures?

Not in SVN build 3542.

Edit:

It crashes in SVN build 3545.

(0003191)
Torr Samaho   
2012-04-09 11:39   
Except for the A_Respawn changes (still need to work on this), I backported all the ZDoom z fixes up to revision 3547. I think there are still z problems with 3d midtextures. Here is a new binary. Ignore the barrel problems, that's because the A_Respawn changes are still missing.
(0003192)
unknownna   
2012-04-09 16:47   
> Here is a new binary.

It seems to be working as intended. The changemap and map reset desyncs are gone it seems.

> I think there are still z problems with 3d midtextures.

You're right. I created a new bug report.
(0003195)
unknownna   
2012-04-10 03:43   
(edited on: 2012-04-10 04:25)
'http://www.zdoom.org/Changelog/3548/files [^]'

* Fixed: The onlyspawnpos handling in P_FindFloorCeiling would fail to adjust an actor's floorz (and related) to a 3D midtex beneath its Z if it also touched a 3D midtex above its Z.

'http://www.zdoom.org/Changelog/3549/files [^]'

* Only adjust the ceiling position of solid actors in A_RestoreSpecialPosition.

'http://www.zdoom.org/Changelog/3550/files [^]'

* Use 3D midtexture restrictions when respawning actors.

Edit:

It seems that 3D floors are affected by the same issues, so I hope that Randy's fixes took care of them.

(0003200)
Torr Samaho   
2012-04-11 01:23   
(edited on: 2012-04-11 01:24)
Unfortunately we are reaching the limits of what is feasible to backport. Some of the previous patches were already very cumbersome to backport, but 3548 is more or less infeasible. It is intertwined with 3490 which itself is intertwined with the merging of ZDoom's polyobj branch into the main trunk. Since I really don't want to backport the polyobj branch to 98e, I consider removing all the recent z-fix backports and postponing all of this till 98e is finished.

(0003210)
unknownna   
2012-04-11 19:42   
> Since I really don't want to backport the polyobj branch to 98e, I consider removing all the recent z-fix backports and postponing all of this till 98e is finished.

Fair enough, we can postpone this, but don't remove the current fixes. They don't break anything and the chaingun respawn problem is gone. So things look more polished and professional now compared to 98d. We can consider complex spawn/respawn situations on 3D floors/midtextures to be unsupported in ST for the time being since they weren't supported in ZDoom even until now.

As for the barrel issues: The most important thing is to avoid physical desyncs since they screw up the client prediction in terms of player movement.

BTW: I found some new issues in ZDoom with the latest example wad. I created a new bug report.
(0003212)
Torr Samaho   
2012-04-11 23:09   
> Fair enough, we can postpone this, but don't remove the current fixes. They don't break anything and the chaingun respawn problem is gone.

Well, they don't seem to break anything for now, but I'm not too sure if they break things we don't know yet. The necessary client side change is in a very basic function and can affect every spawn the server instructs the clients to do. Not to mention the effects all of Randy's fixes may have. How thoroughly did you test this binary?
(0003216)
unknownna   
2012-04-12 00:33   
(edited on: 2012-04-13 00:16)
> How thoroughly did you test this binary?

I tested it with the example wad, Duel32, KDiZD, IDL2012, AOW2 (found a separate weapon issue), WhoDunIt (the client crashed after a map change, but I couldn't reproduce the crash) and Zombie Horde.

(0003242)
unknownna   
2012-04-14 04:42   
'http://www.zdoom.org/Changelog/3562/files [^]'

* In P_SpawnMapThing(), pass the same flags to P_FindFloorCeiling() as the respawn functions do.
* Rename FFCF_3DMIDTEXRESTRICT to FF_3DRESTRICT and make it work with 3D floors too.
(0003310)
unknownna   
2012-04-15 23:18   
The example WAD is now broken in the latest beta build. The zombieman, chaingun and barrel actors spawn into the wrong positions on the client online. And they also respawn incorrectly, but when they respawn, the client and server are in sync with one another. And this bug has returned as well:

Quote from unknownna
What I mean is that the things' initial spawn position changes after map resets if you pick them up just before the map reset takes place. It seems to happen if you destroy the barrels too. Monsters seem to be affected too.

It worked fine in 120409-1130M. The only thing that didn't work properly there was the barrel respawn. The client didn't respawn the barrels with the same z height as the server.

(0003315)
Torr Samaho   
2012-04-16 01:19   
The partial fixes I made are not included in the new build (they are in the repository under a bookmark, but I'm still hesitant to include them since they may have far reaching consequences).
(0015072)
Edward-san   
2016-06-11 15:44   
(edited on: 2016-06-11 17:02)
I went ahead and made these changesets which should fix the bugs here:

'https://bitbucket.org/zandronum/zandronum-sandbox/commits/b8ba754f558fa1b654ec0365f7f50151834967ab [^]'
'https://bitbucket.org/zandronum/zandronum-sandbox/commits/ecb8946e8581c07e92f1c01ce5d5de7ea83833e8 [^]'
'https://bitbucket.org/zandronum/zandronum-sandbox/commits/1b111ca440bf6b4bb9ec51f040f70bf379d0fc63 [^]'

I forgot to mention, but the third one fixes a bug with the barrel on the ceiling in the example wad, which seems to instantly fall down for clients if it's shoot by a player.

(0015091)
WaTaKiD   
2016-06-18 03:37   
this 3.0 build contains the above 3 commits:'https://www.dropbox.com/s/fr0e9h5to2f3x0j/zandronum-3.0-r160611-1518-1b111ca-windows.zip?dl=0 [^]'
(0015395)
Ru5tK1ng   
2016-07-19 15:18   
That build fixed an issue online where items too close to a wall would float in the sky as noted here: 'http://zandronum.com/tracker/view.php?id=2753 [^]'

I noticed this bug on map02 online and the build did fix it. There's still a few more things needing testing though.
(0015396)
Ru5tK1ng   
2016-07-19 16:05   
Alright, going off of the example wad, I used the above build.

*Everything spawned at the correct height when the map first loads.
*Using the switch to reset the map correctly spawned everything at the right height.
*Everything spawned correctly through changemap and survival countdown.
*With itemrespawn on and weaponstay off, the chainguns, health bonus and sphere respawned at the correct z-height.
*Actor heights were correct, I could jump over and stand on various actors.

However,

The only issue was the barrels. After setting them to respawn, some would spawn and fall to the ground. Here are the only instances:


'http://i.imgur.com/jRQFUwE.png [^]'
'http://i.imgur.com/CKN2cES.png [^]'

I haven't taken a look at the testmap in Doombuilder, but by looks of the screenshots, the barrels have problems spawning on or too close to ledges regardless if the ledge is a 3D floor or not.
(0015465)
Ru5tK1ng   
2016-08-18 00:46   
Once, the barrels are fixed, it is safe to bet that all issues related to Z-Height would be resolved.
(0015474)
Edward-san   
2016-08-18 09:03   
(edited on: 2016-08-18 09:04)
Urgh, the barrel respawn is handled quite differently by zandronum online. The fix requires a bit of rewrite..

p.s. can you make a new ticket with the barrel issue? That would help with organizing the needed work for the fix.

(0016047)
unknownna   
2016-10-18 18:37   
While I was gone, a RandomSpawner bug was found and fixed. Unfortunately it still needs to be fixed for 3D floor/midtexture combinations. I made a bug report over at the ZDoom forums:

RandomSpawner needs consistent spawn/respawn behavior too
(0016413)
Torr Samaho   
2016-12-04 11:52   
I attached two example wads from Zalewa's recent pull requests.
(0016427)
Edward-san   
2016-12-04 23:39   
Thanks to Zalewa we have a generic fix for this and other related tickets added to 3.0 upstream:'https://bitbucket.org/Torr_Samaho/zandronum/commits/0e94c4d68a1fdd0f4859f2a7952ef4688e00c32a [^]' . This must be tested to see if nothing else is broken.
(0017752)
Ru5tK1ng   
2017-05-23 04:12   
(edited on: 2017-05-23 04:14)
I had tested the child tickets long ago and they were fine. However, I tried the most current versions of both example wads provided above and I found some weird z height handling.

In the following gallery, the 1st picture for each spot in the map is how the items first spawn when the map loads. The 2nd picture is after the floor changes height as designed in the map. The 3rd image is when the item respawns.

The chainguns are the randomspawner issue unknownna reported in this topic:'https://forum.zdoom.org/viewtopic.php?f=2&t=53861 [^]'

Gallery: Imgur Link

The question is, is this good enough? As Graf said, you can only do so much for something as screwy as these example wads before the positioning behavior gives up. Honestly, putting things that close and awkwardly placed to ledges is just bad mapping anyway. These instances were all the issues I found throughout the child tickets and test wads. I would call this ticket a day since unless someone else disagrees.

The barrels are their own separate issue/ticket btw.

(0017797)
Ru5tK1ng   
2017-06-04 20:25   
Ahh, it seems after double checking as Torr suggested, I found out the highlighted issues are also different for other newly connected clients.

In the gallery:'http://imgur.com/a/HcJon [^]'

If client 1 hits the switches, it sees the 2nd placement for each spot. But newly connected clients see the 3rd placement for each spot after the switch press. I modified the lift heights and it seems client 1's placement is the correct one on the server while client 2's is wrong.