aboutsummaryrefslogtreecommitdiffstats
path: root/code/phase
diff options
context:
space:
mode:
authorLeonardo Bishop <me@leonardobishop.com>2023-07-30 02:45:36 +0100
committerLeonardo Bishop <me@leonardobishop.com>2023-07-30 02:45:36 +0100
commit914512435d37d9f1e1ea4c045afd4ec5612b7534 (patch)
treeaca7ae248159ad9dd6bf5ec09c4f6b2b4eb92848 /code/phase
parentd599275439cd35e0d3e3146e39be809df55459bd (diff)
Replace movement controllers
Diffstat (limited to 'code/phase')
-rw-r--r--code/phase/PlayPhase.cs10
-rw-r--r--code/phase/WaitPhase.cs2
2 files changed, 6 insertions, 6 deletions
diff --git a/code/phase/PlayPhase.cs b/code/phase/PlayPhase.cs
index 8b4ff7f..2a28fda 100644
--- a/code/phase/PlayPhase.cs
+++ b/code/phase/PlayPhase.cs
@@ -25,7 +25,7 @@ public class PlayPhase : BasePhase
if (pawn.CurrentTeam != Team.Spectator)
{
pawn.Respawn();
- TeamOperations.GiveLoadouts( pawn );
+ TeamCapabilities.GiveLoadouts( pawn );
}
}
}
@@ -50,8 +50,8 @@ public class PlayPhase : BasePhase
DeathOverlay.Hide( To.Single( entity ) );
if (entity is Player pawn && pawn.IsValid() )
{
- if (pawn.Controller != null) pawn.Controller.SpeedMultiplier = 1;
- if (pawn.Inventory != null) pawn.Inventory.AllowPickup = true;
+ if (pawn.Controller is WalkControllerComponent controller) controller.SpeedMultiplier = 1;
+ if (pawn.Inventory!= null) pawn.Inventory.AllowPickup = true;
}
}
@@ -126,14 +126,14 @@ public class PlayPhase : BasePhase
BlindedOverlay.Show( To.Single( killer ) );
- if (killerPlayer.Controller != null) killerPlayer.Controller.SpeedMultiplier = 0.3f;
+ if (killerPlayer.Controller is WalkControllerComponent controller) controller.SpeedMultiplier = 0.3f;
if (killerPlayer.Inventory != null)
{
killerPlayer.Inventory.AllowPickup = false;
killerPlayer.Inventory.SpillContents(killerPlayer.EyePosition, killerPlayer.AimRay.Forward);
}
- Blinded[killer] = 20 * Game.TickRate;
+ Blinded[killer] = 30 * Game.TickRate;
}
else if (victimTeam == Team.Murderer )
{
diff --git a/code/phase/WaitPhase.cs b/code/phase/WaitPhase.cs
index 6014467..c3d0e16 100644
--- a/code/phase/WaitPhase.cs
+++ b/code/phase/WaitPhase.cs
@@ -57,7 +57,7 @@ public class WaitPhase : BasePhase
} else
{
var pawn = (Player)client.Pawn;
- if (pawn.LifeState == LifeState.Dead && pawn.TimeSinceDeath > 3)
+ if (pawn.LifeState == LifeState.Dead && pawn.TimeSinceDeath > 5)
{
RespawnPlayer( pawn );
}