SarkBall
Class SarkBallBotZombie

source: c:\runehov\SarkBall\Classes\SarkBallBotZombie.uc
Core.Object
   |
   +--Engine.Actor
      |
      +--Engine.Pawn
         |
         +--RuneI.ScriptPawn
            |
            +--SarkBall.SarkBallBot
               |
               +--SarkBall.SarkBallBotZombie
Direct Known Subclasses:None

class SarkBallBotZombie
extends SarkBall.SarkBallBot

//----------------------------------------------------------- // //-----------------------------------------------------------
Variables
 name CrucifiedAnim
 ZombieEye Eyes
 float LungeChance

States
Pain, Fighting, Sarkify

Function Summary
 bool AddDefaultInventory()
 void AltWeaponActivate()
     
//================================================
//
// AltWeaponActivate
//
// Zombie Breath Attack
//================================================
 void ApplyGoreCap(int BodyPart)
     
//============================================================
//
// ApplyGoreCap
//
//============================================================
 eAttitude AttitudeToCreature(Pawn Other)
     
//------------------------------------------------
//
// AttitudeToCreature
//
//------------------------------------------------
 bool BodyPartCritical(int BodyPart)
     
//============================================================
//
// BodyPartCritical
//
//============================================================
 int BodyPartForJoint(int joint)
     
//=============================================================================
//
// BodyPartForJoint
//
// Returns the body part a joint is associated with
//=============================================================================
 int BodyPartForPolyGroup(int polygroup)
     
//============================================================
//
// BodyPartForPolyGroup
//
//============================================================
 bool BodyPartSeverable(int BodyPart)
     
//============================================================
//
// BodyPartSeverable
//
//============================================================
 bool CanPickup(Inventory item)
     
//================================================
//
// CanPickup
//
// Let's pawn dictate what it can pick up
// Zombies can only use their claws
//================================================
 bool DamageBodyPart(int Damage, Pawn EventInstigator, vector HitLocation, vector Momentum, name DamageType, int bodypart)
     
//============================================================
//
// DamageBodyPart
//
//============================================================
 void Died(Pawn Killer, name damageType, vector HitLocation)
     
//============================================================
//
// Died
//
//============================================================
 void GlowEyes(bool glow)
 bool JointDamaged(int Damage, Pawn EventInstigator, vector HitLoc, vector Momentum, name DamageType, int joint)
 int JointForBodyPart(int BodyPart)
 void LimbSevered(int BodyPart, vector Momentum)
     
//================================================
//
// LimbSevered
//
//================================================
 void LongFall()
 void MakeTwitchable()
     
//------------------------------------------------------------
//
// MakeTwitchable
//
// TODO: Move to carcass
//------------------------------------------------------------
 EMatterType MatterForJoint(int joint)
     
//============================================================
//
// MatterForJoint
//
// Returns what kind of material joint is associated with
//============================================================
 Texture PainSkin(int BodyPart)
     
//============================================================
//
// PainSkin
//
// returns the pain skin for a given polygroup
//============================================================
 void PlayBackup(optional float)
     
//============================================================
//
// PlayBackup
//
//============================================================
 void PlayBlockHigh(optional float)
 void PlayBlockLow(optional float)
 void PlayBodyHit(optional float)
 void PlayCower(optional float)
 void PlayDeath(name DamageType)
 void PlayDodgeBack(optional float)
 void PlayDodgeBackflip(optional float)
 void PlayDodgeDuck(optional float)
 void PlayDodgeForward(optional float)
 void PlayDodgeLeft(optional float)
 void PlayDodgeRight(optional float)
 void PlayDrownDeath(name DamageType)
 void PlayDrowning(optional float)
 void PlayDyingSound(name damageType)
 void PlayFrontHit(float tweentime)
 void PlayHeadHit(optional float)
 void PlayHuntStop(optional float)
 void PlayInAir(optional float)
 void PlayJumping(optional float)
     
{
     if (bHurrying)
     {
          LoopAnim  ('z_walk',     1.0, tween);
     }
     else
     {
          if (Weapon==None)                              LoopAnim  ('z_walk',     1.0, tween);
          else if (Weapon.IsA('Torch'))               LoopAnim  ('z_walk',1.0, tween);
          else                                             LoopAnim  ('z_walk',     1.0, tween);
     }
}
*/
 void PlayLArmHit(optional float)
 void PlayLLegHit(optional float)
 void PlayLanding(optional float)
 void PlayMeleeHigh(optional float)
 void PlayMeleeLow(optional float)
 void PlayMoving(optional float)
     
/*
 void PlayMoving(optional float)
     
/*
 void PlayRArmHit(optional float)
 void PlayRLegHit(optional float)
 void PlayStrafeLeft(optional float)
     
//============================================================
//
// PlayStrafeLeft
//
//============================================================
 void PlayStrafeRight(optional float)
     
//============================================================
//
// PlayStrafeRight
//
//============================================================
 void PlayTakeHit(float tweentime, int damage, vector HitLoc, name damageType, vector Momentum, int BodyPart)
     
//===================================================================
//
// PlayTakeHit
//
//===================================================================
 void PlayTaunting(optional float)
 void PlayThrowing(optional float)
 void PlayTurning(optional float)
 void PlayWaiting(optional float)
     
//-----------------------------------------------------------------------------
// Animation functions
//-----------------------------------------------------------------------------
 void PostBeginPlay()
     
//============================================================
//
// PostBeginPlay
//
//============================================================
 void SetOnFire(Pawn EventInstigator, int Joint)
 void TweenToHuntStop(float time)
     
           {     TweenAnim ('z_idle',    time);         }
 void TweenToJumping(float time)
 void TweenToJumping(float time)
 void TweenToMeleeHigh(float time)
 void TweenToMeleeHigh(float time)
 void TweenToMeleeLow(float time)
 void TweenToMeleeLow(float time)
 void TweenToMoving(float time)
 void TweenToMoving(float time)
 void TweenToThrowing(float time)
 void TweenToThrowing(float time)
 void TweenToTurning(float time)
 void TweenToTurning(float time)
 void TweenToWaiting(float time)
     
          { TweenAnim ('z_idle',  time);         }
*/
 void TweenToWaiting(float time)
     
          { TweenAnim ('z_idle',  time);         }
*/
 void ZoneChange(ZoneInfo newZone)
     
//============================================================
//
// ZoneChange
//
//============================================================


State Pain Function Summary
 bool BodyPartCritical(int BodyPart)
 void EndState()
 bool JointDamaged(int damage, Pawn EventInstigator, vector HitLoc, vector Momentum, name DamageType, int joint)
 bool CanGotoPainState()
 bool CanPickup(Inventory item)
 void BeginState()
     
//------------------------------------------------------------
//
// Crucified
//
//------------------------------------------------------------
 void EndGetUpEffect()
 void StartGetUpEffect()
 void EndState()
 bool CanGotoPainState()


State Fighting Function Summary
 void CalcJumpVelocity()
 void CalcStrafePosition2()
 void CalcStrafePosition()
 bool InDangerFromAttack()
 bool ShouldDefend()
 void Timer()
     
