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"

Networking roles are different in PIE and packaged project.

So I got this weird behaviour. I post pics to make it easier. alt text On the picture above we got 3 instances of the packaged game. Don't bother with different numbers of the character. What's important is that the first 3 lines (ListenServer) we got remote roles == AutonomousProxy but on clients (4-9 lines) we clearly see that they got one Autonomous and 2 simulated. Is it some kind of bug? I thought that RemoteRole and LocalRole should be exactly the opposite on different machines. alt text On the one above (Play in Editor) It's as I expected to see it. Server got one simulated (character controller by the guy on listen server) and 2 autonomous (controller by the connected players). Why the roles are different in PIE and build .exe? Which one is correct?

EDIT I checked it up on another version of the engine (4.19) and now roles are consistent. But is it correct way? I expected different result. Shouldn't remote roles on the sever be as follows 2x simulatedProxy(for the server controlled actors) and 2x autonomousProxy(for the connected client)

alt text

Here is a tick function on the Character. GetLocalRoleText and GetNetModeText are my cpp function that calls AActor::GetNetMode() and Actor->Role and returns the Fstring instead of enum. alt text

Product Version: UE 4.19
packaged-proj.png (307.0 kB)
playineditor.png (232.6 kB)
tick.png (163.5 kB)
1921.png (744.7 kB)
more ▼

asked Oct 31 '18 at 01:07 PM in C++ Programming

avatar image

23 2 6 7

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

1 answer: sort voted first

Yes the inconsistency is getting cleaned up in later versions. You can see from your later 4.21 tests that the server which has authority over the first set of controllers correctly reports that the remote role is SimulatedProxy which matches the local role reported by the client which does not have authority over them.

It's important to note that the assignment of SimulatedProxy or AutonomousProxy as a pawn's remote role doesn't actually give or take away any permissions or capabilities. It is supposed to be helpful in coding the correct relationships between objects but a SimulatedProxy can still make RPCs if it has a PlayerController on it. Usually, the most important thing is our local role. In some cases, due to the inconsistency you may have to check remote roles as SimulatedProxy || AutonomousProxy if you are relying on that logic.

Hopefully these later versions will be more consistent.

more ▼

answered Nov 07 '18 at 04:16 PM

Brian Johnstone (suspended)
(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