Quote: //============================================================================= // Alliance Projectile. //================================================================================== class MPHS_AllianceProjectile extends Dart;
auto simulated state Flying { simulated function ProcessTouch (Actor Other, Vector HitLocation) { if (bStuck) return;
if ((Other != instigator) && (DeusExProjectile(Other) == None) && (Other != Owner)) { damagee = Other; AISendEvent('LoudNoise', EAITYPE_Audio, 2.0, blastRadius*24); if (damagee.IsA('ScriptedPawn') && !damagee.IsA('Robot') && !damagee.IsA('CyborgDog') && !damagee.IsA('AnnaNavarre') && !damagee.IsA('WaltonSimons') && !damagee.IsA('MPHS_IlluminitiTroop') && !damagee.IsA('MaggieChow') && !damagee.IsA('UNATCOTroop')) { ScriptedPawn(damagee).SetAlliance('Player'); ScriptedPawn(damagee).ChangeAlly('Player',1.0,true); PlaySound(ImpactSound, SLOT_None, 2.0,, 2048); Destroy(); } else { damagee.TakeDamage(damage, instigator,HitLocation,(MomentumTransfer * Normal(Velocity)), damagetype); PlaySound(ImpactSound, SLOT_None, 2.0,, 2048); Destroy(); } } }
simulated function HitWall(vector HitNormal, actor Wall) { if (bStickToWall) { Velocity = vect(0,0,0); Acceleration = vect(0,0,0); SetPhysics(PHYS_None); bStuck = False; destroy();
// MBCODE: Do this only on server side if ( Role == ROLE_Authority ) { if (Level.NetMode != NM_Standalone) SetTimer(5.0,False);
if (Wall.IsA('Mover')) { SetBase(Wall); Wall.TakeDamage(Damage, Pawn(Owner), Wall.Location, MomentumTransfer*Normal(Velocity), damageType); } } }
if (Wall.IsA('BreakableGlass')) bDebris = False; AISendEvent('LoudNoise', EAITYPE_Audio, 2.0, blastRadius*24); SpawnEffects(Location, HitNormal, Wall);
Super.HitWall(HitNormal, Wall); } }
defaultproperties { DamageType=Alliance spawnAmmoClass=None ItemName="Alliance Projectile" Damage=5.000000 }
|