PlayerEntered event does not fire when adding a new player

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!

PlayerEntered event does not fire when adding a new player

Postby Nash » Sat Mar 14, 2020 2:25 am

In the following scenario:

1) With a mod that has a PlayerEntered event. Player 1 starts a single player game. Event fires off as expected
2) Save the the game, then quit
3) Start a 2 player game, load up the saved game
4) The PlayerEntered event does not fire for Player 2.

My question is if such a scenario is deliberately not supported?
Attachments
PlayerEntered.pk3
(487 Bytes) Downloaded 7 times
Last edited by Nash on Sat Mar 14, 2020 3:54 am, edited 1 time in total.
User avatar
Nash
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Github ID: nashmuhandes

Re: PlayerEntered event does not fire when adding a new play

Postby Rachael » Sat Mar 14, 2020 2:37 am

I don't think lack of support for this is deliberate, however I also don't think it's something easily accounted for. I don't think when the event system was designed, such a scenario ever crossed anyone's mind.

This is yet another way I think that the event system as a whole is showing some of its weaknesses. You really have to account for every little thing, and that's simply not possible because it's really easy to come up with ways that are less conventional - such as this.
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: PlayerEntered event does not fire when adding a new play

Postby Nash » Sat Mar 14, 2020 2:50 am

Should I make a suggestion for this? Probably a new event to ensure compatibility; NewPlayerEntered? PlayerAdded?
User avatar
Nash
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Github ID: nashmuhandes

Re: PlayerEntered event does not fire when adding a new play

Postby Rachael » Sat Mar 14, 2020 2:55 am

I think it's best to report it as a bug., but it will call into question whether the scenario you described should be directly supported or not. (Which is a good thing, don't worry)
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: PlayerEntered event does not fire when adding a new play

Postby Nash » Sat Mar 14, 2020 3:54 am

Added runnable example file, requesting thread moved to Bugs
User avatar
Nash
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Github ID: nashmuhandes

Re: PlayerEntered event does not fire when adding a new play

Postby phantombeta » Sat Mar 14, 2020 9:17 am

I believe this happens for the same reason as this bug report.
I don't think we can trivially change where it's called from without breaking existing mods, so it might be a better idea to have a boolean that indicates whether to use the old behaviour or the new one. Or we could just straight up use the versioning system to choose that, that should work too.
User avatar
phantombeta
In the meadow of sinful thoughts, every flower's a perfect one
 
Joined: 02 May 2013
Location: Brazil, South America, Earth, Orion-Cygnus Arm, Milky Way
Discord: phantombeta#2461
Twitch ID: phantombeta_
Github ID: Doom2fan
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support


Return to Bugs

Who is online

Users browsing this forum: No registered users and 2 guests