Core.Object | +--Engine.Actor | +--Engine.Pawn | +--XIII.XIIIPawn | +--XIII.XIIICorpseStaticMesh
CorpseBlood
CB
>
InitialInv
void
PostBeginPlay()
//_____________________________________________________________________________
SetUpInitialInventory(XIIIPawn P)
bool
IsDead()
BeginState()
00001 //----------------------------------------------------------- 00002 // 00003 //----------------------------------------------------------- 00004 class XIIICorpseStaticMesh extends XIIIPawn; 00005 00006 var() array< class<Inventory> > InitialInv; // Inventory to give the corpse 00007 var CorpseBlood CB; 00008 00009 //_____________________________________________________________________________ 00010 event ParseDynamicLoading(LevelInfo MyLI) 00011 { 00012 local int i; 00013 00014 Log("ParseDynamicLoading Actor="$self); 00015 for (i=0; i<InitialInv.Length; i++) 00016 { 00017 MyLI.ForcedClasses[MyLI.ForcedClasses.Length] = InitialInv[i]; 00018 (InitialInv[i]).Static.StaticParseDynamicLoading(MyLI); 00019 } 00020 } 00021 00022 //_____________________________________________________________________________ 00023 function PostBeginPlay() 00024 { 00025 // Super.PostBeginPlay(); 00026 bCanBeGrabbed = false; 00027 SetupInitialInventory(self); 00028 } 00029 00030 //_____________________________________________________________________________ 00031 function GiveSomething(class<Inventory> ItemClass, XIIIPawn P) 00032 { 00033 local Inventory NewItem; 00034 00035 if( P.FindInventoryType(ItemClass)==None ) 00036 { 00037 NewItem = Spawn(ItemClass,,,P.Location); 00038 if( NewItem != None ) 00039 NewItem.GiveTo(P); 00040 } 00041 else if ( Class<Ammunition>(ItemClass) != none ) 00042 { 00043 NewItem = P.FindInventoryType(ItemClass); 00044 if (NewItem != None) 00045 Ammunition(NewItem).AmmoAmount += Class<Ammunition>(ItemClass).default.AmmoAmount; 00046 } 00047 } 00048 00049 //_____________________________________________________________________________ 00050 function SetUpInitialInventory(XIIIPawn P) 00051 { 00052 local int i; 00053 00054 for (i=0; i<InitialInv.Length; i++) 00055 { 00056 GiveSomething(InitialInv[i], P); 00057 } 00058 00059 } 00060 00061 //_____________________________________________________________________________ 00062 auto state Dead 00063 { 00064 ignores Trigger, Bump, HitWall, HeadVolumeChange, PhysicsVolumeChange, 00065 Falling, BreathTimer, Tick, AnimEnd, TakeDamage; 00066 00067 function BeginState() 00068 { 00069 if ( CB == none ) 00070 { 00071 if ( (Level.Game != none) && (Level.Game.GoreLevel == 0) ) 00072 CB = spawn(class'CorpseBlood', self,, Location - (CollisionHeight-8) * vect(0,0,1), rotator(vect(0,0,-1))); 00073 // CB.DetachProjector(true); 00074 // CB.SetDrawScale(fRand()*0.35 + 0.1); 00075 // CB.AttachProjector(); 00076 } 00077 } 00078 function bool IsDead() 00079 { 00080 return true; 00081 } 00082 } 00083 00084 00085 00086 defaultproperties 00087 { 00088 bSearchable=True 00089 bIsDead=True 00090 Health=0 00091 ControllerClass=None 00092 bPhysicsAnimUpdate=False 00093 bStasis=True 00094 bAcceptsProjectors=False 00095 bBlockActors=False 00096 bBlockPlayers=False 00097 bProjTarget=False 00098 bUseCylinderCollision=True 00099 DrawType=DT_StaticMesh 00100 StaticMesh=StaticMesh'PersosMorts.GI_Mort' 00101 CollisionRadius=58.000000 00102 CollisionHeight=24.000000 00103 }