[3.1.0] Desync with DoEffect

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Post Reply
User avatar
Matt
Posts: 9696
Joined: Sun Jan 04, 2004 5:37 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Debian Bullseye
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
Contact:

[3.1.0] Desync with DoEffect

Post by Matt »

Test code:

Code: Select all

class Invticker:Inventory{
    default{
        inventory.maxamount 100;
    }
    override void DoEffect(){
//    override void Tick(){super.Tick();
        if(amount>0){
            amount--;
        }
    }
}
class Invgetter:Demon{
    states{
    melee:
        SARG EF 8 A_SetTics(random(7,9));
        SARG G 10{
            int b=target.countinv("Invticker");
            A_LogInt(b);
            for(int i=0;i<b;i+=10){
                spawn("Blood",pos+(random(-1,1),random(-1,1),50));
            }
        }goto see;
    }
} 
Start a netgame, summon an Invgetter, give yourself 100 Invticker and let the Invgetter chew on you. The numbers logged will be different for each player.

If I replace DoEffect() with Tick() (as shown in the commented-out line), it's fine.


I suspect it's related to why an RNG call would also cause problems (and why I couldn't replicate it in vanilla - the isolated example didn't have anything that another actor would depend on for anything affecting the playsim).
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: [3.1.0] Desync with DoEffect

Post by Graf Zahl »

Is there anyone who can test this? I only got one computer so I'm a bit out of luck here...
XxMiltenXx
Posts: 219
Joined: Wed Jan 08, 2014 8:40 am
Graphics Processor: nVidia with Vulkan support
Location: Germany

Re: [3.1.0] Desync with DoEffect

Post by XxMiltenXx »

I tested it on one computer (started GZDoom twice and connected to my own game via batch file).

I can confirm this bug, however it is related to the "Movement Prediction" setting. If it is "On", it'll show the "Out Of Sync"-Error. If it is turned "Off", it will work as intended.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: [3.1.0] Desync with DoEffect

Post by Graf Zahl »

Thanks for that bit of info. It's really too bad that the entire prediction stuff was more or less hacked in so there's probably multiple places where stuff gets executed that should not. I'll try to do a fix for this later and would appreciate if you could check again afterward.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: [3.1.0] Desync with DoEffect

Post by Graf Zahl »

Should be fixed, but I cannot test it myself.
User avatar
Matt
Posts: 9696
Joined: Sun Jan 04, 2004 5:37 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Debian Bullseye
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
Contact:

Re: [3.1.0] Desync with DoEffect

Post by Matt »

Confirmed the above test no longer desyncs.
Post Reply

Return to “Closed Bugs [GZDoom]”