PDA

View Full Version : UT Replication Trouble


emailer33
18th Oct 2003, 02:37 AM
Well i'm trying to make a UT mod, and this is actually my first where I am forced to deal with replication. After reading many articles, i gave it a shot, and am stuck on this problem. The following code works replicating to the client, i checked it with logs and such, but it never can replicate back to teh server thru a different function. Here's some code that i dumbed down to what I have:

What could be causing this not to work? There's no indication of ServerCallBack being run at all.


enum CheckType {
CT_Type1 //Only Checktype i have made so far, it's for expansion reasons
};

replication
{
//Functions
reliable if (Role < ROLE_Authority)
ServerCallBack;
reliable if (Role == ROLE_Authority)
ClientPerform;
}

simulated function ServerCallBack(CheckType CT, string Data)
{
local private int i;
if (Role < ROLE_Authority) return;
bLog("ServerCallback("$Role$") - CheckType "$int(CT));
//Here I have some code that processes Data corresponding to CT
}

simulated function ClientPerform(CheckType CT, string Command)
{
local string Ret;
if (Role == ROLE_Authority) return;
bLog("tpBR - ClientPerform("$int(CT)$") - Role:"@Role);
switch (CT)
{
case CT_Type1:
//Code setting Ret corresponding to CT and Command
ServerCallBack(CT,Ret); //Should be replicating back to the server, right?
break;
}
}

simulated event PostNetBeginPlay ()
{
//Some Beginning Code
bLog("tpBR - PostNetBeginPlay("$Role$")");
ClientPerform(CT_PackageValidation,SpecialCmd); //This does work and does replicate to the client correctly.
}



Also you can ignore bLog if you're worried about that, i made my own log file. Anyone that can provide any insight it is MUCH appreciated. Thank you.

Joey`
18th Oct 2003, 02:41 AM
replication sucks, sorry i cant help ya, i hope some one else reads this and does so. :/

Daid303
18th Oct 2003, 03:42 AM
The calling back of functions to the server only worked in the Pawn class (for me atleast) and only in the Pawn that is the 'client' itself.

Wormbo
18th Oct 2003, 03:50 AM
AFAIK client to server replication is only possible for actors owned by a PlayerController and maybe also for actors owned by a PlayerController's Pawn (i.e. a player's inventory). In any case replication is only possible from and to that single client.

replication sucks, sorry i cant help ya, i hope some one else reads this and does so. :/
In that case stay away from that "post reply" button, please.

Joey`
18th Oct 2003, 04:23 AM
in that case suck me off :]

Wormbo
18th Oct 2003, 08:11 AM
in that case suck me off :]
Just in case you think you are being funny: You're not.
Now please stay out of this thread unless you can really contribute something useful.

emailer33
18th Oct 2003, 04:10 PM
oops, i forgot to clarify soemthing. that class is an a new PlayerPawn class for UT. i override the old one, so it is owned by one player. i do realize i can't "broadcast" replication statements. i am referencing one player when i do this, since the client->server replication worked. i just do not know why it didn't make it back.

Joey`
18th Oct 2003, 04:41 PM
fyi wormbo and others; this is for ut1 not 2k3.

Daid303
18th Oct 2003, 05:02 PM
fyi wormbo and others; this is for ut1 not 2k3.
You're starting to piss people OFF!

Wasn't the Role of a pawn on the client ROLE_Authority?

Joey`
18th Oct 2003, 06:43 PM
wtf whatd i do now? :|

i was honestly trying to be informative, and its true...

how am i pissing you off :/

emailer33
18th Oct 2003, 08:43 PM
You're starting to piss people OFF!

Wasn't the Role of a pawn on the client ROLE_Authority?

wrong. the role of clients is ROLE_AutonomousProxy or ROLE_SimulatedProxy. only the server is ROLE_Authority, cuz the server is the authority. Wormbo, if i could talk to you, that'd be great, i'm emailer33 on aim and pizzaboy7979@hotmail.com on msn

Wormbo
19th Oct 2003, 04:50 AM
oops, i forgot to clarify soemthing. that class is an a new PlayerPawn class for UT.
Oops, missed that the topic says "UT Replication Trouble". :o
You seem to be creating some kind of security checker. Wouldn't it be better to create a seperate actor for that? UT2003's Engine.Security class is a subclass of

Wormbo, if i could talk to you, that'd be great, i'm emailer33 on aim and pizzaboy7979@hotmail.com on msn
Sorry to dissapoint you, but I don't use IMs that much lately and what's more important: I never used MSN and don't intent start doing that in the near future.

wtf whatd i do now? :|

i was honestly trying to be informative, and its true...

how am i pissing you off :/
You were being an idiot, that's what you did. I'm pretty sure emailer33 doesn't need somebody repeating his statements.

emailer33
19th Oct 2003, 10:10 AM
lol it's alright i know him.

i would prefer to stay as a playerpawn subclass rather than a custom checker, so i'll keep trying. thanx tho.

emailer33
19th Oct 2003, 01:26 PM
Oops, missed that the topic says "UT Replication Trouble". :o
You seem to be creating some kind of security checker. Wouldn't it be better to create a seperate actor for that? UT2003's Engine.Security class is a subclass of

yes i realize it yes, i was copying the same basic structure back to UT, just with out the native call back to teh server. i'd still like to get it working :(

Wormbo
19th Oct 2003, 02:31 PM
You seem to be creating some kind of security checker. Wouldn't it be better to create a seperate actor for that? UT2003's Engine.Security class is a subclass of
...Info and is spawned for each PlayerController.
That's what I wanted to say. :con:

emailer33
20th Oct 2003, 01:41 AM
hmm good idea. yea i thgouht this was a good structure to copy down to UT.