From 6d38a73a43db7eec57cecf980eebe6e610df4de4 Mon Sep 17 00:00:00 2001 From: Leonardo Bishop Date: Mon, 31 Jul 2023 02:37:57 +0100 Subject: Add character names --- code/pawn/Player.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'code/pawn/Player.cs') diff --git a/code/pawn/Player.cs b/code/pawn/Player.cs index 7462c6e..1d87d94 100644 --- a/code/pawn/Player.cs +++ b/code/pawn/Player.cs @@ -41,8 +41,6 @@ public partial class Player : AnimatedEntity ); } - [Net] - public Team CurrentTeam { get; set; } public BaseCameraComponent Camera => Components.Get(); public BaseControllerComponent Controller => Components.Get(); @@ -61,7 +59,7 @@ public partial class Player : AnimatedEntity [Net, Predicted] public TimeSince TimeSinceDeath { get; set; } = 0; - + public override void Spawn() { SetModel( "models/citizen/citizen.vmdl" ); @@ -87,7 +85,6 @@ public partial class Player : AnimatedEntity EnableAllCollisions = true; EnableDrawing = true; - Components.RemoveAll(); Components.Create(); Components.Create(); Components.Create(); @@ -102,7 +99,6 @@ public partial class Player : AnimatedEntity { DisablePlayer(); DeleteRagdoll(); - Components.RemoveAll(); } public void DeleteRagdoll() @@ -185,7 +181,11 @@ public partial class Player : AnimatedEntity if (Game.IsServer && Camera is not SpectatorCameraComponent && LifeState == LifeState.Dead && TimeSinceDeath > 3.5) { DeathOverlay.Hide( To.Single( Client ) ); - Components.RemoveAll(); + Components.Remove( Controller ); + Components.Remove( Camera ); + Components.Remove( Animator ); + Components.Remove( Inventory ); + Components.Remove( FallDamage ); Components.Create(); } -- cgit v1.2.3-70-g09d2