Add ThirdEye door toggle and decoy ring config
This commit is contained in:
parent
38a7cb8c5c
commit
5c65f4ac71
8 changed files with 47 additions and 4 deletions
|
|
@ -1,9 +1,10 @@
|
|||
using CounterStrikeSharp.API;
|
||||
using CounterStrikeSharp.API.Core;
|
||||
using CounterStrikeSharp.API.Modules.Entities;
|
||||
using CounterStrikeSharp.API.Modules.Utils;
|
||||
using System.Drawing;
|
||||
using System.Collections.Concurrent;
|
||||
using src.utils;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Drawing;
|
||||
|
||||
namespace src.player.skills
|
||||
{
|
||||
|
|
@ -44,6 +45,19 @@ namespace src.player.skills
|
|||
cameras.TryRemove(player.Index, out _);
|
||||
}
|
||||
|
||||
public static bool IsOrginalCamera(CCSPlayerController player)
|
||||
{
|
||||
if (player == null || !player.IsValid) return true;
|
||||
|
||||
var pawn = player.PlayerPawn?.Value;
|
||||
if (pawn == null || !pawn.IsValid) return true;
|
||||
|
||||
if (cameras.TryGetValue(player.Index, out var cameraInfo) && cameraInfo.Item1 != 0)
|
||||
return pawn?.CameraServices?.ViewEntity.Raw == cameraInfo.Item1;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public static void OnTick()
|
||||
{
|
||||
foreach (var player in PlayerManager.GetTickPlayers())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue