diff --git a/code/Game.cs b/code/Game.cs index 738553e..77126e6 100644 --- a/code/Game.cs +++ b/code/Game.cs @@ -1,4 +1,4 @@ -using Sandbox; +using Sandbox; using System.Threading.Tasks; using System.Linq; @@ -128,7 +128,7 @@ public override void OnKilled( Client client, Entity pawn ) Karma.Killed( round.Players.First(x => x.GetClientOwner().SteamId == pawn.LastAttacker.GetClientOwner().SteamId ), round.Players.First( x => x.GetClientOwner().SteamId == client.SteamId ) ); if(pawn is Player) Round?.OnPlayerKilled( pawn as Player ); - base.OnKilled( client, pawn) ; + //base.OnKilled( client, pawn) ; //DO NOT SEND ANYTHING TO KILLFEED- KEEP COMMENTED OR DELETE } public override void ClientDisconnect( Client client, NetworkDisconnectionReason reason ) { diff --git a/code/Player.cs b/code/Player.cs index f92481b..65e4cff 100644 --- a/code/Player.cs +++ b/code/Player.cs @@ -58,12 +58,7 @@ public enum ScoreboardGroup [ConVar.ClientData( "ttt_spectator_mode", Help = "Spectator-only mode. True or false", Saved = true )] public string spectatorOnlyCVar { get; set; } = "false"; - public bool spectatorOnly { get { - var owner = GetClientOwner(); - if ( owner == null ) return false; - string state = owner.GetUserString( "ttt_spectator_mode" ); - return state == null ? false : state.ToLower() == "true"; - } } + public bool spectatorOnly { get; } [Net] public float karma { get; set; } = 1000f; diff --git a/code/entities/BalloonEntity.cs b/code/entities/BalloonEntity.cs index 1e3d246..75d6ffe 100644 --- a/code/entities/BalloonEntity.cs +++ b/code/entities/BalloonEntity.cs @@ -12,7 +12,7 @@ public override void Spawn() SetModel( "models/citizen_props/balloonregular01.vmdl" ); SetupPhysicsFromModel( PhysicsMotionType.Dynamic, false ); PhysicsBody.GravityScale = GravityScale; - RenderColor = Color.Random.ToColor32(); + RenderColor = Color.Random; } public override void OnKilled() diff --git a/code/entities/BouncyBall.cs b/code/entities/BouncyBall.cs index d61184c..485be9e 100644 --- a/code/entities/BouncyBall.cs +++ b/code/entities/BouncyBall.cs @@ -1,4 +1,4 @@ -using Sandbox; +using Sandbox; using System; [Library( "ent_bouncyball", Title = "Bouncy Ball", Spawnable = true )] @@ -14,7 +14,7 @@ public override void Spawn() SetModel( "models/ball/ball.vmdl" ); SetupPhysicsFromModel( PhysicsMotionType.Dynamic, false ); Scale = Rand.Float( 0.5f, 2.0f ); - RenderColor = Color.Random.ToColor32(); + RenderColor = Color.Random; } protected override void OnPhysicsCollision( CollisionEventData eventData ) diff --git a/code/tools/Balloon.cs b/code/tools/Balloon.cs index 9765bc1..e2743b3 100644 --- a/code/tools/Balloon.cs +++ b/code/tools/Balloon.cs @@ -14,7 +14,7 @@ public override void Activate() if ( Host.IsServer ) { - Tint = Color.Random.ToColor32(); + Tint = Color.Random; } } diff --git a/code/ui/RagdollInspect.cs b/code/ui/RagdollInspect.cs index 5a5f638..8cad696 100644 --- a/code/ui/RagdollInspect.cs +++ b/code/ui/RagdollInspect.cs @@ -130,7 +130,7 @@ public void Update() break; case Player.DeathType.Melee: targetTexture = Texture.Load( "https://i.imgur.com/YvV5NBs.png", true ); - x.SetText( "The body is bruised and battered. Clearly they were clubbes to death." ); + x.SetText( "The body is bruised and battered. Clearly they were clubbed to death." ); break; case Player.DeathType.Weapon: targetTexture = Texture.Load( "https://i.imgur.com/eqyc9cW.png", true );