Err... Is the following thesis true?

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

Hobbees

New Member
Dec 1, 2001
11
0
0
Visit site

class ComputerInfo extends Info;
...
simulated state Active
{
&nbspfunction BeginState()
&nbsp{
&nbsp// Check shows that Role = ROLE_Authority
&nbsp}
}

-----------------------------------------
class TestPawn extends TMale1;
var ComputerInfo CompInfo;
...
function PostBeginPlay()
{
&nbspSuper.PostBeginPlay();
&nbspif (Level.NetMode == NM_Client)
&nbsp{
&nbsp&nbspCompInfo = Spawn(class'ComputerInfo', Self);
&nbsp&nbspCompInfo.GotoState('Active');
&nbsp}
}
------------------------------------------


So: Spawned (direct) Actor subclasses will always be managed by the server, although they were spawned by the client?
Since I think this cannot be true, what am I doing wrong? This class should only be processed by the client.
 

Hobbees

New Member
Dec 1, 2001
11
0
0
Visit site
Better not :)

The spawn function seems to check the actor class to be spawned for Role == ROLE_Authority. If it's not, the UT engine will crash.
 

Hobbees

New Member
Dec 1, 2001
11
0
0
Visit site
Yes (oops), but...

although UT doesn't crash when setting Role indirectly by using RemoteRole (there's not a big difference), it won't change the fact that the server still processes the class.
 

Captain Kewl

I know kewl.
Feb 13, 2001
794
0
0
IN YOUR HOUSE
Visit site
Not certain, but as far as my own experience has shown, Info (sub)classes in particular exist serverside and are replicated to the client. A predication might be that they will only exist serverside, regardless of how they're spawned -- again, I'm not certain, though. (Someone feel free to correct me.)

You generally only want to use Info classes for data you want the server to tell the client... hence things like GameInfos and ReplicationInfos for rules, scores, etc.
 

usaar33

Un1337
Mar 25, 2000
808
0
0
Unknown
www.UsAaR33.com
I don't see at all what your problem is. Role checks are not the same as netmode. Role simply means how this actor is controlled locally. Obviously, if you spawn it on the client, it would be role_authority, as there is nothing else to control it! It wouldn't be replicated at all, regardless of remoterole (which in fact means nothing).

So what is the problem?
 

Hobbees

New Member
Dec 1, 2001
11
0
0
Visit site
Originally posted by usaar33
I don't see at all what your problem is. Role checks are not the same as netmode. Role simply means how this actor is controlled locally. Obviously, if you spawn it on the client, it would be role_authority, as there is nothing else to control it! It wouldn't be replicated at all, regardless of remoterole (which in fact means nothing).

So what is the problem?

"Role simply means how this actor is controlled locally."
So are you sure it's indeed only the client which takes care of the actor?