x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Why does RestartGame fail to restart networked clients?

Hello everyone!

I'm currently working on getting the game I'm creating to restart properly, both on the server and on each of the clients. I've tried calling the RestartGame function in my custom GameMode class, and it manages to restart the server, but the clients just freeze and stop working.

Anyone who knows how to restart a networked game and that can help me?

Regards

FreeSirenety

Product Version: Not Selected
Tags:
more ▼

asked May 01 '14 at 05:29 PM in C++ Programming

avatar image

FreeSirenety
151 10 13 20

avatar image apollyonbob Oct 27 '14 at 09:28 PM

I hope you get an answer to this. Mine is worse than freezing, the Editor crashes. Edit I discovered that my PIE was crashing because I was also running the "RestartGame" code on the clients. So that's bad. But I can repro this behavior if I call EndMatch then RestartGame on the server.

avatar image Bozaro Nov 19 '14 at 10:10 AM

I try to investigate this problem and can RestartGame from Editor with single client without dedicated server. Also I create minimal project for reproducing problem and pull my ugly workaround: https://github.com/EpicGames/UnrealEngine/pull/612.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Oh man I might've gotten it!

 GetWorld()->ServerTravel(TEXT("/Game/Maps/Example_Map?listen"), true);

The ?listen is very important - I saw in one of these answers somewhere that it puts the server in listen mode so that the clients can reconnect after it loads the map.

If I have bUseSeamlessTravel true or false, it doesn't seem to matter, nor change the behavior. If I call SeamlessTravel instead of ServerTravel it crashes.

And this was the first time ServerTravel worked for me and didn't crash - but I deleted a debug output ... I think the debug output was causing the crash.

Anyway this worked for me. Good luck.

more ▼

answered Oct 27 '14 at 09:59 PM

avatar image

apollyonbob
53 2 70 12

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question