Ugh.
Just when you think you have replication figured out, something else comes and bites you in the ass!
I'm having troubles spawning a mutator clientside. I don't see what I'm doing wrong! I have followed the Wiki's instructions and set bAlwaysRelevant and bNetTemporary to True, as well as RemoteRole to ROLE_SimulatedProxy. It simply won't work! I had this problem with my JetBoots mutator and somehow it randomly fixed itself. I still don't know what happened there... Here's the wiki link anyway. http://wiki.beyondunreal.com/Legacy:Linked_List/Existing_Lists_In_Unreal_Tournament#HUD_Mutators_.3D
For the record, the mutator I'm working on is a simple one, which fixes the purple UDamage HUD problem. Here's the code:
Any help on the matter would be greatly appreciated
P.S.
I removed bNetTemporary=True because my JetBoots mutator spawns clientside fine without it.
Just when you think you have replication figured out, something else comes and bites you in the ass!
I'm having troubles spawning a mutator clientside. I don't see what I'm doing wrong! I have followed the Wiki's instructions and set bAlwaysRelevant and bNetTemporary to True, as well as RemoteRole to ROLE_SimulatedProxy. It simply won't work! I had this problem with my JetBoots mutator and somehow it randomly fixed itself. I still don't know what happened there... Here's the wiki link anyway. http://wiki.beyondunreal.com/Legacy:Linked_List/Existing_Lists_In_Unreal_Tournament#HUD_Mutators_.3D
For the record, the mutator I'm working on is a simple one, which fixes the purple UDamage HUD problem. Here's the code:
PHP:
//=============================================================================
// UDamageFixMut.
//=============================================================================
class UDamageFixMut extends Mutator;
replication
{
unreliable if( Role==ROLE_Authority && Level.NetMode!=NM_Standalone )
ReplicateDamageScaling;
}
function PostBeginPlay()
{
log("Entered PostBeginPlay");
SetTimer(1,True);
if ( NextMutator != None )
NextMutator.PostBeginPlay();
}
function AddMutator( Mutator M )
{
if ( M != Self )
Super.AddMutator(M);
}
function Timer()
{
local Pawn P;
log("Entered Timer");
for( P = Level.PawnList; P != None; P = P.NextPawn )
{
log("Entered loop");
if( P.IsA('Bot') || P.IsA('PlayerPawn') )
{
log("Pawn Condition Passed");
ReplicateDamageScaling(P, P.DamageScaling);
}
}
}
simulated function ReplicateDamageScaling( Pawn P, float Scaling )
{
log("Entered ReplicateDamageScaling");
P.DamageScaling = Scaling;
}
DefaultProperties
{
Role=ROLE_Authority
bAlwaysRelevant=True
}
P.S.
I removed bNetTemporary=True because my JetBoots mutator spawns clientside fine without it.
Last edited: