aboutsummaryrefslogtreecommitdiffstats
path: root/code/pawn/Player.cs
diff options
context:
space:
mode:
authorLeonardo Bishop <me@leonardobishop.com>2023-07-31 02:37:57 +0100
committerLeonardo Bishop <me@leonardobishop.com>2023-07-31 02:42:42 +0100
commit6d38a73a43db7eec57cecf980eebe6e610df4de4 (patch)
treefe4aa66a7ab1a27b4488b5bf8f7334019ba4cf29 /code/pawn/Player.cs
parentfcca74deba166218deaf1e906acc0c206d96d27e (diff)
Add character names
Diffstat (limited to 'code/pawn/Player.cs')
-rw-r--r--code/pawn/Player.cs12
1 files changed, 6 insertions, 6 deletions
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<BaseCameraComponent>();
public BaseControllerComponent Controller => Components.Get<BaseControllerComponent>();
@@ -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<WalkControllerComponent>();
Components.Create<PlayerCameraComponent>();
Components.Create<AnimatorComponent>();
@@ -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<SpectatorCameraComponent>();
}