XIII
Class XIIISoloGameRules

source: C:\XIII\XIII\Classes\XIIISoloGameRules.uc
Core.Object
   |
   +--Engine.Actor
      |
      +--Engine.Info
         |
         +--Engine.GameRules
            |
            +--XIII.XIIISoloGameRules
Direct Known Subclasses:None

class XIIISoloGameRules
extends Engine.GameRules

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

Function Summary
 bool HandleRestartGame()
     
//_____________________________________________________________________________
// ELR Return True to cancel the GameRestart and force the player to go into the menu to Reload
 bool OverridePickupQuery(Pawn Other, Pickup item, out byte)
     
//_____________________________________________________________________________
// ELR Allow pickup only if the player click on the object.
 void ScoreKill(Controller Killer, Controller Other)
     
//_____________________________________________________________________________
// ELR If Killed=Player then GameOver



Source Code


00001	//-----------------------------------------------------------
00002	//
00003	//-----------------------------------------------------------
00004	class XIIISoloGameRules extends GameRules;
00005	
00006	//_____________________________________________________________________________
00007	// ELR If Killed=Player then GameOver
00008	function ScoreKill(Controller Killer, Controller Other)
00009	{
00010	//    Log(self@"ScoreKill received");
00011	
00012	    if ( XIIIPlayerController(Other) != none )
00013	    { // Mean the player is dead, in solo mode this mean EndGame.
00014	      Level.Game.EndGame(Other.PlayerReplicationInfo,"PlayerKilled");
00015	    }
00016	}
00017	
00018	//_____________________________________________________________________________
00019	// ELR Allow pickup only if the player click on the object.
00020	function bool OverridePickupQuery(Pawn Other, Pickup item, out byte bAllowPickup)
00021	{
00022	    if ( ( XIIIPlayerController(Other.Controller)!=none )
00023	      && ( XIIIPlayerController(Other.Controller).bAutoPickup
00024	      || (
00025	        ( XIIIPlayerController(Other.Controller).MyInteraction.TargetActor == item )
00026	        && ( XIIIPlayerController(Other.Controller).bPickingUp ))
00027	       ) )
00028	      {
00029	        bAllowPickup = 1;
00030	        return true;
00031	      }
00032	    if ( Other.IsA('BaseSoldier') )
00033	      return false;
00034	    return true;
00035	}
00036	
00037	//_____________________________________________________________________________
00038	// ELR Return True to cancel the GameRestart and force the player to go into the menu to Reload
00039	function bool HandleRestartGame()
00040	{
00041	    return true;
00042	}
00043	
00044	
00045	
00046	defaultproperties
00047	{
00048	}

End Source Code