summaryrefslogtreecommitdiff
path: root/Client/Assembly-CSharp/DeadBody.cs
blob: 5cab24aec5299f4852aba4e7a277af8fffedf06b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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);
		}
	}
}