MantisBT - Zandronum
View Issue Details
0001099Zandronum[All Projects] Bugpublic2012-10-04 17:062018-09-30 22:44
NotIvan 
 
normalmajoralways
closedno change required 
1.0 
 
0001099: Certain actors aren't synced properly between the client and server
Attached screenshot. The actors aren't synced between the client and server.
1. zandronum.exe -file upspikes_01.wad -host
2. Connect a client to the server.
It seems to have something to do with the first frame in the spawn state. Here's the DECORATE code:

Actor UpSpikes 32767
{
    Radius 20
    Height 60
    Speed 0
    Mass 9999999
    Scale 0.50
    +FLOORCLIP
    +INVULNERABLE
    +EXTREMEDEATH
    +RANDOMIZE
    +SHOOTABLE
    +NOBLOOD
    +NODAMAGE
    Obituary "%o was impaled by a spiketrap."
    States
    {
    Spawn:
        SPEA G 30
        SPEA H 2
        SPEA I 2
        SPEA A 0 A_ChangeFlag ("SHOOTABLE", 1)
        SPEA J 2 A_PlaySound ("gen/spear")
        SPEA K 2 A_SetSolid
        SPEA L 2 A_Explode (8,34)
        SPEA M 2
        SPEA N 2 A_Explode (8,34)
        SPEA O 2
        SPEA P 2 A_Explode (8,34)
        SPEA A 2
        SPEA B 2 A_Explode (8,34)
        SPEA C 2
        SPEA D 2 A_Explode (8,34)
        SPEA E 2
        SPEA F 2
        SPEA G 0 A_UnsetSolid
        SPEA A 0 A_ChangeFlag ("SHOOTABLE", 0)
        Loop
    }
}
No tags attached.
related to 0001090closed Torr Samaho HoldAndDestroy state in inventories not working in Zandronum 
? upspikes_01.wad (54,294) 2012-10-04 17:06
/tracker/file_download.php?file_id=782&type=bug
png Screenshot_Doom_20121004_184954.png (76,631) 2012-10-04 17:07
/tracker/file_download.php?file_id=783&type=bug
png
Issue History
2012-10-04 17:06unknownnaNew Issue
2012-10-04 17:06unknownnaFile Added: upspikes_01.wad
2012-10-04 17:07unknownnaFile Added: Screenshot_Doom_20121004_184954.png
2012-10-04 17:07unknownnaStatusnew => confirmed
2012-10-04 17:07unknownnaRelationship addedrelated to 0001090
2012-10-04 17:35unknownnaReporterunknownna => NotIvan
2013-10-06 13:01IvanNote Added: 0007323
2013-10-06 19:41Torr SamahoNote Added: 0007336
2013-10-06 20:06Torr SamahoNote Edited: 0007336bug_revision_view_page.php?bugnote_id=7336#r4091
2013-10-06 20:26Blzut3Note Added: 0007338
2013-10-06 23:11IvanNote Added: 0007339
2013-10-06 23:41Blzut3Note Added: 0007340
2013-10-07 06:06Torr SamahoNote Added: 0007341
2013-10-07 11:42IvanNote Added: 0007343
2013-10-23 19:00ArcoNote Added: 0007458
2013-10-23 19:01ArcoStatusconfirmed => resolved
2013-10-23 19:01ArcoResolutionopen => no change required
2018-09-30 22:44Blzut3Statusresolved => closed

Notes
(0007323)
Ivan   
2013-10-06 13:01   
Was this ever solved?
(0007336)
Torr Samaho   
2013-10-06 19:41   
(edited on: 2013-10-06 20:06)
No, it's still broken. I suspect it has to do with RANDOMIZE, but isn't this flag only meant to be used on projectiles?

EDIT: RANDOMIZE doesn't seem to have any effect here since the spikes are no projectiles.

(0007338)
Blzut3   
2013-10-06 20:26   
Actor's spawned by the level are randomized:
void AActor::LevelSpawned ()
{
    if (tics > 0 && !(flags4 & MF4_SYNCHRONIZED))
        tics = 1 + (pr_spawnmapthing() % tics);
    angle_t incs = AngleIncrements ();
    angle -= angle % incs;
    flags &= ~MF_DROPPED; // [RH] clear MF_DROPPED flag
    HandleSpawnFlags ();

    // [BC] Mark this item as having been spawned on the map.
    ulSTFlags |= STFL_LEVELSPAWNED;
}
(0007339)
Ivan   
2013-10-06 23:11   
But that doesn't explain the screenshots. They weren't spawned by the game on both occassions, were they?
(0007340)
Blzut3   
2013-10-06 23:41   
I assume the level has the actors placed on the map right? That means the initial state will have a random duration between 1-30 causing the behavior seen offline.

I haven't traced through the net code since Torr's question was merely where the randomization is coming from. If I were to guess, it looks like this information isn't transferred to the clients on a net game so they use the full duration of the state causing them to appear to move in sync while they are not on the server.
(0007341)
Torr Samaho   
2013-10-07 06:06   
Thanks, Blzut3! That was exactly what I was looking for and should be enough information for me to fix this. It also seems to show a workaround for his bug you can use till it's fixed in Zandronum: Giving the actors the SYNCHRONIZED flag should get them in sync on client and server.
(0007343)
Ivan   
2013-10-07 11:42   
I didn't even know such a flag existed! Thanks!
(0007458)
Arco   
2013-10-23 19:00   
Quote

[14:33] <@IvanDobrovski> they seem to deal the damage on the right frames now even with RANDOMIZE on them, tested on a project
[14:33] <@IvanDobrovski> so I guess it works, since in the old one it would deal damage without even showing the damaging frames :p
[14:33] <+Arco> Online?
[14:55] <@IvanDobrovski> yeah
[14:55] <@IvanDobrovski> tested online
[14:55] <@IvanDobrovski> well
[14:55] <@IvanDobrovski> local server
[14:55] <@IvanDobrovski> if that counts, since in the old case it wouldnt work even on a local one