示例#1
0
        // Token: 0x06000104 RID: 260 RVA: 0x00008C14 File Offset: 0x00006E14
        public bool isTripWireBeingTripped()
        {
            Vector3 vector;

            if (!this.checkFromMemory)
            {
                vector = Program.GameData.Player.EyePosition;
            }
            else
            {
                vector = Program.GameData.Player.getPlayerEyePosition(Program.GameProcess);
            }
            return(TripWire.is_player_at_location(this.x1, this.y1, this.x2, this.y2, this.x3, this.y3, this.x4, this.y4, this.z, (int)vector.X, (int)vector.Y, (int)vector.Z) && (this.triggerForTeam == Team.Unknown || Program.GameData.Player.Team == this.triggerForTeam));
        }
示例#2
0
        // Token: 0x06000107 RID: 263 RVA: 0x00008D48 File Offset: 0x00006F48
        private static bool is_player_at_location(int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4, int z, int playerX, int playerY, int playerZ)
        {
            if (z != 0 && playerZ < z)
            {
                return(false);
            }
            if (playerX == 0 && playerY == 0 && playerZ == 0)
            {
                return(false);
            }
            float num  = TripWire.area(x1, y1, x2, y2, x3, y3) + TripWire.area(x1, y1, x4, y4, x3, y3);
            float num2 = TripWire.area(playerX, playerY, x1, y1, x2, y2);
            float num3 = TripWire.area(playerX, playerY, x2, y2, x3, y3);
            float num4 = TripWire.area(playerX, playerY, x3, y3, x4, y4);
            float num5 = TripWire.area(playerX, playerY, x1, y1, x4, y4);

            return(num == num2 + num3 + num4 + num5);
        }