I can't get the valid variable value under network play. In single player mod I get the valid value.
What's wrong?
Thanks: George Varga
The code:
I set the value at class SniperRifle:
myPlayer(Instigator.Controller).SetIsZoomed( true );
I get the valid value at class SniperRifle (under network play too):
if(myPlayer(Instigator.Controller).bIsZoomed)
// OK.
I get the wrong value at class SniperFire:
if(myPlayer(Instigator.Controller).bIsZoomed)
// Always false
In server.log file I get many message line:
Warning: SniperFire.DoTrace:01BE) Accessed None
The myPlayer class:
class myPlayer extends xPlayer;
var bool bIsZoomed;
replication
{
reliable if(Role == ROLE_Authority)
bIsZoomed
}
function SetIsZoomed( bool B )
{
bIsZoomed = B;
}
function bool GetIsZoomed()
{
return bIsZoomed;
}
defaultproperties
{
bIsZoomed = false;
}
What's wrong?
Thanks: George Varga
The code:
I set the value at class SniperRifle:
myPlayer(Instigator.Controller).SetIsZoomed( true );
I get the valid value at class SniperRifle (under network play too):
if(myPlayer(Instigator.Controller).bIsZoomed)
// OK.
I get the wrong value at class SniperFire:
if(myPlayer(Instigator.Controller).bIsZoomed)
// Always false
In server.log file I get many message line:
Warning: SniperFire.DoTrace:01BE) Accessed None
The myPlayer class:
class myPlayer extends xPlayer;
var bool bIsZoomed;
replication
{
reliable if(Role == ROLE_Authority)
bIsZoomed
}
function SetIsZoomed( bool B )
{
bIsZoomed = B;
}
function bool GetIsZoomed()
{
return bIsZoomed;
}
defaultproperties
{
bIsZoomed = false;
}
Comment