Players 5-8 don't have a PlayerPawn in PlayerEntered event

Is there something that doesn't work right in the latest GZDoom? Post about it here.

Moderator: GZDoom Developers

Forum rules
Please construct and post a simple demo whenever possible for all bug reports. Please provide links to everything.

If you can include a wad demonstrating the problem, please do so. Bug reports that include fully-constructed demos have a much better chance of being investigated in a timely manner than those that don't.

Please make a new topic for every bug. Don't combine multiple bugs into a single topic. Thanks!

Players 5-8 don't have a PlayerPawn in PlayerEntered event

Postby NicoTheGoat » Sun Dec 29, 2019 8:29 pm

Affected version: latest stable and dev builds (g4.2.4-m, g4.3pre-569-g703686bee)

In a 5+ player net game, players 5-8 don't have a PlayerPawn in the PlayerEntered event.

Steps to reproduce:
Start a netgame with the attached pk3 and 5 or more clients.
The pk3 will tell you whether each player has a PlayerPawn in the PlayerEntered event, and again in a thinker's PostBeginPlay method.

Expected result:
All players have a PlayerPawn in both PlayerEntered and PostBeginPlay.

Actual result:
Players 1-4 have a PlayerPawn in both PlayerEntered and PostBeginPlay.
Players 5-8 have a PlayerPawn in PostBeginPlay, but don't have one in PlayerEntered.
Attachments
PlayerPawnTest.pk3
(664 Bytes) Downloaded 3 times
User avatar
NicoTheGoat
 
Joined: 30 Dec 2019
Discord: Nico#3419
Github ID: nicothegoat

Re: Players 5-8 don't have a PlayerPawn in PlayerEntered eve

Postby phantombeta » Mon Dec 30, 2019 12:21 am

I don't think this is a bug. This happens on maps where there's not enough player starts to spawn all players immediately, so the excess players get spawned later, possibly on top of the others. (though with temporary "unstucking") PlayerEntered runs long before those players spawn in.
If anything, this was bad choice on the part of whoever added this event. It should've been called from a place where the players are fully spawned already (or when the players actually spawn), but now it's too late to change this without risking breaking existing mods. It's likely a better idea to implement this feature suggestion.
User avatar
phantombeta
In the meadow of sinful thoughts, every flower's a perfect one
 
Joined: 02 May 2013
Location: The United Soviet Socialist Dictatorship of Hueland
Discord: phantombeta#2461
Twitch ID: phantombeta_
Github ID: Doom2fan
Operating System: Windows 10/8.1/8 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Players 5-8 don't have a PlayerPawn in PlayerEntered eve

Postby Marisa Kirisame » Mon Dec 30, 2019 3:11 am

Doesn't PlayerRespawned do that already?
User avatar
Marisa Kirisame
ZScript Magician
 
 
 
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: Players 5-8 don't have a PlayerPawn in PlayerEntered eve

Postby Matt » Tue Dec 31, 2019 5:22 pm

What happens when the level changes?

EDIT: Sticking an A_Log into HD's levelreset() playerpawn function (which is only called in PlayerEntered) I am getting feedback from all 7 bots when I hit the reset button the range. Can't test the very start of the game this way though.
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 Bugs

Who is online

Users browsing this forum: No registered users and 1 guest