EpicSurvivalGame icon indicating copy to clipboard operation
EpicSurvivalGame copied to clipboard

Inconsistent player spawn behaviour

Open Zenahr opened this issue 4 years ago • 3 comments

When joining a session from the Main Menu, new players are spawned with the SpectatorPawn class. In contrast, when starting the networked session from one of the playable maps directly, this is not the case.

I've dug almost all Classes (GameMode, GameState, SCoopGameMode, SGameState, the Level Blueprint, SPlayerStart and a bunch more...)

I can't find the code that handles which Pawn is being spawned and possessed by newly joined players. Any pointers for me?

Zenahr avatar Jan 25 '21 03:01 Zenahr

I have the exact same issue as you. I created a dedicated server, first client that connects to server spawns as a player, rest spawn as a spectator. I am wondering if spawn at team member feature that was added lil while back is the culprit. I have spent countless hours today trying to figure out why any players after the first one is spawned as spectator, will try to revert the buddy spawn feature tomorrow and see if that helps

Edit: Running multiplayer on PIE and standalone works just fine but not on packaged version

SlackingVeteran avatar Apr 06 '21 07:04 SlackingVeteran

I have the exact same issue as you. I created a dedicated server, first client that connects to server spawns as a player, rest spawn as a spectator. I am wondering if spawn at team member feature that was added lil while back is the culprit. I have spent countless hours today trying to figure out why any players after the first one is spawned as spectator, will try to revert the buddy spawn feature tomorrow and see if that helps

Edit: Running multiplayer on PIE and standalone works just fine but not on packaged version

I've managed to fix it by commenting out a couple lines. The way spectators are implemented inside Unreal's GameplayFramework is kinda scuffed so I'd rather roll my own or as I did just turn it off. I'll see if I can find the lines I commented out and post it here (dirty fix).

Zenahr avatar Apr 08 '21 05:04 Zenahr

I've managed to fix it by commenting out a couple lines. The way spectators are implemented inside Unreal's GameplayFramework is kinda scuffed so I'd rather roll my own or as I did just turn it off. I'll see if I can find the lines I commented out and post it here (dirty fix).

Would be great if you could find out what lines you commented out.

Also while running in editor mode I see pawns are created dynamically and possessed but just like you mentioned in original comment I havent been able to figure out where its handled

SlackingVeteran avatar Apr 08 '21 13:04 SlackingVeteran