[Fixed] [3.1.0] Desync with DoEffect

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

[3.1.0] Desync with DoEffect

Postby Matt » Sun Aug 13, 2017 11:00 am

Test code:
Code: Select allExpand view

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
Matt
Putting the XD into *xdeath since 2007
 
Joined: 04 Jan 2004
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia

Re: [3.1.0] Desync with DoEffect

Postby Graf Zahl » Sun Aug 27, 2017 2:44 am

Is there anyone who can test this? I only got one computer so I'm a bit out of luck here...
User avatar
Graf Zahl
Lead GZDoom Developer
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: [3.1.0] Desync with DoEffect

Postby XxMiltenXx » Sun Aug 27, 2017 10:24 am

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.
XxMiltenXx
 
Joined: 08 Jan 2014
Location: Germany
Operating System: Windows 10/8.1/8 64-bit
Graphics Processor: nVidia with Vulkan support

Re: [3.1.0] Desync with DoEffect

Postby Graf Zahl » Sun Aug 27, 2017 12:24 pm

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 Developer
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: [3.1.0] Desync with DoEffect

Postby Graf Zahl » Sat Sep 02, 2017 12:57 am

Should be fixed, but I cannot test it myself.
User avatar
Graf Zahl
Lead GZDoom Developer
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: [3.1.0] Desync with DoEffect

Postby Matt » Thu Sep 07, 2017 12:19 am

Confirmed the above test no longer desyncs.
User avatar
Matt
Putting the XD into *xdeath since 2007
 
Joined: 04 Jan 2004
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia


Return to Closed Bugs

Who is online

Users browsing this forum: No registered users and 0 guests