News UnrealEd Files Mods FragBU Liandri Archives
BeyondUnreal Forums

Go Back   BeyondUnreal Forums > Unreal Development > Coding

Reply
 
Thread Tools Display Modes
Old 28th Feb 2002, 11:53 AM   #1
Hobbees
Registered User
 
Join Date: Dec. 1st, 2001
Posts: 11
Question Err... Is the following thesis true?


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 is offline   Reply With Quote
Old 28th Feb 2002, 12:45 PM   #2
namu
Bleh.
 
namu's Avatar
 
Join Date: Dec. 21st, 2000
Location: Dinae Mensa, Tharsis Regio
Posts: 4,226
Try giving your class "RemoteRole=ROLE_None" ?
__________________
United we stand, divided we run free at last !

We are not at war with Intel. We have never been at war with Intel. -- S. Jobs
namu is offline   Reply With Quote
Old 28th Feb 2002, 12:47 PM   #3
Hobbees
Registered User
 
Join Date: Dec. 1st, 2001
Posts: 11
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 is offline   Reply With Quote
Old 28th Feb 2002, 01:16 PM   #4
Wormbo
 
Wormbo's Avatar
 
Join Date: Jun. 4th, 2001
Location: Germany
Posts: 5,689
Quote:
Originally posted by namu
Try giving your class "RemoteRole=ROLE_None" ?
__________________
Wormbo's UT/UT2004/UT3 mods | YouTube channel | PlanetJailbreak/JDN | Unreal Wiki | Liandri Archives
Everything you ever wanted to know about replication| UnrealScript security considerations
<elmuerte> you shouldn't do all-nighters, it's a waste of time and effort
<TNSe> nono
<TNSe> its always funny to find code a week later you dont even remember writing
<Pfhoenix> what's worse is when you have a Star Wars moment
<Pfhoenix> "Luke! I am your code!" "No! Impossible! It can't be!"
Wormbo is offline   Reply With Quote
Old 28th Feb 2002, 02:36 PM   #5
Hobbees
Registered User
 
Join Date: Dec. 1st, 2001
Posts: 11
Sarcastic 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.
Hobbees is offline   Reply With Quote
Old 28th Feb 2002, 03:03 PM   #6
Captain Kewl
I know kewl.
 
Captain Kewl's Avatar
 
Join Date: Feb. 13th, 2001
Location: IN YOUR HOUSE
Posts: 794
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.
Captain Kewl is offline   Reply With Quote
Old 28th Feb 2002, 03:13 PM   #7
Raeled
Feuer Frei!
 
Raeled's Avatar
 
Join Date: Jul. 1st, 2001
Location: Dordrecht, The Netherlands
Posts: 161
have you tried making postbeginplay simulated?
Raeled is offline   Reply With Quote
Old 28th Feb 2002, 03:14 PM   #8
Hobbees
Registered User
 
Join Date: Dec. 1st, 2001
Posts: 11
Cool

Seems I have to use a direct Object subclass. This works.
Thanks for your help, everyone!
Hobbees is offline   Reply With Quote
Old 28th Feb 2002, 04:00 PM   #9
Hobbees
Registered User
 
Join Date: Dec. 1st, 2001
Posts: 11
Quote:
Originally posted by Raeled
have you tried making postbeginplay simulated?
Yep, won't help.
Hobbees is offline   Reply With Quote
Old 28th Feb 2002, 10:25 PM   #10
usaar33
Un1337
 
usaar33's Avatar
 
Join Date: Mar. 25th, 2000
Location: Unknown
Posts: 808
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?
usaar33 is offline   Reply With Quote
Old 1st Mar 2002, 02:08 PM   #11
Hobbees
Registered User
 
Join Date: Dec. 1st, 2001
Posts: 11
Quote:
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?
Hobbees is offline   Reply With Quote
Old 1st Mar 2002, 08:20 PM   #12
usaar33
Un1337
 
usaar33's Avatar
 
Join Date: Mar. 25th, 2000
Location: Unknown
Posts: 808
Quote:
Originally posted by Hobbees


"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?
yes. who else could???
usaar33 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 04:04 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.

Copyright ©1998 - 2012, BeyondUnreal, Inc.
Privacy Policy | Terms of Use
Bandwidth provided by AtomicGamer