[Fixed] [3bd365f] Multiplayer spawns enabled unconditionally

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

[3bd365f] Multiplayer spawns enabled unconditionally

Postby Marisa Kirisame » Sun Oct 25, 2020 10:51 am

Ever since this commit, multiplayer spawns always happen even if they technically shouldn't.

It's strange though, because looking at the code, this shouldn't be happening.
User avatar
Marisa Kirisame
ZScript Crimester
 
 
 
Joined: 08 Feb 2008
Location: Vigo, Galicia
Discord: 霧雨魔理沙#1666
Twitch ID: magusmarisa
Github ID: OrdinaryMagician
Operating System: Other Linux 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: [3bd365f] Multiplayer spawns enabled unconditionally

Postby Rachael » Sun Oct 25, 2020 2:15 pm

I've confirmed this bug, and also come to the same conclusion.

Nearly all the time mysterious things like this happen it's because of a punctuation error in the code, so I am looking at that closely now.
User avatar
Rachael
Webmaster
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: [3bd365f] Multiplayer spawns enabled unconditionally

Postby Rachael » Sun Oct 25, 2020 2:30 pm

Okay, the problem here is the internal skill definition is somehow taking a "true" value. It is not getting it from reading skill data, either.

The only way I can turn this off is if I force G_SkillProperty(SKILLP_SpawnMulti) to return false instead of reading the internal skill struct.

Beyond that I have not managed to figure out what's going on here. The code to initialize it to false is in place.
User avatar
Rachael
Webmaster
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: [3bd365f] Multiplayer spawns enabled unconditionally

Postby drfrag » Sun Oct 25, 2020 2:40 pm

I've noticed SpawnMulti is missing in 'FSkillInfo::operator='.
User avatar
drfrag
Os voy a romper a pedazos!
Vintage GZDoom Developer
 
Joined: 23 Apr 2004
Location: Spain
Discord: drfrag#3555
Github ID: drfrag666

Re: [3bd365f] Multiplayer spawns enabled unconditionally

Postby Graf Zahl » Sun Oct 25, 2020 2:42 pm

That operator= can probably be removed or defaulted - same as the copy constructor, it comes from a time when this was still close to undefined behavior in some C++ compilers, long before C++11.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: [3bd365f] Multiplayer spawns enabled unconditionally

Postby drfrag » Sun Oct 25, 2020 2:47 pm

Also why the line 'bool spawnmulti = G_SkillProperty(SKILLP_SpawnMulti) || multiplayer;' and not just the skill property?
Then comes:
Code: Select allExpand view
      else if (multiplayer)
      {
         mask = MTF_COOPERATIVE;
      }
      else if (spawnmulti)
      {
         mask = MTF_COOPERATIVE|MTF_SINGLE;
      }
User avatar
drfrag
Os voy a romper a pedazos!
Vintage GZDoom Developer
 
Joined: 23 Apr 2004
Location: Spain
Discord: drfrag#3555
Github ID: drfrag666

Re: [3bd365f] Multiplayer spawns enabled unconditionally

Postby Graf Zahl » Sun Oct 25, 2020 3:02 pm

I missed that when making the change.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: [3bd365f] Multiplayer spawns enabled unconditionally

Postby Rachael » Sun Oct 25, 2020 3:10 pm

drfrag wrote:I've noticed SpawnMulti is missing in 'FSkillInfo::operator='.

Thanks, that fixed it. I'll leave it up to Graf what he wants to do with the operator function.
User avatar
Rachael
Webmaster
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: [3bd365f] Multiplayer spawns enabled unconditionally

Postby drfrag » Sun Oct 25, 2020 5:26 pm

You're welcome.
User avatar
drfrag
Os voy a romper a pedazos!
Vintage GZDoom Developer
 
Joined: 23 Apr 2004
Location: Spain
Discord: drfrag#3555
Github ID: drfrag666


Return to Closed Bugs

Who is online

Users browsing this forum: No registered users and 2 guests