Core.Object | +--Engine.Actor | +--Engine.Inventory | +--XIIIMP.XIIIMPSpecialMatos | +--XIIIMP.HarnaisBomb
int
BonusIconId
XIIIMPHud
MyPlayerHud
XIIIMPPlayerPawn
MyPlayerLAN
void
AddIconInPlayerHud(Pawn Other)
//__________________________________________________________________________
GiveTo(Pawn Other)
RemoveIconInPlayerHud()
00001 //----------------------------------------------------------- 00002 // 00003 //----------------------------------------------------------- 00004 class HarnaisBomb extends XIIIMPSpecialMatos; 00005 00006 var int BonusIconId; 00007 var XIIIMPHud MyPlayerHud; 00008 var XIIIMPPlayerPawn MyPlayerLAN; 00009 00010 //__________________________________________________________________________ 00011 00012 function AddIconInPlayerHud( Pawn Other ) 00013 { 00014 local int Loop; 00015 local controller C; 00016 00017 if( ( XIIIMPPlayerPawn(Other) != none ) && ( BotPlayer(Other) == none ) ) 00018 { 00019 C = XIIIMPPlayerPawn(Other).Controller; 00020 MyPlayerHud = XIIIMPHud(PlayerController(C).MyHUD); 00021 00022 if( MyPlayerHud != none ) 00023 { 00024 MyPlayerHud.MarioBonus = 1024; 00025 } 00026 00027 if ( Level.NetMode != NM_Standalone ) 00028 { 00029 MyPlayerLAN = XIIIMPPlayerPawn(Other); 00030 MyPlayerLAN.MarioBonusLAN = 1024; 00031 } 00032 } 00033 } 00034 00035 //__________________________________________________________________________ 00036 00037 function RemoveIconInPlayerHud() 00038 { 00039 if( MyPlayerHud != none ) 00040 { 00041 MyPlayerHud.MarioBonus = 0; 00042 } 00043 00044 if ( Level.NetMode != NM_Standalone ) 00045 { 00046 log("Remove from"@MyPlayerLAN); 00047 MyPlayerLAN.MarioBonusLAN = 0; 00048 } 00049 } 00050 00051 //__________________________________________________________________________ 00052 00053 event Destroyed() 00054 { 00055 RemoveIconInPlayerHud(); 00056 super.Destroyed(); 00057 } 00058 00059 //__________________________________________________________________________ 00060 00061 function GiveTo( pawn Other ) 00062 { 00063 Super.GiveTo(other); 00064 AddIconInPlayerHud( Other ); 00065 } 00066 00067 //__________________________________________________________________________ 00068 00069 00070 00071 defaultproperties 00072 { 00073 BonusIconId=1024 00074 BoneToAttach="X Spine1" 00075 PickupClassName="XIII.GiletMk1Pick" 00076 ThirdPersonRelativeLocation=(X=5.000000,Y=27.000000) 00077 ThirdPersonRelativeRotation=(Pitch=4000,Yaw=-16384) 00078 AttachmentClass=Class'XIIIMP.HarnaisBombAttachment' 00079 ItemName="Harnais Bomb" 00080 }