// Determine AttackAction based upon enemy movement and position
 bool BlockRatherThanDodge()
 void AmbientSoundTimer()
 bool InCombatRange(Actor Other)
     
//============================================================
 void EndState()
 void BeginState()


State Sarkify Function Summary
 void SpawnSark()



Source Code


00001	//-----------------------------------------------------------
00002	//
00003	//-----------------------------------------------------------
00004	class SarkBallBotZombie expands SarkBallBot;
00005	
00006	const DEFAULT_TWEEN = 0.15;
00007	
00008	var() name CrucifiedAnim;
00009	var() float LungeChance;
00010	var(Sounds) sound DecapitateSound;
00011	var(Sounds) sound GreenPuffSound;
00012	var(Sounds) sound ZombieGetUpSound;
00013	
00014	var ZombieEye Eyes;
00015	
00016	
00017	Function bool AddDefaultInventory(){
00018	  Return False;
00019	
00020	
00021	}
00022	
00023	//============================================================
00024	//
00025	// PostBeginPlay
00026	//
00027	//============================================================
00028	
00029	
00030	
00031	
00032	function PostBeginPlay()
00033	{
00034	     Super.PostBeginPlay();
00035	
00036	     Eyes = Spawn(Class'ZombieEye');
00037	     AttachActorToJoint(Eyes, JointNamed('head'));
00038	     Eyes.bHidden = true; // ZombieEyes initial are hidden
00039	}
00040	
00041	//------------------------------------------------
00042	//
00043	// AttitudeToCreature
00044	//
00045	//------------------------------------------------
00046	function eAttitude AttitudeToCreature(Pawn Other)
00047	{
00048	     if (Other!=None && Other.IsA('Goblin'))
00049	          return ATTITUDE_Hate;
00050	     else
00051	          return Super.AttitudeToCreature(Other);
00052	}
00053	
00054	//================================================
00055	//
00056	// CanPickup
00057	//
00058	// Let's pawn dictate what it can pick up
00059	// Zombies can only use their claws
00060	//================================================
00061	function bool CanPickup(Inventory item)
00062	{
00063	     if(item.IsA('Weapon') && (BodyPartHealth[BODYPART_RARM1] > 0) && (Weapon == None))
00064	     {
00065	          return(item.IsA('ZombieClaw'));
00066	//          return(item.IsA('axe') || item.IsA('hammer') || item.IsA('sword') || item.IsA('ZombieClaw'));
00067	     }
00068	}
00069	
00070	
00071	function GlowEyes(bool glow)
00072	{
00073	     if(Eyes != None)
00074	     {
00075	          if(glow)
00076	               Eyes.bHidden = false;
00077	          else
00078	               Eyes.bHidden = true;
00079	     }
00080	}
00081	
00082	function PlayDyingSound(name damageType)
00083	{
00084	     if (damageType == 'decapitated')
00085	          PlaySound(DecapitateSound, SLOT_Talk);
00086	     else
00087	          Super.PlayDyingSound(damageType);
00088	}
00089	
00090	//===================================================================
00091	//                         Localized Damage Functions
00092	//===================================================================
00093	
00094	//============================================================
00095	//
00096	// MatterForJoint
00097	//
00098	// Returns what kind of material joint is associated with
00099	//============================================================
00100	function EMatterType MatterForJoint(int joint)
00101	{
00102	     return MATTER_EARTH;
00103	}
00104	
00105	//============================================================
00106	//
00107	// BodyPartSeverable
00108	//
00109	//============================================================
00110	function bool BodyPartSeverable(int BodyPart)
00111	{
00112	     switch(BodyPart)
00113	     {
00114	          case BODYPART_HEAD:
00115	               return true;
00116	     }
00117	     return false;
00118	}
00119	
00120	//============================================================
00121	//
00122	// BodyPartCritical
00123	//
00124	//============================================================
00125	
00126	function bool BodyPartCritical(int BodyPart)
00127	{
00128	     return (BodyPart == BODYPART_HEAD);
00129	}
00130	
00131	
00132	//============================================================
00133	//
00134	// DamageBodyPart
00135	//
00136	//============================================================
00137	
00138	function bool DamageBodyPart(int Damage, Pawn EventInstigator, vector HitLocation, vector Momentum, name DamageType, int bodypart)
00139	{
00140	     local int PassThrough;
00141	     local int SeverDamage;
00142	     local int BluntDamage;
00143	     local bool bAlreadyDead;
00144	     local int AppliedDamage;
00145	     local Debris Gib;
00146	     local float scale;
00147	     local int i, NumChunks;
00148	
00149	     local vector AdjMomentum;
00150	
00151	     if(!class'GameInfo'.Default.bLowGore)
00152	          PainSkin(BodyPart);
00153	
00154	     GetDamageValues(Damage, DamageType, BluntDamage, SeverDamage);
00155	     Level.Game.ReduceDamage(BluntDamage, SeverDamage, DamageType, self, EventInstigator);
00156	     PassThrough = LimbPassThrough(BodyPart, BluntDamage, SeverDamage);
00157	
00158	     if (BodyPart != BODYPART_BODY)
00159	     {
00160	          if (BodyPartSeverable(BodyPart) && (BodyPartHealth[BodyPart] > 0))
00161	          {
00162	               BodyPartHealth[BodyPart] -= SeverDamage;
00163	     
00164	               if(BodyPartHealth[BodyPart] <= 0)
00165	               {     // Body Part was killed
00166	                    if (BodyPartCritical(BodyPart))
00167	                    {
00168	                         PassThrough = Max(Health, Damage);
00169	
00170	                         if (EventInstigator != None)
00171	                         {
00172	                              EventInstigator.BoostStrength(0.15 * Default.Health);
00173	                         }
00174	
00175	                         DamageType = 'decapitated';
00176	                    }
00177	
00178	                    // Sever the limb
00179	                    BodyPartVisibility(BodyPart, false);
00180	                    BodyPartCollision(BodyPart, false);
00181	
00182	                    if(!class'GameInfo'.Default.bLowGore )          
00183	                         LimbSevered(BodyPart, Momentum); // Lop off zombie head
00184	               }
00185	          }
00186	     }
00187	
00188	     if (DamageType=='sever' || DamageType=='bluntsever')
00189	     {     // spawn chunks
00190	          NumChunks = (Damage / 15) + 1;
00191	          NumChunks = NumChunks * Level.Game.DebrisPercentage;
00192	          for(i = 0; i < NumChunks; i++)
00193	          {
00194	               Gib = spawn(GibClass,,, HitLocation + VRand() * 2,);
00195	               if (Gib != None)
00196	               {
00197	                    Gib.SetSize(RandRange(0.1, 0.4));
00198	                    Gib.SetMomentum((-0.08 * Momentum));
00199	               }
00200	          }
00201	     }
00202	     else if (DamageType == 'crushed')
00203	     {     // Force the gib when crushed
00204	          PassThrough = Default.Health*3;
00205	          bGibbable = true;
00206	     }
00207	
00208	     // Apply damage to body
00209	     if(PassThrough != 0)
00210	     {
00211	          bAlreadyDead = (Health <= 0);
00212	
00213	//          AppliedDamage = Level.Game.ReduceDamage(PassThrough, DamageType, self, EventInstigator);
00214	          AppliedDamage = PassThrough;
00215	
00216	          if(DamageType == 'decapitated' || DamageType == 'crushed' || DamageType == 'fire')
00217	          {
00218	               Health -= AppliedDamage;
00219	          }
00220	
00221	          if (Health > 0)
00222	          {
00223	               // Apply momentum
00224	               // NOTE:  This code is duplicated in Shield.Active and Shield.Idle states
00225	               AdjMomentum = momentum / Mass;
00226	               if(Mass < VSize(AdjMomentum) && Velocity.Z <= 0)
00227	               {               
00228	                    AdjMomentum.Z += (VSize(AdjMomentum) - Mass) * 0.5;
00229	               }
00230	               AddVelocity(AdjMomentum);
00231	
00232	               if(CanGotoPainState() && DamageType != 'fire' && FRand() > 0.25)
00233	               { // Only goto the painstate if the pawn allows it 
00234	                    PlayTakeHitSound(AppliedDamage, DamageType, 1);
00235	
00236	                    if(PassThrough > 5) // DAMAGE_EPSILON = 5
00237	                    { // Only go to the painstate if the damage is over a given level
00238	                         if (GetStateName() != 'Pain' && GetStateName() != 'pain')
00239	                         {
00240	                              NextStateAfterPain = GetStateName();
00241	
00242	                              // Play pain anim
00243	                              PlayTakeHit(0.1, AppliedDamage, HitLocation, DamageType, Momentum, BodyPart);
00244	                              GotoState('Pain');
00245	                         }
00246	                    }
00247	               }
00248	          }
00249	          else if (bAlreadyDead)
00250	          {     // Twitch corpse or Gib
00251	               if(Health < -Default.Health && bGibbable)
00252	               { // Gib if beaten down far enough
00253	                    SpawnBodyGibs(Momentum);
00254	                    if (bIsPlayer)
00255	                         bHidden=true;
00256	                    else
00257	                         Destroy();
00258	               }
00259	          }
00260	          else
00261	          { // Kill the creature
00262	               AddVelocity(momentum * 2 / Mass);
00263	
00264	               if (EventInstigator != self && PlayerPawn(EventInstigator) != None)
00265	               {
00266	                    EventInstigator.BoostStrength(0.15 * Default.Health);
00267	               }
00268	
00269	               if(Health < -Default.Health && bGibbable)
00270	               { // Gib if beaten down far enough
00271	                    Died(EventInstigator, 'gibbed', HitLocation);
00272	//                    if (bIsPlayer)     // moved to died
00273	//                         bHidden=true;
00274	//                    else
00275	//                         Destroy();
00276	               }
00277	               else
00278	               {
00279	                    // Apply momentum
00280	                    Died(EventInstigator, DamageType, HitLocation);
00281	               }
00282	          }
00283	          MakeNoise(1.0);
00284	     }
00285	
00286	     return(false);
00287	}
00288	
00289	//============================================================
00290	//
00291	// PainSkin
00292	//
00293	// returns the pain skin for a given polygroup
00294	//============================================================
00295	function Texture PainSkin(int BodyPart)
00296	{
00297	     return None;
00298	}
00299	
00300	//=============================================================================
00301	//
00302	// BodyPartForJoint
00303	//
00304	// Returns the body part a joint is associated with
00305	//=============================================================================
00306	
00307	function int BodyPartForJoint(int joint)
00308	{
00309	     switch(joint)
00310	     {
00311	          case 2: case 3:                    return BODYPART_LLEG1;
00312	          case 6: case 7:                    return BODYPART_RLEG1;
00313	          case 17:                         return BODYPART_HEAD;
00314	          case 21: case 23:               return BODYPART_LARM1;
00315	          case 30: case 32:               return BODYPART_RARM1;
00316	          default:                         return BODYPART_BODY;
00317	     }
00318	}
00319	
00320	function int JointForBodyPart(int BodyPart)
00321	{
00322	     switch(BodyPart)
00323	     {
00324	     case BODYPART_LLEG1:               return(3);
00325	     case BODYPART_RLEG1:               return(7);
00326	     case BODYPART_HEAD:                    return(17);
00327	     case BODYPART_LARM1:               return(23);
00328	     case BODYPART_RARM1:               return(32);
00329	     default:                              return(0);
00330	     }
00331	}
00332	
00333	//============================================================
00334	//
00335	// BodyPartForPolyGroup
00336	//
00337	//============================================================
00338	function int BodyPartForPolyGroup(int polygroup)
00339	{
00340	     switch(polygroup)
00341	     {
00342	          case 1:     case 3:               return BODYPART_RARM1;
00343	          case 2:                         return BODYPART_RLEG1;
00344	          case 4:                         return BODYPART_TORSO;
00345	          case 5:                         return BODYPART_HEAD;
00346	          case 6:                         return BODYPART_LLEG1;
00347	          case 7:     case 8:               return BODYPART_LARM1;
00348	     }
00349	     return BODYPART_BODY;
00350	}
00351	
00352	//================================================
00353	//
00354	// SeveredLimbClass
00355	//
00356	//================================================
00357	function class<Actor> SeveredLimbClass(int BodyPart)
00358	{
00359	     switch(BodyPart)
00360	     {
00361	          case BODYPART_LARM1:
00362	               return class'ZombieLArm';
00363	          case BODYPART_RARM1:
00364	               return class'ZombieRArm';
00365	          case BODYPART_HEAD:
00366	               return class'ZombieHead';
00367	               break;
00368	     }
00369	
00370	     return None;
00371	}
00372	
00373	//============================================================
00374	//
00375	// ApplyGoreCap
00376	//
00377	//============================================================
00378	function ApplyGoreCap(int BodyPart)
00379	{
00380	}
00381	
00382	//================================================
00383	//
00384	// LimbSevered
00385	//
00386	//================================================
00387	function LimbSevered(int BodyPart, vector Momentum)
00388	{
00389	     local int joint;
00390	     local vector X,Y,Z,pos;
00391	     local actor part;
00392	     local class<actor> partclass;
00393	     
00394	     Super.LimbSevered(BodyPart, Momentum);
00395	
00396	     ApplyGoreCap(BodyPart);
00397	     partclass = SeveredLimbClass(BodyPart);
00398	
00399	     part = None;
00400	     switch(BodyPart)
00401	     {
00402	          case BODYPART_HEAD:
00403	               joint = JointNamed('head');
00404	               pos = GetJointPos(joint);
00405	               part = Spawn(partclass,,, pos, Rotation);
00406	               if(part != None)
00407	               {
00408	                    part.Velocity = 0.75 * (momentum / Mass) + vect(0, 0, 300);
00409	                    part.GotoState('Drop');
00410	               }
00411	               break;
00412	          case BODYPART_LARM1:
00413	               joint = JointNamed('lshoulda');
00414	               pos = GetJointPos(joint);
00415	               part = Spawn(partclass,,, pos, Rotation);
00416	               if(part != None)
00417	               {
00418	                    part.Velocity = Y * 100 + vect(0, 0, 175);
00419	                    part.GotoState('Drop');
00420	               }
00421	               break;
00422	          case BODYPART_RARM1:
00423	               joint = JointNamed('rshoulda');
00424	               pos = GetJointPos(joint);
00425	               part = Spawn(partclass,,, pos, Rotation);
00426	               if(part != None)
00427	               {
00428	                    part.Velocity = Y * 100 + vect(0, 0, 175);
00429	                    part.GotoState('Drop');
00430	               }
00431	               break;
00432	     }
00433	}
00434	
00435	//------------------------------------------------------------
00436	//
00437	// MakeTwitchable
00438	//
00439	// TODO: Move to carcass
00440	//------------------------------------------------------------
00441	function MakeTwitchable()
00442	{
00443	     local int j;
00444	
00445	     // Turn all collision joints accelerative
00446	     for (j=0; j<NumJoints(); j++)
00447	     {
00448	          if ((JointFlags[j] & JOINT_FLAG_COLLISION)==0)
00449	               continue;
00450	
00451	          switch(j)
00452	          {
00453	               case 11: case 14: case 2: case 6:
00454	                    break;
00455	               default:
00456	                    JointFlags[j] = JointFlags[j] | JOINT_FLAG_ACCELERATIVE;
00457	//                    SetJointRotThreshold(j, 16000);
00458	//                    SetJointDampFactor(j, 0.025);
00459	//                    SetAccelMagnitude(j, 8000);
00460	                    break;
00461	          }
00462	     }
00463	}
00464	
00465	
00466	function bool JointDamaged(int Damage, Pawn EventInstigator, vector HitLoc, vector Momentum, name DamageType, int joint)
00467	{
00468	     local int i;
00469	
00470	     if (DamageType == 'fire')
00471	     {     // When damaged by fire, let fire spread to other joints
00472	          for (i=0; i<NumJoints(); i++)
00473	          {
00474	               if ( ((JointFlags[i] & JOINT_FLAG_COLLISION)!=0) && JointChild[i] == None)
00475	               {
00476	                    SetOnFire(EventInstigator, i);
00477	                    break;
00478	               }
00479	          }
00480	     }
00481	     return Super.JointDamaged(Damage, EventInstigator, HitLoc, Momentum, DamageType, joint);
00482	}
00483	
00484	function SetOnFire(Pawn EventInstigator, int Joint)
00485	{
00486	     Super.SetOnFire(EventInstigator, Joint);
00487	
00488	     // Make the zombie go crazy when it's on fire!
00489	     GroundSpeed = Default.GroundSpeed * 2;
00490	     LungeChance = Default.LungeChance * 3;
00491	
00492	     if(Weapon != None)
00493	          Weapon.DamageType = 'fire';
00494	}
00495	
00496	
00497	//-----------------------------------------------------------------------------
00498	// Animation functions
00499	//-----------------------------------------------------------------------------
00500	
00501	function PlayWaiting(optional float tween)
00502	{
00503	     LoopAnim ('weapon1_idle', 1.0, DEFAULT_TWEEN);
00504	}
00505	
00506	//============================================================
00507	//
00508	// PlayMoving
00509	//
00510	//============================================================
00511	
00512	function PlayMoving(optional float tween)
00513	{
00514	     if (bHurrying)
00515	     {
00516	          LoopAnim('S1_Walk', 0.75, DEFAULT_TWEEN);
00517	     }
00518	     else
00519	     {
00520	          LoopAnim('z_walkN', 1.0, DEFAULT_TWEEN);
00521	     }
00522	}
00523	
00524	//============================================================
00525	//
00526	// PlayStrafeLeft
00527	//
00528	//============================================================
00529	
00530	function PlayStrafeLeft(optional float tween)
00531	{
00532	     LoopAnim('strafeleft', 0.75, DEFAULT_TWEEN);
00533	}
00534	
00535	//============================================================
00536	//
00537	// PlayStrafeRight
00538	//
00539	//============================================================
00540	
00541	function PlayStrafeRight(optional float tween)
00542	{
00543	     LoopAnim('straferight', 0.75, DEFAULT_TWEEN);
00544	}
00545	
00546	//============================================================
00547	//
00548	// PlayBackup
00549	//
00550	//============================================================
00551	
00552	function PlayBackup(optional float tween)
00553	{
00554	     LoopAnim('weapon1_backup', 0.75, DEFAULT_TWEEN);
00555	}
00556	
00557	/*
00558	function PlayMoving(optional float tween)
00559	{
00560	     if (bHurrying)
00561	     {
00562	          LoopAnim  ('z_walk',     1.0, tween);
00563	     }
00564	     else
00565	     {
00566	          if (Weapon==None)                              LoopAnim  ('z_walk',     1.0, tween);
00567	          else if (Weapon.IsA('Torch'))               LoopAnim  ('z_walk',1.0, tween);
00568	          else                                             LoopAnim  ('z_walk',     1.0, tween);
00569	     }
00570	}
00571	*/
00572	
00573	function PlayJumping(optional float tween)    { PlayAnim  ('z_idle',          1.0, tween);   }
00574	function PlayHuntStop(optional float tween)   { LoopAnim  ('z_idle',          1.0, tween);   }
00575	
00576	function PlayMeleeHigh(optional float tween)
00577	{
00578	     if(FRand() < 0.3)
00579	          PlayAnim('atk_all_attack3_aa0s', 1.0, DEFAULT_TWEEN);
00580	     else
00581	          PlayAnim('z_breathe', 1.0, DEFAULT_TWEEN);
00582	}
00583	function PlayMeleeLow(optional float tween)
00584	{
00585	     PlayAnim  ('atk_all_attack3_aa0s', 1.0, DEFAULT_TWEEN);
00586	}
00587	function PlayTurning(optional float tween)
00588	{
00589	                                                            PlayAnim  ('z_idle',          1.0, tween);
00590	}
00591	
00592	function PlayCower(optional float tween)      { LoopAnim  ('z_idle',          1.0, tween);   }
00593	function PlayThrowing(optional float tween)
00594	{     //TODO: Switch weapon type for different throws
00595	                                                            PlayAnim  ('z_idle',   1.0, tween);
00596	}
00597	function PlayTaunting(optional float tween)   { PlayAnim  ('z_idle',      1.0, tween);   }
00598	function PlayInAir(optional float tween)
00599	{
00600	     LoopAnim  ('z_idle',     1.0, DEFAULT_TWEEN);
00601	}
00602	function LongFall()
00603	{
00604	     if (AnimSequence != 'z_idle')
00605	          LoopAnim  ('z_idle',     1.0, 0.1);
00606	}
00607	function PlayLanding(optional float tween)
00608	{
00609	     if (AnimSequence == 'z_idle')
00610	          PlayAnim('z_idle', 1.0, 0.1);
00611	     else if (AnimSequence == 'z_idle')
00612	          PlayAnim('z_idle', 1.0, 0.1);
00613	     else
00614	          PlayAnim('z_idle', 1.0, 0.1);
00615	}
00616	
00617	function PlayDodgeLeft(optional float tween)  { PlayAnim  ('z_idle',   1.0, tween);   }
00618	function PlayDodgeRight(optional float tween) { PlayAnim  ('z_idle',   1.0, tween);   }
00619	function PlayDodgeForward(optional float tween){PlayAnim  ('z_idle',   1.0, tween);   }
00620	function PlayDodgeBack(optional float tween)  { PlayAnim  ('z_idle',   1.0, tween);   }
00621	function PlayDodgeBackflip(optional float tween){PlayAnim ('z_idle',   1.0, tween);   }
00622	function PlayDodgeDuck(optional float tween)  { PlayAnim  ('z_idle',   1.0, tween);   }
00623	function PlayBlockHigh(optional float tween)  { LoopAnim  ('z_idle',   1.0, tween);   }
00624	function PlayBlockLow(optional float tween)   { LoopAnim  ('z_idle',  1.0, tween);   }
00625	
00626	function PlayFrontHit(float tweentime){}
00627	function PlayHeadHit(optional float tween)    { /* PlayAnim  ('pain',   1.0, tween); */  }
00628	function PlayBodyHit(optional float tween)    { /*PlayAnim  ('pain',   1.0, tween); */  }
00629	function PlayLArmHit(optional float tween)    { /*PlayAnim  ('pain',   1.0, tween); */  }
00630	function PlayRArmHit(optional float tween)    { /*PlayAnim  ('pain',   1.0, tween); */  }
00631	function PlayLLegHit(optional float tween)    { /*PlayAnim  ('pain',   1.0, tween); */  }
00632	function PlayRLegHit(optional float tween)    { /*PlayAnim  ('pain',   1.0, tween); */  }
00633	function PlayDrowning(optional float tween)   { /*LoopAnim  ('drown',  1.0, tween);     */}
00634	
00635	function PlayDeath(name DamageType)               
00636	{ 
00637	     PlayAnim('z_deadhead', 1.0, 0.1);
00638	}
00639	
00640	function PlayDrownDeath(name DamageType)      { PlayAnim  ('z_idle', 1.0, 0.1);     }
00641	
00642	/*
00643	// Tween functions
00644	function TweenToWaiting(float time)
00645	{
00646	     TweenAnim ('z_idle',          time);
00647	}
00648	function TweenToMoving(float time)
00649	{
00650	     TweenAnim('z_walk',   time);
00651	}
00652	function TweenToTurning(float time)           {     TweenAnim ('z_walk',    time);         }
00653	function TweenToJumping(float time)           {     TweenAnim ('z_idle',    time);         }
00654	function TweenToHuntStop(float time)          { TweenAnim ('z_idle',   time);         }
00655	function TweenToMeleeHigh(float time)
00656	{
00657	                                                            TweenAnim ('z_idle', time);
00658	}
00659	function TweenToMeleeLow(float time)
00660	{
00661	                                                            TweenAnim ('z_idle', time);
00662	}
00663	function TweenToThrowing(float time)          { TweenAnim ('z_idle',  time);         }
00664	*/
00665	
00666	function TweenToWaiting(float time)
00667	{
00668	     LoopAnim('weapon1_idle', time);
00669	}
00670	
00671	function TweenToMoving(float time)
00672	{
00673	     TweenAnim('S1_Walk', time);
00674	}
00675	
00676	function TweenToTurning(float time)
00677	{ // TODO:  Need turning anims
00678	     TweenAnim('weapon1_idle', time);
00679	}
00680	
00681	function TweenToJumping(float time)           {     TweenAnim ('MOV_ALL_jump1_AA0S', time); }
00682	function TweenToMeleeHigh(float time)
00683	{
00684	/*
00685	     if (Weapon==None)                                   TweenAnim ('swipe',     time);
00686	     else                                                  TweenAnim ('attackb',   time);
00687	*/
00688	}
00689	function TweenToMeleeLow(float time)
00690	{
00691	/*
00692	     if (Weapon==None)                                   TweenAnim ('swipe',     time);
00693	     else                                                  TweenAnim ('attackb',   time);
00694	*/
00695	}
00696	function TweenToThrowing(float time)          { TweenAnim ('throwA',    time);         }
00697	
00698	//===================================================================
00699	//
00700	// PlayTakeHit
00701	//
00702	//===================================================================
00703	
00704	function PlayTakeHit(float tweentime, int damage, vector HitLoc, name damageType, vector Momentum, int BodyPart)
00705	{
00706	     PlayAnim('z_knockdown', 1.0, 0.1);
00707	}
00708	
00709	//================================================
00710	//
00711	// AltWeaponActivate
00712	//
00713	// Zombie Breath Attack
00714	//================================================
00715	
00716	function AltWeaponActivate()
00717	{
00718	     local actor a;
00719	     local rotator r;
00720	     local vector l;
00721	
00722	     if(Enemy == None)
00723	          return;
00724	
00725	     r = rotator(Enemy.Location - Location);
00726	     l = GetJointPos(JointNamed('head')) + vector(r) * 10;
00727	
00728	     a = Spawn(class'ZombieBreath', self,, l, r);
00729	     a.Velocity = vector(r) * 100;
00730	     a.SetPhysics(PHYS_Projectile);
00731	
00732	     PlaySound(GreenPuffSound);
00733	}
00734	
00735	//============================================================
00736	//
00737	// Died
00738	//
00739	//============================================================
00740	
00741	function Died(pawn Killer, name damageType, vector HitLocation)
00742	{
00743	     GlowEyes(false);
00744	     Super.Died(Killer, damageType, HitLocation);
00745	}
00746	
00747	//============================================================
00748	//
00749	// ZoneChange
00750	//
00751	//============================================================
00752	
00753	function ZoneChange(ZoneInfo newZone)
00754	{
00755	     local rotator newRot;
00756	
00757	     Super.ZoneChange(newZone);
00758	     if(newZone.bLokiBloodZone)
00759	     {
00760	          GotoState('Sarkify');
00761	     }
00762	}
00763	
00764	//================================================
00765	//
00766	// Sarkify
00767	//
00768	// A zombie transforming into a Sark
00769	//================================================
00770	
00771	State Sarkify
00772	{
00773	ignores SeePlayer, EnemyNotVisible, HearNoise, KilledBy, Trigger, Bump, HitWall, HeadZoneChange, FootZoneChange, ZoneChange, Falling, WarnTarget, Died, LongFall, PainTimer, Landed, EnemyAcquired, CheckForEnemies;
00774	
00775	     function SpawnSark()
00776	     {
00777	          local rotator newRot;
00778	          local class<ScriptPawn> SarkClass;
00779	          local ScriptPawn Sark;
00780	          local pawn P;
00781	
00782	          SetCollision(false, false, false); // Don't block the incoming Sark
00783	          newRot = Rotation * -1;
00784	//          Sark = Spawn(SarkClass,,, Location, newRot);
00785	
00786	          SarkClass = class<ScriptPawn>(DynamicLoadObject("RuneI.SarkSpawn", class'Class'));
00787	          if(SarkClass != None)
00788	               Sark = Spawn(SarkClass,,, Location, newRot);
00789	
00790	          if(Sark != None)
00791	          {
00792	               Sark.Event = Event; // Carry over death event               
00793	               Sark.Tag = Tag;
00794	
00795	               for(P = Level.PawnList; P != None; P = P.nextPawn)
00796	               {
00797	                    if(P.bIsPlayer)
00798	                    {
00799	                         Sark.LookAt(P);
00800	                         break;
00801	                    }
00802	               }
00803	
00804	               // Set the Sark to roam to find the player
00805	               Sark.Orders = 'roaming';
00806	               Sark.OrdersTag = '';
00807	          }
00808	     }
00809	     
00810	begin:
00811	     SetPhysics(PHYS_None);     
00812	     bHidden = true; // Hide the zombie for a bit, it will be destroyed after the Sark is created
00813	     Spawn(class'ZombieChangeFire',,, Location);
00814	     Sleep(1.0 + FRand());
00815	     SpawnSark();
00816	     Destroy();
00817	}
00818	
00819	//================================================
00820	//
00821	// Fighting
00822	//
00823	//================================================
00824	State Fighting
00825	{
00826	ignores EnemyAcquired;
00827	
00828	     function BeginState()
00829	     {
00830	          bAvoidLedges = true;
00831	          LookAt(Enemy);
00832	          SetTimer(0.1, true);
00833	          AttackAction = AA_LUNGE;
00834	          bStopMoveIfCombatRange = true;
00835	     }
00836	
00837	     function EndState()
00838	     {
00839	          bAvoidLedges = false;
00840	
00841	          bSwingingHigh = false;
00842	          bSwingingLow  = false;
00843	
00844	          if(Weapon != None)
00845	          {
00846	               Weapon.FinishAttack();
00847	               Weapon.DisableSwipeTrail();
00848	          }
00849	
00850	          LookAt(None);
00851	          SetTimer(1.0, false);
00852	     }
00853	
00854	     //============================================================
00855	     //
00856	     // InCombatRange
00857	     //
00858	     //============================================================
00859	
00860	     function bool InCombatRange(Actor Other)
00861	     {
00862	          if(Other == None)
00863	               return(false);
00864	
00865	          return (VSize(Location - Other.Location) < CollisionRadius + Other.CollisionRadius + CombatRange);
00866	     }
00867	          
00868	     function AmbientSoundTimer()
00869	     {
00870	          PlayAmbientFightSound();
00871	     }
00872	
00873	     function bool BlockRatherThanDodge()
00874	     {
00875	          if (Shield == None)
00876	               return false;
00877	
00878	          if (EnemyIncidence != INC_FRONT)
00879	               return false;
00880	
00881	          return (FRand() < BlockChance);
00882	     }
00883	
00884	     // Determine AttackAction based upon enemy movement and position
00885	     function Timer()
00886	     {
00887	          GetEnemyProximity();
00888	
00889	          LastAction = AttackAction;
00890	                    
00891	          if(EnemyMovement == MOVE_STRAFE_LEFT && FRand() < 0.9)
00892	          {
00893	               AttackAction = AA_STRAFE_LEFT;
00894	          }
00895	          else if(EnemyMovement == MOVE_STRAFE_RIGHT && FRand() < 0.9)
00896	          {
00897	               AttackAction = AA_STRAFE_RIGHT;
00898	          }
00899	           else if(FRand() < 0.5)
00900	           {
00901	                if(FRand() < 0.5 && LastAction != AA_STRAFE_RIGHT || LastAction == AA_STRAFE_LEFT)
00902	                {
00903	                     AttackAction = AA_STRAFE_LEFT;
00904	                }
00905	                else if(LastAction != AA_STRAFE_LEFT || LastAction == AA_STRAFE_RIGHT)
00906	                {
00907	                     AttackAction = AA_STRAFE_RIGHT;
00908	                }
00909	               else
00910	               {
00911	                    AttackAction = AA_WAIT;
00912	               }
00913	           }
00914	          else if((EnemyMovement == MOVE_STANDING && FRand() < 0.2) || FRand() < LungeChance)
00915	          {
00916	               AttackAction = AA_LUNGE;
00917	          }          
00918	          else
00919	          {
00920	               AttackAction = AA_WAIT;
00921	          }
00922	          
00923	/*     
00924	          if (ShouldDefend())
00925	          {
00926	               GotoState('Fighting', 'Defend');
00927	          }
00928	*/          
00929	     }
00930	
00931	     function bool ShouldDefend()
00932	     {
00933	          return (FRand() > FightOrDefend && InDangerFromAttack());
00934	     }
00935	     
00936	     function bool InDangerFromAttack()
00937	     {
00938	          if ((!Enemy.bSwingingHigh) && (!Enemy.bSwingingLow))
00939	               return false;
00940	
00941	          GetEnemyProximity();
00942	               
00943	          if (EnemyDist>CollisionRadius+Enemy.CollisionRadius+Enemy.MeleeRange)
00944	               return false;
00945	
00946	          return (EnemyVertical==VERT_LEVEL && EnemyFacing==FACE_FRONT);
00947	     }
00948	
00949	     function CalcStrafePosition()
00950	     {          
00951	          local vector V;
00952	          local rotator R;
00953	          local vector temp;
00954	          
00955	          V = Location - Enemy.Location;
00956	          R = rotator(V);
00957	          
00958	          R.Yaw += 4000;
00959	
00960	          // Strafe using the enemy's XY location, but the viking's location ground plane          
00961	          temp = Enemy.Location;
00962	          temp.Z = Location.Z;
00963	
00964	          Destination = temp + vector(R) * CombatRange;
00965	     }
00966	     
00967	     function CalcStrafePosition2()
00968	     {          
00969	          local vector V;
00970	          local rotator R;
00971	          local vector temp;
00972	          
00973	          V = Location - Enemy.Location;
00974	          R = rotator(V);
00975	          
00976	          R.Yaw -= 4000;
00977	
00978	          // Strafe using the enemy's XY location, but the viking's location ground plane          
00979	          temp = Enemy.Location;
00980	          temp.Z = Location.Z;
00981	
00982	          Destination = temp + vector(R) * CombatRange;
00983	     }
00984	
00985	     function CalcJumpVelocity()
00986	     {
00987	          local float traj;
00988	          local vector adjust;
00989	
00990	          traj = (70 + Rand(5)) * 65536 / 360;
00991	          adjust = Enemy.Location - Location; // Random adjustment to compensate for perfect accuracy
00992	          AddVelocity(CalcArcVelocity(traj, Location, Enemy.Location + adjust));
00993	     }
00994	
00995	          
00996	Begin:
00997	     Acceleration = vect(0,0,0);
00998	
00999	     // Turn to face enemy
01000	     if(Enemy != None)
01001	          DesiredRotation.Yaw = rotator(Enemy.Location-Location).Yaw;
01002	
01003	//     PlayWaiting();
01004	
01005	Fight:
01006	     GetEnemyProximity();
01007	     
01008	     // Attack if close enough
01009	     if(Weapon != None && Enemy != None && InMeleeRange(Enemy) || (EnemyMovement == MOVE_CLOSER && EnemyDist < MeleeRange * 2.5))
01010	     {
01011	          if(FRand() < 0.8)
01012	          {
01013	               GlowEyes(true);
01014	               PlayMeleeHigh(0.1);
01015	               FinishAnim();
01016	               GlowEyes(false);
01017	          }
01018	          
01019	          Sleep(TimeBetweenAttacks);
01020	     }
01021	     else if(AttackAction == AA_LUNGE)
01022	     { // Random lunge
01023	          bStopMoveIfCombatRange = false;
01024	          GlowEyes(true);
01025	          PlayAnim('z_attackL', 1.0, 0.1);
01026	          Sleep(0.25); // wait for a bit before doing the actual lunge
01027	          if(Enemy != None)
01028	               AddVelocity(Normal(Enemy.Location - Location) * 325 + vect(0, 0, 200));
01029	          FinishAnim();
01030	          WaitForLanding();
01031	          GlowEyes(false);
01032	          Sleep(TimeBetweenAttacks);
01033	          bStopMoveIfCombatRange = true;
01034	     }
01035	     else if(AttackAction == AA_STRAFE_LEFT)
01036	     { // Strafe 
01037	          CalcStrafePosition();
01038	          PlayStrafeLeft();
01039	          bStopMoveIfCombatRange = false;
01040	          StrafeFacing(Destination, Enemy);
01041	          bStopMoveIfCombatRange = true;
01042	     }
01043	     else if(AttackAction == AA_STRAFE_RIGHT)
01044	     {
01045	          CalcStrafePosition2();
01046	          PlayStrafeRight();
01047	          bStopMoveIfCombatRange = false;
01048	          StrafeFacing(Destination, Enemy);
01049	          bStopMoveIfCombatRange = true;
01050	     }
01051	     else if(AttackAction == AA_JUMP)
01052	     {
01053	          PlayJumping();
01054	          CalcJumpVelocity();
01055	          WaitForLanding();
01056	          FinishAnim();          
01057	     }
01058	     else
01059	     {
01060	          PlayWaiting();
01061	     }
01062	
01063	     if(InCombatRange(Enemy))
01064	     {
01065	          Sleep(0.05);
01066	          Goto('Begin');
01067	     }
01068	     
01069	BackFromSubState:
01070	     GotoState('Charging', 'ResumeFromFighting');
01071	}
01072	
01073	//------------------------------------------------------------
01074	//
01075	// Pain
01076	//
01077	//------------------------------------------------------------
01078	state Pain
01079	{
01080	     function bool CanGotoPainState()
01081	     { // Do not allow the actor to enter the painstate when already in pain
01082	          return(false);
01083	     }
01084	
01085	     function EndState()
01086	     {
01087	          Super.EndState();
01088	
01089	          EndGetUpEffect();
01090	     }
01091	
01092	     function StartGetUpEffect()
01093	     {
01094	          local vector loc;
01095	
01096	          // Spawn semi-magically get-up effect
01097	          DesiredColorAdjust.X = 0;
01098	          DesiredColorAdjust.Y = 128;
01099	          DesiredColorAdjust.Z = 51;
01100	
01101	          loc = Location;
01102	          loc.Z -= CollisionHeight;
01103	          
01104	          Spawn(class'GroundDust',,, loc,);
01105	
01106	          LightType=LT_Steady;
01107	          LightEffect=LE_None;
01108	          LightBrightness=230;
01109	          LightHue=53;
01110	          LightSaturation=20;
01111	          LightRadius=10;
01112	
01113	          if(Eyes != None)
01114	          {
01115	               Eyes.bHidden = false;
01116	          }
01117	
01118	          PlaySound(ZombieGetUpSound, SLOT_Talk);
01119	     }
01120	
01121	     function EndGetUpEffect()
01122	     {
01123	          DesiredColorAdjust.X = 0;
01124	          DesiredColorAdjust.Y = 0;
01125	          DesiredColorAdjust.Z = 0;
01126	
01127	          LightType=LT_None;
01128	          LightEffect=LE_None;
01129	          LightBrightness=0;
01130	          LightRadius=0;
01131	
01132	          if(Eyes != None)
01133	          {
01134	               Eyes.bHidden = true;
01135	          }
01136	     }
01137	
01138	Begin:
01139	     bRotateTorso = false;
01140	     bRotateHead = false;
01141	
01142	     GlowEyes(false);
01143	
01144	     if(PainDelay < 0)
01145	     { // If PainDelay is negative, the painstate waits until the anim has completed
01146	          FinishAnim();
01147	     }
01148	     else
01149	     { // Otherwise, just use the PainDelay
01150	          Sleep(PainDelay);
01151	     }
01152	
01153	     Sleep(1 + FRand()); // Lay on the ground for a moment
01154	
01155	     bRotateTorso = true;
01156	     bRotateHead = true;
01157	
01158	     StartGetUpEffect();
01159	
01160	     PlayAnim('z_getup', 1.0, 0.1);
01161	     FinishAnim();
01162	
01163	     GotoState(NextStateAfterPain);
01164	}
01165	
01166	//------------------------------------------------------------
01167	//
01168	// Crucified
01169	//
01170	//------------------------------------------------------------
01171	state() Crucified
01172	{
01173	ignores AddVelocity;
01174	
01175	     function BeginState()
01176	     {
01177	          SetPhysics(PHYS_None);
01178	     }
01179	
01180	     function bool CanPickup(Inventory item)
01181	     {
01182	          return false;
01183	     }
01184	
01185	     function bool CanGotoPainState()
01186	     {
01187	          return(false);
01188	     }
01189	
01190	     function bool JointDamaged(int damage, pawn EventInstigator, vector HitLoc, vector Momentum, name DamageType, int joint)
01191	     {
01192	          if (Health > 10)
01193	          {     // Concious
01194	               Health -= damage;
01195	               GotoState('Crucified', 'InPain');
01196	          }
01197	          else
01198	          {     // Unconcious
01199	               Health -= damage;
01200	               if (Health <= 0)
01201	               {
01202	                    Health = 1;     // Insure can be killed by final blow so death event fires
01203	                    if (damage > 10)
01204	                    {     // Only a big final blow will gib
01205	                         return Super.JointDamaged(1000, EventInstigator, HitLoc, Momentum, 'gibbed', 0);
01206	                    }
01207	                    else
01208	                    {
01209	                         return true;
01210	                    }
01211	               }
01212	          }
01213	
01214	          return false;
01215	     }
01216	
01217	     function EndState()
01218	     {
01219	          SetMovementPhysics();
01220	     }
01221	
01222	     function bool BodyPartCritical(int BodyPart)
01223	     {     // Don't flee when arm cut off, die
01224	          return true;
01225	     }
01226	
01227	InPain:
01228	     switch(CrucifiedAnim)
01229	     {
01230	          case 'CrucifiedAIdle':
01231	               PlayAnim('CrucifiedAPain', 1.0, 0.1);
01232	               FinishAnim();
01233	               break;
01234	          case 'CrucifiedBIdle':
01235	               PlayAnim('CrucifiedBPain', 1.0, 0.1);
01236	               FinishAnim();
01237	               break;
01238	          case 'CrucifiedC':
01239	               break;
01240	     }
01241	     if (Health > 10)
01242	          Goto('Concious');
01243	
01244	Unconcious:
01245	     switch(CrucifiedAnim)
01246	     {
01247	          case 'CrucifiedAIdle':
01248	               PlayAnim('CrucifiedA', 1.0, 0.4);
01249	               break;
01250	          case 'CrucifiedBIdle':
01251	               PlayAnim('CrucifiedB', 1.0, 0.4);
01252	               break;
01253	          case 'CrucifiedC':
01254	               break;
01255	     }
01256	     Goto('Idle');
01257	
01258	Begin:
01259	Concious:
01260	     LoopAnim(CrucifiedAnim, 1.0, 0.1);
01261	
01262	Idle:
01263	}
01264	
01265	defaultproperties
01266	{
01267	    LungeChance=0.20
01268	    DecapitateSound=Sound'CreaturesSnd.Zombie.zombiedecap01'
01269	    GreenPuffSound=Sound'CreaturesSnd.Zombie.zombiepuff01'
01270	    ZombieGetUpSound=Sound'CreaturesSnd.Zombie.zombiegetup01'
01271	    HighOrLow=1.00
01272	    LatOrVertDodge=1.00
01273	    HighOrLowBlock=1.00
01274	    TimeBetweenAttacks=0.10
01275	    AcquireSound=Sound'CreaturesSnd.Zombie.zombiesee01'
01276	    AmbientWaitSounds(0)=Sound'CreaturesSnd.Zombie.zombieambient01'
01277	    AmbientWaitSounds(1)=Sound'CreaturesSnd.Zombie.zombieambient02'
01278	    AmbientWaitSounds(2)=Sound'CreaturesSnd.Zombie.zombieambient03'
01279	    AmbientFightSounds(0)=Sound'CreaturesSnd.Zombie.zombieattack01'
01280	    AmbientFightSounds(1)=Sound'CreaturesSnd.Zombie.zombieattack01'
01281	    AmbientFightSounds(2)=Sound'CreaturesSnd.Zombie.zombieattack01'
01282	    AmbientFightSoundDelay=8.00
01283	    StartWeapon=Class'RuneI.ZombieClaw'
01284	    ShadowScale=1.50
01285	    CarcassType=Class'RuneI.ZombieCarcass'
01286	    MeleeRange=60.00
01287	    CombatRange=140.00
01288	    GroundSpeed=170.00
01289	    ClassID=10
01290	    PeripheralVision=-1.00
01291	    Health=80
01292	    BodyPartHealth(1)=30
01293	    BodyPartHealth(3)=30
01294	    BodyPartHealth(5)=30
01295	    HitSound1=Sound'CreaturesSnd.Zombie.zombiehit01'
01296	    HitSound2=Sound'CreaturesSnd.Zombie.zombiehit02'
01297	    HitSound3=Sound'CreaturesSnd.Zombie.zombiehit03'
01298	    Die=Sound'CreaturesSnd.Zombie.zombiedeath01'
01299	    Die2=Sound'CreaturesSnd.Zombie.zombiedeath02'
01300	    Die3=Sound'CreaturesSnd.Zombie.zombiedeath03'
01301	    FootStepWood(0)=Sound'CreaturesSnd.Zombie.zombiefoot01'
01302	    FootStepWood(1)=Sound'CreaturesSnd.Zombie.zombiefoot02'
01303	    FootStepWood(2)=Sound'CreaturesSnd.Zombie.zombiefoot01'
01304	    FootStepMetal(0)=Sound'CreaturesSnd.Zombie.zombiefoot01'
01305	    FootStepMetal(1)=Sound'CreaturesSnd.Zombie.zombiefoot02'
01306	    FootStepMetal(2)=Sound'CreaturesSnd.Zombie.zombiefoot01'
01307	    FootStepStone(0)=Sound'CreaturesSnd.Zombie.zombiefoot01'
01308	    FootStepStone(1)=Sound'CreaturesSnd.Zombie.zombiefoot02'
01309	    FootStepStone(2)=Sound'CreaturesSnd.Zombie.zombiefoot01'
01310	    FootStepFlesh(0)=Sound'CreaturesSnd.Zombie.zombiefoot01'
01311	    FootStepFlesh(1)=Sound'CreaturesSnd.Zombie.zombiefoot02'
01312	    FootStepFlesh(2)=Sound'CreaturesSnd.Zombie.zombiefoot01'
01313	    FootStepIce(0)=Sound'CreaturesSnd.Zombie.zombiefoot01'
01314	    FootStepIce(1)=Sound'CreaturesSnd.Zombie.zombiefoot02'
01315	    FootStepIce(2)=Sound'CreaturesSnd.Zombie.zombiefoot01'
01316	    FootStepEarth(0)=Sound'CreaturesSnd.Zombie.zombiefoot01'
01317	    FootStepEarth(1)=Sound'CreaturesSnd.Zombie.zombiefoot02'
01318	    FootStepEarth(2)=Sound'CreaturesSnd.Zombie.zombiefoot01'
01319	    FootStepSnow(0)=Sound'CreaturesSnd.Zombie.zombiefoot01'
01320	    FootStepSnow(1)=Sound'CreaturesSnd.Zombie.zombiefoot02'
01321	    FootStepSnow(2)=Sound'CreaturesSnd.Zombie.zombiefoot01'
01322	    CombatStyle=1.00
01323	    WeaponJoint=rhand
01324	    PlayerReplicationInfoClass=Class'Engine.PlayerReplicationInfo'
01325	    MaxMouthRot=7000
01326	    MaxMouthRotRate=65535
01327	    DrawScale=1.25
01328	    TransientSoundRadius=1200.00
01329	    CollisionHeight=51.00
01330	    SkelMesh=11
01331	    SkelGroupSkins(0)=Texture'Players.Ragnarragd_arms'
01332	    SkelGroupSkins(1)=Texture'Players.Ragnarz_armleg'
01333	    SkelGroupSkins(2)=Texture'Players.Ragnarz_armleg'
01334	    SkelGroupSkins(3)=Texture'Players.Ragnarz_armleg'
01335	    SkelGroupSkins(4)=Texture'Players.Ragnarz_body'
01336	    SkelGroupSkins(5)=Texture'Players.Ragnarz_head'
01337	    SkelGroupSkins(6)=Texture'Players.Ragnarz_armleg'
01338	    SkelGroupSkins(7)=Texture'Players.Ragnarz_armleg'
01339	    SkelGroupSkins(8)=Texture'Players.Ragnarz_armleg'
01340	    SkelGroupSkins(9)=Texture'Players.Ragnarz_head'
01341	    SkelGroupSkins(10)=Texture'Players.Ragnarz_neckgore'
01342	    SkelGroupSkins(11)=Texture'Players.Ragnarragd_arms'
01343	    SkelGroupSkins(12)=Texture'Players.Ragnarragd_arms'
01344	    SkelGroupSkins(13)=Texture'Players.Ragnarragd_arms'
01345	    SkelGroupSkins(14)=Texture'Players.Ragnarragd_arms'
01346	}

End Source Code