aboutsummaryrefslogtreecommitdiffstats
path: root/code/pawn/component/camera/PlayerCameraComponent.cs
diff options
context:
space:
mode:
authorLeonardo Bishop <me@leonardobishop.com>2023-07-30 19:12:09 +0100
committerLeonardo Bishop <me@leonardobishop.com>2023-07-30 19:12:09 +0100
commit4ae38adb208c435ff6a021cdd0517768c5314fe6 (patch)
tree18ccbffd5fd3d385983ba41f3cd0031586995733 /code/pawn/component/camera/PlayerCameraComponent.cs
parent970e3de202b1482ae72b85487414d9b933818774 (diff)
Add observed health and team colours to spectator mode
Diffstat (limited to 'code/pawn/component/camera/PlayerCameraComponent.cs')
-rw-r--r--code/pawn/component/camera/PlayerCameraComponent.cs15
1 files changed, 15 insertions, 0 deletions
diff --git a/code/pawn/component/camera/PlayerCameraComponent.cs b/code/pawn/component/camera/PlayerCameraComponent.cs
index 5011c67..702f0c8 100644
--- a/code/pawn/component/camera/PlayerCameraComponent.cs
+++ b/code/pawn/component/camera/PlayerCameraComponent.cs
@@ -45,4 +45,19 @@ public class PlayerCameraComponent : BaseCameraComponent
pl.ViewAngles = viewAngles.WithPitch( viewAngles.pitch.Clamp( -89f, 89f ) );
return;
}
+
+ public override InventoryComponent GetObservedInventory()
+ {
+ return Entity.Inventory;
+ }
+
+ public override float GetObservedHealth()
+ {
+ return Entity.Health;
+ }
+
+ public override Team GetObservedTeam()
+ {
+ return Entity.CurrentTeam;
+ }
}