![]() |
|
|
#1 |
|
Registered User
Join Date: May. 23rd, 2002
Posts: 40
|
UT Replication Trouble
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. Code:
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.
}
Last edited by emailer33; 18th Oct 2003 at 02:40 AM. |
|
|
|
| Thread Tools | |
| Display Modes | |
|
|