Multiplayer Spawn Bug

Really appreciate your help.
Even when I only spawn the pawn and posses it the problem occurs.
Already had timedilation, timeline and so on, disconnected but didn´t help.
The doonce on TellPSYouDied was obsolete and I removed it already.

Here are some updates on the respawn execution:

If Player Takes Damage (Always Dies If He Takes Damage)

Then:

Transferred the player spawning etc. to the PlayerState:

In Pawn OnPossess:


**
Now the last step, PlayerController:**

I have a speculation.
The problem is not directly caused by the respawn logic.
More like that the client PlayerController or the Pawn “disconnects”.
Why? Because sometimes the client gets “out of sync” and won´t see the Servers pawn move and the clients pawn is not at the same position as on the server.
But the client sees grenades, bullets and rockets etc. at the correct position, only movement is ****ed up.
If he dies in that state, the bug occurs.

Also this happens:
If he spawns normal:

When he is bugged:

Appears he “disconnects” and is not aware of the servers PalyerController or smth like that. But as said he sees grenades and bullets correctly flying.

Sincerely,
Schmolle

I’m doing basically the same thing in my plugin and I’ve never encountered such a behavior. But I never played a long session.

You’re talking about a “buggy state” and you’re mentioning it might be causing the issue. Do you have more information in that regard? Shouldn’t you be fixing this bug first? What happens in this state? When does it occur?

Try to see if just moving your character on the Server machine removes the buggy state (I’ve already encountered weird behaviors were some server-related stuff would not trigger when doing them on client, and I just “waken up” the server by switching play window and moving his character and everything was working again on client).

I’ll double check what I do in my plugin and update my post with screenshots.

I think I don’t use “Unpossess” nor do I use “Set Owner” (the last should not be needed, as I mentioned earlier it was a test).

What do you do with the previous character that was possessed?

I see you have delay nodes hanging around, adding them did not change anything? This means it’s not about replication delay then.

EDIT: I might talk about awkward solutions but when it comes to Blueprint I often realized there was a part of black magic involved to track bugs down. When found and overcame comes the time to code things properly.

Like when you try to turn something into a Ragdoll or to modify Destructible’s collisions.

I forgot to post these yesterday so here I am :stuck_out_tongue:

As you can see I don’t do anything fancy when respawning a character (this is UE 4.15).

Here is my setup:

  • TAB -> input we listen to on Controller, this says “please respawn with next type of character”
  • SERVER -> destroys your previous pawn, spawns the new one and make you possess it

That’s it. Oh no, there are delay nodes. But I don’t really want to get rid of them as they are not used like real delays here but like a “frame break”. When you use delay of 0 second it asks the code to wait for a frame before starting the next node.

I suggest you try to just cycle characters using nothing but the nodes I’m using to see if it comes from your possession logic or from things around it.

EDIT: Actually there’s a difference in the Collision Method we’re using to spawn our pawn, mine is the wrong one, I’ll change it to “try to adjust, always spawn” and see if it creates a bug on my end.

EDIT2: I do stuff when a character BEGINS PLAY and ON POSSESS but nothing related to ownership / possessing.

I am really sorry for not replying for the past days. Personel matters.

I´ll try your suggestions as soon as I can.

I´m really sorry for my long absence.

I finally found some time and the “bug”!
I had a spawner which at random times spawns an object. The issue was, that I had a timeline update, 10 seconds before it spawns, for refreshing a HUD-Indicator, this seemed to take up all bandwidth and caused the issue.

After that long time not working on the project I lost my tunnelvision and got a fresh look on the problem.
So again, I did really appreciate your help!!! :smiley: