summaryrefslogtreecommitdiff
path: root/Client/Assembly-CSharp/DeadBody.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Client/Assembly-CSharp/DeadBody.cs')
-rw-r--r--Client/Assembly-CSharp/DeadBody.cs35
1 files changed, 35 insertions, 0 deletions
diff --git a/Client/Assembly-CSharp/DeadBody.cs b/Client/Assembly-CSharp/DeadBody.cs
new file mode 100644
index 0000000..5cab24a
--- /dev/null
+++ b/Client/Assembly-CSharp/DeadBody.cs
@@ -0,0 +1,35 @@
+using System;
+using UnityEngine;
+
+public class DeadBody : MonoBehaviour
+{
+ public Vector2 TruePosition
+ {
+ get
+ {
+ return base.transform.position + this.myCollider.offset;
+ }
+ }
+
+ public bool Reported;
+
+ public short KillIdx;
+
+ public byte ParentId;
+
+ public Collider2D myCollider;
+
+ public void OnClick()
+ {
+ if (this.Reported)
+ {
+ return;
+ }
+ if (!PhysicsHelpers.AnythingBetween(PlayerControl.LocalPlayer.GetTruePosition(), this.TruePosition, Constants.ShipAndObjectsMask, false))
+ {
+ this.Reported = true;
+ GameData.PlayerInfo playerById = GameData.Instance.GetPlayerById(this.ParentId);
+ PlayerControl.LocalPlayer.CmdReportDeadBody(playerById);
+ }
+ }
+}