## XIIIMP
Class XIIIMPSabotageScoreBoard

source: C:\XIII\XIIIMP\Classes\XIIIMPSabotageScoreBoard.uc

    Core.Object
       |
       +--Engine.Actor
          |
          +--Engine.Info
             |
             +--Engine.ScoreBoard
                |
                +--XIIIMP.XIIIMPScoreBoard
                   |
                   +--XIIIMP.XIIIMPTeamScoreBoard
                      |
                      +--XIIIMP.XIIIMPCTFScoreBoard
                         |
                         +--XIIIMP.XIIIMPSabotageScoreBoard

Direct Known Subclasses:None

class XIIIMPSabotageScoreBoard
extends XIIIMP.XIIIMPCTFScoreBoard

    //-----------------------------------------------------------
    //
    //-----------------------------------------------------------

Function Summary
`void` | `ShowScores(Canvas C, int ViewPortId, int PlayerNumber)`

Source Code

    00001	//-----------------------------------------------------------
    00002	//
    00003	//-----------------------------------------------------------
    00004	class XIIIMPSabotageScoreBoard extends XIIIMPCTFScoreBoard;
    00005
    00006	function ShowScores( Canvas C , int ViewPortId , int PlayerNumber )
    00007	{
    00008	    local color BgColor;
    00009	    local int Loop;
    00010	    local string PName,PFrag,PDeath;
    00011	    local bool IsMe, HasTheBomb;
    00012	    local weapon MyBomb;
    00013	    local controller BombHolder,TmpC;
    00014	    local XIIIGameReplicationInfo TGRI;
    00015
    00016	    if ( PlayerOwner == none )
    00017	      return;
    00018
    00019	    if ( PlayerOwner.GameReplicationInfo == none )
    00020	      return;
    00021
    00022	    TGRI = XIIIGameReplicationInfo(PlayerOwner.GameReplicationInfo);
    00023
    00024	    if( (TGRI.iGameState==1) && ( Level.NetMode == NM_Standalone ) )
    00025	    {
    00026	        if( PlayerNumber == 1 )
    00027	            C.Font = BigFont;
    00028	        else
    00029	            C.Font = SmallFont;
    00030
    00031	        GetDownMargin( C , ViewPortId , PlayerNumber );
    00032	        DrawTrailer(C);
    00033	        return;
    00034	    }
    00035
    00036	    UpdatePlayerList();
    00037
    00038	    GetUpMargin( C , ViewPortId , PlayerNumber );
    00039
    00040	    // Header
    00041
    00042	    DrawInfoLine( C,PlayerString,FragsString,DeathsString,HudBasicColor,HudBasicColor,false,PlayerNumber );
    00043	    YP += 8;
    00044
    00045	    //Players ...
    00046
    00047
    00048	    if ( Level.NetMode == NM_Standalone )
    00049	    {
    00050	        BombHolder = none;
    00051
    00052	        for (TmpC=Level.ControllerList; TmpC!=None; TmpC=TmpC.NextController )
    00053	        {
    00054	            if( TmpC.Pawn != none )
    00055	            {
    00056	                MyBomb = weapon(TmpC.Pawn.FindInventoryType(class'MPBomb'));
    00057
    00058	                if( ( MyBomb != none ) && (  MyBomb.AmmoType.AmmoAmount != 0 ) )
    00059	                {
    00060	                    BombHolder = TmpC;
    00061	                    break;
    00062	                }
    00063	            }
    00064	        }
    00065
    00066	        for ( Loop=0; Loop<PlayerCount; Loop++ )
    00067	        {
    00068	            IsMe = ( Ordered[Loop] == PlayerOwner.PlayerReplicationInfo );
    00069	            BgColor = Teamcolor[Ordered[Loop].Team.TeamIndex];
    00070
    00071	            PName = Ordered[Loop].PlayerName;
    00072	            PFrag = string( int(Ordered[Loop].Score));
    00073	            PDeath = string( int(Ordered[Loop].Deaths));
    00074
    00075	            if( ( BombHolder == none ) || ( BombHolder.PlayerReplicationInfo != Ordered[Loop] ) )
    00076	                HasTheBomb = false;
    00077	            else
    00078	                HasTheBomb = true;
    00079
    00080	            DrawInfoLine3( C, PName,PFrag,PDeath,HudBasicColor,BgColor,IsMe, HasTheBomb,PlayerNumber, Ordered[Loop].bWaitingPlayer, !Ordered[Loop].bReadyToPlay  );
    00081	        }
    00082	    }
    00083	    else
    00084	    {
    00085	        for (TmpC=Level.ControllerList; TmpC!=None; TmpC=TmpC.NextController )
    00086	        {
    00087	            if( ( TmpC.Pawn == none ) || ( TmpC.Pawn.Health == 0 ) )
    00088	            {
    00089	                XIIIPlayerReplicationInfo(TmpC.PlayerReplicationInfo).bHasTheBomb=false;
    00090	            }
    00091	            else
    00092	            {
    00093	                MyBomb = weapon(TmpC.Pawn.FindInventoryType(class'MPBomb'));
    00094
    00095	                if( ( MyBomb != none ) && (  MyBomb.AmmoType.AmmoAmount != 0 ) )
    00096	                {
    00097	                    XIIIPlayerReplicationInfo(TmpC.PlayerReplicationInfo).bHasTheBomb=true;
    00098	                }
    00099	                else
    00100	                    XIIIPlayerReplicationInfo(TmpC.PlayerReplicationInfo).bHasTheBomb=false;
    00101	            }
    00102	        }
    00103
    00104	        for ( Loop=0; Loop<PlayerCount; Loop++ )
    00105	        {
    00106	            IsMe = ( Ordered[Loop] == PlayerOwner.PlayerReplicationInfo );
    00107	            BgColor = Teamcolor[Ordered[Loop].Team.TeamIndex];
    00108
    00109	            PName = Ordered[Loop].PlayerName;
    00110	            PFrag = string( int(Ordered[Loop].Score));
    00111	            PDeath = string( int(Ordered[Loop].Deaths));
    00112
    00113	            if( ! XIIIPlayerReplicationInfo(Ordered[Loop]).bHasTheBomb )
    00114	                HasTheBomb = false;
    00115	            else
    00116	                HasTheBomb = true;
    00117
    00118	            DrawInfoLine3( C, PName,PFrag,PDeath,HudBasicColor,BgColor,IsMe, HasTheBomb,PlayerNumber, Ordered[Loop].bWaitingPlayer, !Ordered[Loop].bReadyToPlay  );
    00119	        }
    00120	    }
    00121
    00122
    00123	    if (TGRI.iGameState==3)
    00124	    {
    00125	        DrawTeamScore(C);
    00126	        PlayerOwner.MyHud.PlayMenu( XIIIBombHud(PlayerOwner.MyHud).sndTicTacOff );
    00127	    }
    00128
    00129	    // Trail
    00130
    00131	    GetDownMargin( C , ViewPortId , PlayerNumber );
    00132
    00133	    DrawTrailer(C);
    00134	}
    00135
    00136
    00137
    00138	defaultproperties
    00139	{
    00140	     strFlag="(Bomb)"
    00141	}

End Source Code