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
0001882Zandronum[All Projects] Bugpublic2014-07-09 05:042024-03-20 05:00
Reporterhaxmurderer 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionno change required 
PlatformMicrosoftOSWindowsOS VersionXP/Vista/7
Product Version1.2 
Target VersionFixed in Version 
Summary0001882: A_SetUnsolid desync in multiplayer
DescriptionIf you call A_SetUnsolid on an actor in multiplayer, it causes a player passing through the unsolid actor to have jittery motion. I believe this is because the client and the server disagree about the solidness of the actor. In singeplayer, walking through the unsolid actor is completely smooth and behaves as it should.

I've created a small WAD that demonstrates the issue and it's reproducible 100% of the time.

Thanks!
Hax
Steps To Reproduce1. Create a local server (I launch it from Doomseeker) with the WAD I've attached (unsetsolid_desync.pk3).
2. Launch Zandronum, connect to the server.
3) Shoot the torch a few times and it'll disappear, going into a DECORATE state where A_UnsetSolid and A_UnsetShootable are set.
4) Try to walk through where the torch is (over the red tile). You will notice your player movement becomes jittery.
Additional InformationHere's a paste of the DECORATE from the WAD:
(It's adapted and boiled down from my Survivalism WAD that I'm working on)


Actor ChoppableTree 12345
{
  +SHOOTABLE
  +NOBLOOD
  +SOLID
  
  Mass 0x7FFFFFFF
  Health 20000
  PainChance 256 //100% chance of going into Pain state
  Height 48

  States
  {
      Spawn:
         TNT1 A 0
        SMRT A 0 A_SetSolid
        SMRT A 0 A_SetShootable
        //TNT1 A 0 A_UnhideThing
        SMRT A -1
        Stop
      HealAndSpawn: //Part of regrowing. This state makes inheritance easier.
        TNT1 A 0
        TNT1 A 0 ACS_ExecuteAlways(937) //Heal us. HealThing doesn't have a max in Zandronum 1.2 :(
        TNT1 A 35 A_Jump(256, "Spawn")
      Grow:
        TNT1 A 0 //Dummy frame so A_Jump works
        //TNT1 A 5 A_NoBlocking
        //TNT1 A 0 A_HideThing
        TNT1 A 1 A_UnsetSolid
        TNT1 A 0 A_UnsetShootable
        TNT1 A 0 A_Jump(256, "GrowCheck") //Dynamic dispatch
      GrowCheck:
        TNT1 A 0 //Dummy frame so A_Jump works
        //There's a 1/256 chance that this tree will respawn
        //every second (35 ticks).
        TNT1 A 35 A_Jump(1, "HealAndSpawn")
        TNT1 A 35 A_Jump(256, "GrowCheck")
      Pain:
        TNT1 A 0 //Dummy frame so A_Jump works
        TNT1 A 0 A_JumpIf(health < 20000-200, "Grow") //A_JumpIfHealthLower(20000-200, "Grow") <-- does not work
        TNT1 A 0 A_Jump(256, "Spawn") //A_Jump is evaluated at run-time so this makes inheritance work
        goto Spawn //Weird hack to make the trees not go invisible in multiplayer, Zandro bug?
      Death:
        TNT1 A 0
        Stop
  }
}


Also note that there's a second (BONUS!) bug, which could be related but might not be. If you remove that last "goto Spawn", then try shooting the torch once with the pistol, you'll notice it goes invisible right away, which is NOT what's supposed to happen according to the DECORATE. (It should only go invisible if you damage it for 200 health, which one pistol shot doesn't do.) However, it hasn't actually fully jumped states, as you'll notice that you can still bump into it. So somehow, it's become invisible without becoming unsolid, which is totally not what the DECORATE says should happen. Could this be desync between the client and the server again? (This only happens in multiplayer, not singleplayer!)
Attached Files

- Relationships

-  Notes
User avatar (0009916)
ZzZombo (reporter)
2014-07-09 08:01

-_-
If you remove the last "goto Spawn", it will go to the next instruction, and it is "TNT1 A 0" from the "Death" state, as it should ACCORDING to Decorate, if you read that carefully.
User avatar (0009918)
haxmurderer (reporter)
2014-07-09 13:38

ZzZombo:

        TNT1 A 0 A_JumpIf(health < 20000-200, "Grow") //A_JumpIfHealthLower(20000-200, "Grow") <-- does not work
        TNT1 A 0 A_Jump(256, "Spawn") //A_Jump is evaluated at run-time so this makes inheritance work
        goto Spawn //Weird hack to make the trees not go invisible in multiplayer, Zandro bug?

The line A_Jump(256, "Spawn") should branch with a 100% chance (256/256) if the A_JumpIf doesn't branch. The goto should never, ever get executed.

Am I mistaken in how A_Jump(256, blah) works?

Thanks for taking a look at this!
User avatar (0009927)
ZzZombo (reporter)
2014-07-09 23:28
edited on: 2014-07-10 03:18

You should know that online clients don't do jumps on their own, they await the server to tell them where to go, and until then they just continue, so such desyncs happen occasionally.

User avatar (0023436)
Ru5tK1ng (updater)
2024-03-20 05:00

Coding issue with DECORATE. Adding 'TNT1 A 5' right before 'goto spawn' fixed the issue online.

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: No one explicitly supports this issue yet.
Opponents: No one explicitly opposes this issue yet.

- Issue History
Date Modified Username Field Change
2014-07-09 05:04 haxmurderer New Issue
2014-07-09 08:01 ZzZombo Note Added: 0009916
2014-07-09 13:38 haxmurderer Note Added: 0009918
2014-07-09 23:28 ZzZombo Note Added: 0009927
2014-07-10 03:18 ZzZombo Note Edited: 0009927 View Revisions
2024-03-20 05:00 Ru5tK1ng Note Added: 0023436
2024-03-20 05:00 Ru5tK1ng Status new => closed
2024-03-20 05:00 Ru5tK1ng Resolution open => no change required






Questions or other issues? Contact Us.

Links


Copyright © 2000 - 2025 MantisBT Team
Powered by Mantis Bugtracker