//----------------------------------------------------------- // This type of game does not fundamentally change the xDeathMatch // game. Instead, it is a starting point for launching the special // abilities of the NavPlayer. //----------------------------------------------------------- class DroidGame extends xDeathMatch; var CamdroidPlayer TheDroid; event PostBeginPlay() { super.PostBeginPlay(); //Foo(); } event StartMatch () { local PathNode a; local PathNode droidStart; local int count; local int i; local int r; local Actor temp; local CamdroidPlayer droid; super.StartMatch(); count = 0; foreach AllActors(class'PathNode', a) { count = count + 1; } i = 0; r = Rand(count); foreach AllActors(class'PathNode', a) { if (i == r) { droidStart = a; break; } i = i + 1; } if (droidStart == none) { droidStart = a; } //ASSERT: droidStart != None temp = Spawn(class'Camdroid.CamdroidPlayer',self,,droidStart.Location,droidStart.Rotation); droid = CamdroidPlayer(temp); droid.bIsPlayer = true; droid.bHidden = false; droid.PlayerReplicationInfo.PlayerID = CurrentID++; droid.Pawn = Spawn(class'Camdroid.CamdroidPawn',,,droidStart.Location,droidStart.Rotation); droid.Pawn.Anchor = droidStart; //droid.Pawn.LastStartSpot = droidStart; droid.Pawn.LastStartTime = Level.TimeSeconds; droid.PreviousPawnClass = droid.Pawn.Class; droid.Possess(droid.Pawn); droid.PawnClass = droid.Pawn.Class; droid.Pawn.SetPhysics(PHYS_Walking); NumPlayers++; TheDroid = droid; droid.Start(); } DefaultProperties { PlayerControllerClassName="Camdroid.CameraPlayer" // Use the NavPlayer insetad of xPlayer DefaultPlayerClassName="Camdroid.CameraPawn" MapPrefix="NAV" // Set the map prefix. }