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