Advertisement
Guest User

IzarianMasterChunk

a guest
Jul 5th, 2014
393
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //=============================================================================
  2. // IzarianMasterChunk
  3. //=============================================================================
  4. class IzarianMasterChunk extends MasterCreatureChunk;
  5.  
  6.  
  7. simulated function ClientExtraChunks(bool bSpawnChunks)
  8. {
  9.     local CreatureChunks carc;
  10.     local bloodpuffblue Blood;
  11.     local bloodspurtblue b;
  12.     local int n;
  13.  
  14.     If ( Level.NetMode == NM_DedicatedServer )
  15.     return;
  16.  
  17.     bMustSpawnChunks = false;
  18.     b = Spawn(class 'Bloodspurtblue',,,,rot(16384,0,0));
  19.     if ( bGreenBlood )
  20.         b.GreenBlood();
  21.     b.RemoteRole = ROLE_None;
  22.  
  23.     if ( !bSpawnChunks || (CarcassClass == None) )
  24.         return;
  25.  
  26.     n = 1;
  27.  
  28.     while ( (n<8) && (CarcassClass.Default.bodyparts[n] != none) )
  29.     {
  30.         if ( CarcassClass.Static.AllowChunk(n, CarcassAnim) )
  31.         {
  32.             if ( CarcLocation == vect(0,0,0) ) CarcLocation = Location;
  33.             carc = Spawn(class 'CreatureChunks',,, CarcLocation
  34.                          + CarcassClass.Default.ZOffset[n] * CarcHeight * vect(0,0,1));
  35.             if (carc != None)
  36.             {
  37.                 carc.TrailSize = CarcassClass.Default.Trails[n];
  38.                 carc.Mesh = CarcassClass.Default.bodyparts[n];
  39.                 carc.Initfor(self);
  40.                 carc.RemoteRole = ROLE_None;
  41.             }
  42.         }
  43.         n++;
  44.     }
  45.  
  46.     if ( Level.bHighDetailMode && !bGreenBlood )
  47.     {
  48.         Blood = spawn(class'BloodPuffBlue',,, CarcLocation);
  49.         Blood.drawscale = 0.2 * CollisionRadius;
  50.         Blood.RemoteRole = ROLE_None;
  51.     }
  52. }
  53.  
  54. function ChunkUp(int Damage)
  55. {
  56.     local BloodSpurtBlue b;
  57.  
  58.     if (bHidden)
  59.         return;
  60.     b = Spawn(class 'Bloodspurtblue',,,,rot(16384,0,0));
  61.     if ( bGreenBlood )
  62.         b.GreenBlood();
  63.     if (bPlayerCarcass)
  64.     {
  65.         bHidden = true;
  66.         SetPhysics(PHYS_None);
  67.         SetCollision(false,false,false);
  68.         bProjTarget = false;
  69.         if ( Trail != None )
  70.             Trail.Destroy();
  71.     }
  72.     else
  73.         destroy();
  74. }
  75.  
  76. simulated function Landed(vector HitNormal)
  77. {
  78.     local rotator finalRot;
  79.     local BloodSpurtBlue b;
  80.     //local Bloodsplat2 BS2;
  81.  
  82.     if ( trail != None )
  83.     {
  84.         if ( Level.bHighDetailMode )
  85.             bUnlit = false;
  86.         trail.Destroy();
  87.         trail = None;
  88.     }
  89.     finalRot = Rotation;
  90.     finalRot.Roll = 0;
  91.     finalRot.Pitch = 0;
  92.     setRotation(finalRot);
  93.     if ( Level.NetMode != NM_DedicatedServer )
  94.     {
  95.         b = Spawn(class 'Bloodspurtblue',,,,rot(16384,0,0));
  96.         if ( bGreenBlood )
  97.             b.GreenBlood();
  98.         b.RemoteRole = ROLE_None;
  99.         //BS2=Spawn(class'BloodSplat2',Owner,,,Rotator(HitNormal));
  100.         //if (bGreenBlood && BS2 != none)
  101.         //  BS2.Green();
  102.     }
  103.     SetPhysics(PHYS_None);
  104.     SetCollision(true, false, false);
  105. }
  106.  
  107. defaultproperties
  108. {
  109.      CarcassClass=Class'UnrealShare.IzarianCarcass'
  110.      CarcHeight=20.000000
  111.      Mesh=LodMesh'SkCampMeshes.IzarianGib1M'
  112. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement