Announcement

Collapse
No announcement yet.

What the heck?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • What the heck?

    Ok so I've got this mutator that's supposed to replace regular firebolts and firearrows with my own. It works fine for the server, but if any client joins the game, he never gets past the "-Please Wait'-" message. If he does wait, his logfile gets filled with this repeated crap:
    ScriptWarning: ThieveryPPawn TH-Breandor.ThieveryPPawn2 (Function Engine.PlayerPawn.ReplicateMove:0395) Attempt to assigned variable through None
    ScriptWarning: ThieveryPPawn TH-Breandor.ThieveryPPawn2 (Function Engine.PlayerPawn.ReplicateMove:03C8) Accessed None
    ScriptWarning: ThieveryPPawn TH-Breandor.ThieveryPPawn2 (Function Engine.PlayerPawn.ReplicateMove:03D0) Attempt to assigned variable through None
    ScriptWarning: ThieveryPPawn TH-Breandor.ThieveryPPawn2 (Function Engine.PlayerPawn.ReplicateMove:03DC) Accessed None
    ScriptWarning: ThieveryPPawn TH-Breandor.ThieveryPPawn2 (Function Engine.PlayerPawn.ReplicateMove:03E4) Attempt to assigned variable through None
    ScriptWarning: ThieveryPPawn TH-Breandor.ThieveryPPawn2 (Function Engine.PlayerPawn.ReplicateMove:03F0) Accessed None
    ScriptWarning: ThieveryPPawn TH-Breandor.ThieveryPPawn2 (Function Engine.PlayerPawn.ReplicateMove:03F8) Attempt to assigned variable through None
    ScriptWarning: ThieveryPPawn TH-Breandor.ThieveryPPawn2 (Function Engine.PlayerPawn.ReplicateMove:040D) Accessed None
    ScriptWarning: ThieveryPPawn TH-Breandor.ThieveryPPawn2 (Function Engine.PlayerPawn.ReplicateMove:0426) Accessed None
    ScriptWarning: ThieveryPPawn TH-Breandor.ThieveryPPawn2 (Function Engine.PlayerPawn.ReplicateMove:043F) Accessed None
    ScriptWarning: ThieveryPPawn TH-Breandor.ThieveryPPawn2 (Function Engine.PlayerPawn.ReplicateMove:0455) Accessed None
    ScriptWarning: ThieveryPPawn TH-Breandor.ThieveryPPawn2 (Function Engine.PlayerPawn.ReplicateMove:0479) Accessed None
    ScriptWarning: ThieveryPPawn TH-Breandor.ThieveryPPawn2 (Function Engine.PlayerPawn.ReplicateMove:048F) Accessed None
    ScriptWarning: ThieveryPPawn TH-Breandor.ThieveryPPawn2 (Function Engine.PlayerPawn.ReplicateMove:04B3) Accessed None
    ScriptWarning: ThieveryPPawn TH-Breandor.ThieveryPPawn2 (Function Engine.PlayerPawn.ReplicateMove:062A) Accessed None
    ScriptWarning: ThieveryPPawn TH-Breandor.ThieveryPPawn2 (Function Engine.PlayerPawn.ReplicateMove:0638) Accessed None
    ScriptWarning: ThieveryPPawn TH-Breandor.ThieveryPPawn2 (Function Engine.PlayerPawn.ReplicateMove:0646) Accessed None
    ScriptWarning: ThieveryPPawn TH-Breandor.ThieveryPPawn2 (Function Engine.PlayerPawn.ReplicateMove:065C) Accessed None
    ScriptWarning: ThieveryPPawn TH-Breandor.ThieveryPPawn2 (Function Engine.PlayerPawn.ReplicateMove:06E7) Accessed None
    ScriptWarning: ThieveryPPawn TH-Breandor.ThieveryPPawn2 (Function Engine.PlayerPawn.ReplicateMove:06FB) Accessed None
    ScriptWarning: ThieveryPPawn TH-Breandor.ThieveryPPawn2 (Function Engine.PlayerPawn.ReplicateMove:0710) Accessed None
    ScriptWarning: ThieveryPPawn TH-Breandor.ThieveryPPawn2 (Function Engine.PlayerPawn.ReplicateMove:0725) Accessed None
    ScriptWarning: ThieveryPPawn TH-Breandor.ThieveryPPawn2 (Function Engine.PlayerPawn.ReplicateMove:038D) Accessed None
    And this goes on at the speed of about 6 megs a minute.


    This is all the code from the mutator package:
    [code:1:e5b4eb90d9]//================================================== ===========================
    // ThProjectileMMsFB.
    //================================================== ===========================
    class ThProjectileMMsFB expands ThProjectileFireBolt;

    var bool bThrowStuffAbout;

    function BeginPlay()
    {
    Super.BeginPlay();
    MyFlame.LightRadius = 2;
    }

    function DoExplosion()
    {
    local UT_SpriteBallExplosion s;
    local ThieveryTorchTrigger tt;
    local Actor A;
    local float vel;

    if (bExploded) return;

    bExploded=true;

    s = spawn(class'ThSpriteBallExplosion');
    s.DrawScale = 2.0;

    foreach RadiusActors(class'ThieveryTorchTrigger', tt, 200) {
    tt.Relight(Owner);
    }

    // Fling stuff about
    if (bThrowStuffAbout)
    {
    foreach RadiusActors(class'Actor', A, 300)
    {
    if (A.bCollideWorld && (A.Role != ROLE_DumbProxy) && !A.IsA('Pawn') && !(ThieveryObject(A).ObjectivePoints > 0))
    {
    vel = (300 - VSize(Location-A.Location)) * 2;
    if (vel > 2)
    {
    A.Velocity += vel * Normal(A.Location-Location);
    if (A.Physics != PHYS_Projectile && A.Physics != PHYS_Falling)
    A.SetPhysics(PHYS_Falling);
    }
    }
    }
    }

    HurtRadius( Damage, 200.0, 'Fire', MomentumTransfer, Location );
    }

    simulated function ProcessTouch( Actor Other, Vector HitLocation ) {
    local int hitdamage;
    if ( Other != self && Other != MOwner && !HasLanded && Other!=Owner) {
    if ( Role == ROLE_Authority ) {
    DoExplosion();
    }
    if (MyFlame!=none)
    MyFlame.destroy();
    Destroy();
    }
    }


    //================================================== ===========================
    // ThProjectileMMsExpArr.
    //================================================== ===========================
    class ThProjectileMMsExpArr expands ThProjectileExplosiveArrow;

    var bool bThrowStuffAbout;

    function BeginPlay()
    {
    Super.BeginPlay();
    MyFlame.LightRadius = 2;
    }

    function DoExplosion()
    {
    local UT_SpriteBallExplosion s;
    local ThieveryTorchTrigger tt;
    local Actor A;
    local float vel;

    if (bExploded) return;

    bExploded=true;

    s = spawn(class'ThSpriteBallExplosion');
    s.DrawScale = 2.0;

    foreach RadiusActors(class'ThieveryTorchTrigger', tt, 200) {
    tt.Relight(Owner);
    }

    // Fling stuff about
    if (bThrowStuffAbout)
    {
    foreach RadiusActors(class'Actor', A, 300)
    {
    if (A.bCollideWorld && (A.Role != ROLE_DumbProxy) && !A.IsA('Pawn') && !(ThieveryObject(A).ObjectivePoints > 0))
    {
    vel = (300 - VSize(Location-A.Location)) * 2;
    if (vel > 2)
    {
    A.Velocity += vel * Normal(A.Location-Location);
    if (A.Physics != PHYS_Projectile && A.Physics != PHYS_Falling)
    A.SetPhysics(PHYS_Falling);
    }
    }
    }
    }

    HurtRadius( Damage, 200.0, '', MomentumTransfer, Location );
    }

    simulated function ProcessTouch( Actor Other, Vector HitLocation ) {
    local int hitdamage;
    if ( Other != self && Other != MOwner && !HasLanded && Other!=Owner) {
    if ( Role == ROLE_Authority ) {
    DoExplosion();
    }
    if (MyFlame!=none)
    MyFlame.destroy();
    Destroy();
    }
    }


    //================================================== ===========================
    // SpawnNotifyFireProjs.
    //================================================== ===========================
    class SpawnNotifyFireProjs expands SpawnNotify;

    var bool bReplaceFireBolts, bReplaceExpArrows, bThrowStuffAbout;

    event Actor SpawnNotification( Actor A )
    {
    local vector Aloc;
    local rotator Arot;
    local Actor Aown, B;

    if (A.IsA('ThProjectileFireBolt') && !A.IsA('ThProjectileMMsFB') && bReplaceFireBolts)
    {
    Aloc = A.Location;
    Arot = A.Rotation;
    Aown = A.Owner;

    B = Spawn(class'ThProjectileMMsFB', Aown,, Aloc, Arot);
    B.Instigator = A.Instigator;
    ThProjectileMMsFB(B).bThrowStuffAbout = bThrowStuffAbout;

    ThProjectileFireBolt(A).CheckForDestroy&#4 0;);

    Return B;
    }
    else if (A.IsA('ThProjectileExplosiveArrow'&#41 ; && !A.IsA('ThProjectileMMsExpArr') && bReplaceExpArrows)
    {
    Aloc = A.Location;
    Arot = A.Rotation;
    Aown = A.Owner;

    B = Spawn(class'ThProjectileMMsExpArr', Aown,, Aloc, Arot);
    B.Instigator = A.Instigator;
    ThProjectileMMsExpArr(B).bThrowStuffAbout = bThrowStuffAbout;

    ThProjectileExplosiveArrow(A).CheckForDest roy();

    Return B;
    } else
    return A;
    }


    //================================================== ===========================
    // MMMsFBs.
    //================================================== ===========================
    class MMMsFBs expands Mutator config(ThMutators);

    var bool Initialized;
    var() config bool bReplaceFireBolts, bReplaceExpArrows, bThrowStuffAbout;

    function PostBeginPlay()
    {
    local TorchFlame t;
    local int i;
    local SpawnNotifyFireProjs sn;

    if (Initialized)
    Return;
    Initialized = true;

    // SpawnNotify:
    sn = Spawn(class'SpawnNotifyFireProjs');
    sn.bReplaceFireBolts = bReplaceFireBolts;
    sn.bReplaceExpArrows = bReplaceExpArrows;
    sn.bThrowStuffAbout = bThrowStuffAbout;
    // log("[MMMsFBs] SpawnNotifyFireProjs spawned.");
    }[/code:1:e5b4eb90d9]


    What the heck is this happening here?
    ]V[]V[

  • #2
    Strange that replicate move is complaining...

    Do you have your package in the ServerPackages= of ThAux.ini?

    Comment


    • #3
      This might explain things...
      Can you send me your package MM ?

      Comment


      • #4
        Originally posted by Dalai
        Do you have your package in the ServerPackages= of ThAux.ini?
        Yup. And I tested it with dedicated server and client on the same compy even.


        Stahk: I'll send it right over.
        ]V[]V[

        Comment


        • #5
          Originally posted by MortalMonkey
          And this goes on at the speed of about 6 megs a minute.
          Hehe, that reminds me of the time I made a 6 gig text file :lol:
          It's not my fault everything you like is terrible.

          Comment


          • #6
            Here's my best guess:

            1. The problem is most likely in SpawnNotifyFireProjs. In SpawnNotify, event Actor SpawnNotification was simulated. You have made it unsimulated in SpawnNotifyFireProjs, persumbly because you only want the server to swap out the firebolts/explosive arrows. Unfortunately, every time an actor is create this is called and when the client calls it it returns none (because its not simulated and it isn't set up to replicate). So whenever the client's PlayerPawn is spawned SpawnNotifyFireProjs is returning a None, which is having stuff assigned to it, etc.

            I suggest the following code instead.

            [code:1:d9e70da310]//================================================== ===========================
            // SpawnNotifyFireProjs.
            //================================================== ===========================
            class SpawnNotifyFireProjs expands SpawnNotify;

            var bool bReplaceFireBolts, bReplaceExpArrows, bThrowStuffAbout;

            simulated event Actor SpawnNotification( Actor A )
            {
            if (Role == ROLE_Authority) {
            return SwapWeapons(Actor A);
            return A;
            }

            function Actor SwapWeapon (Actor A) {
            local vector Aloc;
            local rotator Arot;
            local Actor Aown, B;

            if (A.IsA('ThProjectileFireBolt') && !A.IsA('ThProjectileMMsFB') && bReplaceFireBolts)
            {
            Aloc = A.Location;
            Arot = A.Rotation;
            Aown = A.Owner;

            B = Spawn(class'ThProjectileMMsFB', Aown,, Aloc, Arot);
            B.Instigator = A.Instigator;
            ThProjectileMMsFB(B).bThrowStuffAbout = bThrowStuffAbout;

            ThProjectileFireBolt(A).CheckForDestroy&#4 0;);

            Return B;
            }
            else if (A.IsA('ThProjectileExplosiveArrow'&#41 ; && !A.IsA('ThProjectileMMsExpArr') && bReplaceExpArrows)
            {
            Aloc = A.Location;
            Arot = A.Rotation;
            Aown = A.Owner;

            B = Spawn(class'ThProjectileMMsExpArr', Aown,, Aloc, Arot);
            B.Instigator = A.Instigator;
            ThProjectileMMsExpArr(B).bThrowStuffAbout = bThrowStuffAbout;

            ThProjectileExplosiveArrow(A).CheckForDest roy();

            Return B;
            } else
            return A;
            }
            [/code:1:d9e70da310]

            This is only a guess though...
            Immortius' Forge

            Comment


            • #7
              Ahh, ofcourse. Thanks


              [edit] Yup, that was indeed the problem.
              [code:1:faccbe673f]// Thanks to immortius, this prevents it from leaving clients with only a -Please Wait- and a 20mb logfile
              if (Role < ROLE_Authority)
              Return A;[/code:1:faccbe673f]

              I think I need to de-obfuscate my replication again.


              Oh, and if you give me and email adress, I'll make sure that you'll be the first to get the final version. [/edit]
              ]V[]V[

              Comment


              • #8
                Cool.
                Immortius' Forge

                Comment

                Working...
                X