Page 1 of 1

spawn... replication... stuff

Posted: Mon Feb 26, 2007 9:30 pm
by TurkeyFromHell
i seem to post a lot here lately..... i've got my mut down so it works... just... it doesnt spawn in network games x.x. i think it might be in checkreplacement, but i have no idea iv been looking at this screen for hours and im pissed off.



(question mark)

Posted: Thu Apr 12, 2007 1:40 pm
by Quester115
was wondering if you ever found a fix with this problem...since i'm having the same trouble now. using checkreplacement() to switch out the flak cannon and replace with my energy cannon...works fine for local games (instant action ect) ... just not over net even when mutator is manually installed

Posted: Fri Apr 13, 2007 4:44 pm
by Quester115
ok not sure if this is the 'correct' way of fixing this problem but it seemed to work for now.
while using CheckReplacement() I declared it as a simulated function so that it would also be processed client side.
This seemed to make weapons ammo etc all appear as they should on the clients machine :)

Code: Select all

simulated function bool CheckReplacement( Actor Other, out byte bSuperRelevant )
{
	local int i;
	local WeaponLocker L;

	bSuperRelevant = 0;

    if ( xWeaponBase(Other) != None )
    {
      if (XWeaponBase(Other).WeaponType == Class'XWeapons.FlakCannon')
      {
          XWeaponbase(Other).WeaponType = Class'MutEnergyFlac085.EnergyFlac';
          return false;
      }
    }
    else if (FlakAmmoPickup(Other) != None)
    {
      ReplaceWith(Other, "MutEnergyFlac085.EnergyFlacAmmoPickup");
      return false;
    }
    else if ( WeaponLocker(Other) != None )
    {
      L = WeaponLocker(Other);
      for (i = 0; i < L.Weapons.Length; i++)
      {
         if ( string( L.Weapons[i].WeaponClass ) ~= "XWeapons.FlakCannon" )
         {
            L.Weapons[i].WeaponClass = Class'MutEnergyFlac085.EnergyFlac';
         }
      }
      return true;
    }
    return true;
}