//============================================================================= // BabyTitan. //============================================================================= class BabyTitan expands Titan; function ThrowOther(Pawn Other) { local float dist, shake; local PlayerPawn aPlayer; local vector Momentum; if ( Other.mass > 0 ) return; aPlayer = PlayerPawn(Other); if ( aPlayer == None ) { if ( !bStomp || (Other.Physics != PHYS_Walking) ) return; dist = VSize(Location - Other.Location); if (dist > 50000) return; } else { dist = VSize(Location - Other.Location); shake = FMax(500, 1500 - dist); if ( dist > 1500 ) return; aPlayer.ShakeView( FMax(0, 0.35 - dist/20000), shake, 0.015 * shake); if ( Other.Physics != PHYS_Walking ) return; } Momentum = -0.5 * Other.Velocity + 100 * VRand(); Momentum.Z = 7000000.0/((0.4 * dist + 350) * Other.Mass); if (bStomp) Momentum.Z *= 5.0; Other.AddVelocity(Momentum); } function FootStep() { local actor A; local pawn Thrown; //slightly throw player if nearby ,& play footstep sound //for a baby titan? uhh no thanks bStomp = false; bEndFootstep = false; if (StepEvent != '') foreach AllActors( class 'Actor', A, StepEvent ) A.Trigger( Self, Instigator ); Thrown = Level.PawnList; While ( Thrown != None ) { ThrowOther(Thrown); Thrown = Thrown.nextPawn; } realSpeed = DesiredSpeed; //fixme - don't stop if very low friction DesiredSpeed = 0.0; PlaySound(Step, SLOT_Interact); } function StartMoving() { DesiredSpeed = realSpeed; } function Stomp() { local actor A; local pawn Thrown; if (StompEvent != '') foreach AllActors( class 'Actor', A, StompEvent ) A.Trigger( Self, Instigator ); //throw all nearby creatures, and play sound bStomp = true; Thrown = Level.PawnList; While ( Thrown != None ) { ThrowOther(Thrown); Thrown = Thrown.nextPawn; } PlaySound(Step, SLOT_Interact, 24); } defaultproperties { SlapDamage=50 PunchDamage=40 GroundSpeed=200.000000 Health=940 MenuName="Baby Titan" PlayerReplicationInfoClass=None DrawScale=0.200000 CollisionRadius=25.000000 CollisionHeight=24.000000 }