public void OnPlayerDeath(Client client, Client killer, uint reason)
        {
            PlayerTempData playerTempData = client.GetData(PlayerTempData.PLAYER_TEMP_DATA_KEY);

            if (playerTempData.GamemodeId.HasValue)
            {
                GameModeHandler.Instance.OnDeath(client, killer, reason);
                return;
            }

            ServerUtilities.SpawnPlayerAfter(client);
        }
Esempio n. 2
0
        protected override void OnPlayerDeath(Client client, Client killer, uint reason)
        {
            GamePosition randomSpawn = GetRandomSpawnPosition();

            var killerIndex = Data.CurrentPlayers.IndexOf(killer);

            if (killerIndex != -1)
            {
                Data.TotalKills[killerIndex]++;
            }

            ServerUtilities.SpawnPlayerAfter(client, randomSpawn, callback: () =>
            {
                GiveWeaponToPlayer(client);
            });
        }
        protected override void OnPlayerDeath(Client client, Client killer, uint reason)
        {
            GamePosition spectatePoint = GetMapData().SpectateSpawnPoints[Main.Random.Next(GetMapData().SpectateSpawnPoints.Length)];

            ServerUtilities.SpawnPlayerAfter(client, spectatePoint);
        }