public void Update() { //st_clock++; st_randomnumber = random.Next(); UpdateFace(); st_oldhealth = world.Players[world.Options.ConsolePlayer].Health; }
public override void Open() { IReadOnlyList <DoomString> list; if (app.Options.GameMode == GameMode.Commercial) { if (app.Options.MissionPack == MissionPack.Doom2) { list = DoomInfo.QuitMessages.Doom2; } else { list = DoomInfo.QuitMessages.FinalDoom; } } else { list = DoomInfo.QuitMessages.Doom; } text = (list[random.Next() % list.Count] + "\n\n" + DoomInfo.Strings.PRESSYN).Split('\n'); }
// // G_DeathMatchSpawnPlayer // Spawns a player at one of the random death match spots // called at level load and each death // public void G_DeathMatchSpawnPlayer(int playernum) { var selections = deathmatchStarts.Length; if (selections < 4) { throw new Exception("Only " + selections + " deathmatch spots, 4 required"); } for (var j = 0; j < 20; j++) { var i = random.Next() % selections; if (G_CheckSpot(playernum, deathmatchStarts[i])) { deathmatchStarts[i].Type = playernum + 1; thingAllocation.SpawnPlayer(deathmatchStarts[i]); return; } } // no good spot, so the player will probably get stuck thingAllocation.SpawnPlayer(playerStarts[playernum]); }