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.
Players 5-8 don't have a PlayerPawn in PlayerEntered event
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.
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.
- NicoTheGoat
- Posts: 17
- Joined: Sun Dec 29, 2019 6:36 pm
- Contact:
Players 5-8 don't have a PlayerPawn in PlayerEntered event
- Attachments
-
PlayerPawnTest.pk3- (664 Bytes) Downloaded 80 times
- phantombeta
- Posts: 2188
- Joined: Thu May 02, 2013 1:27 am
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia with Vulkan support
- Location: Brazil
Re: Players 5-8 don't have a PlayerPawn in PlayerEntered eve
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.
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.
- Marisa the Magician
- Banned User
- Posts: 3886
- Joined: Fri Feb 08, 2008 9:15 am
- Preferred Pronouns: She/Her
- Operating System Version (Optional): (btw I use) Arch
- Graphics Processor: nVidia with Vulkan support
- Location: Vigo, Galicia
- Contact:
Re: Players 5-8 don't have a PlayerPawn in PlayerEntered eve
Doesn't PlayerRespawned do that already?
- 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: Players 5-8 don't have a PlayerPawn in PlayerEntered eve
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.
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.
- Graf Zahl
- Lead GZDoom+Raze Developer

- Posts: 49252
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Players 5-8 don't have a PlayerPawn in PlayerEntered eve
One thing is clear: Changing this event will cause even worse problems in mods using it, there have been other reports of PlayerEntered not doing what should be expected. I think it needs to be deprecated and replaced - but I don't really know how to do that without creating a mess because when Voodoo dolls spawn they are just regular players and get voodoo-fied only later when another PlayerPawn with the same number is spawned.