aboutsummaryrefslogtreecommitdiffstats
path: root/code/phase/PlayPhase.cs
diff options
context:
space:
mode:
authorLeonardo Bishop <me@leonardobishop.com>2023-07-28 22:06:03 +0100
committerLeonardo Bishop <me@leonardobishop.com>2023-07-28 22:06:03 +0100
commit1e5c6393a6b29eb00dbb8fb137d86647cb0c356b (patch)
tree95cbba0e7ade6bd97675480c2559c8e01f74a635 /code/phase/PlayPhase.cs
parentf137095304f456b06229e4d17ee8249e974fceaf (diff)
Add TryUnstuck and death overlay
Diffstat (limited to 'code/phase/PlayPhase.cs')
-rw-r--r--code/phase/PlayPhase.cs8
1 files changed, 7 insertions, 1 deletions
diff --git a/code/phase/PlayPhase.cs b/code/phase/PlayPhase.cs
index 118529e..b6210b3 100644
--- a/code/phase/PlayPhase.cs
+++ b/code/phase/PlayPhase.cs
@@ -47,6 +47,7 @@ public class PlayPhase : BasePhase
{
Log.Info( "Removing blind from " + entity.Name );
BlindedOverlay.Hide( To.Single( entity ) );
+ DeathOverlay.Hide( To.Single( entity ) );
if (entity is Player pawn && pawn.IsValid() )
{
if (pawn.Controller != null) pawn.Controller.SpeedMultiplier = 1;
@@ -103,20 +104,25 @@ public class PlayPhase : BasePhase
}
Player victimPlayer = (Player)victim;
Player killerPlayer = (Player)killer;
+
Team victimTeam = victimPlayer.CurrentTeam;
Team killerTeam = killerPlayer.CurrentTeam;
+
victimPlayer.CurrentTeam = Team.Spectator;
Log.Info( victimPlayer + " died to " + killerPlayer );
+
if (victimTeam != Team.Murderer && killerTeam != Team.Murderer)
{
Log.Info( killerPlayer + " shot a bystander");
+
ChatBox.Say( killerPlayer.Client.Name + " killed an innocent bystander" );
+
BlindedOverlay.Show( To.Single( killer ) );
+
if (killerPlayer.Controller != null) killerPlayer.Controller.SpeedMultiplier = 0.3f;
if (killerPlayer.Inventory != null)
{
- Log.Info( killerPlayer + "bonk");
killerPlayer.Inventory.AllowPickup = false;
killerPlayer.Inventory.SpillContents(killerPlayer.EyePosition, killerPlayer.AimRay.Forward);
}