diff --git a/src/Debug.cs b/src/Debug.cs index a698e39..6fa8c80 100644 --- a/src/Debug.cs +++ b/src/Debug.cs @@ -41,8 +41,8 @@ public static void test_laser(CCSPlayerController? invoke, CommandInfo command) if(pawn != null && pawn.AbsOrigin != null) { - //Vector end = new Vector(pawn.AbsOrigin.X + 100.0f,pawn.AbsOrigin.Y + 100.0f,pawn.AbsOrigin.Z + 100.0f); - Vector end = pawn.LookTargetPosition; + Vector end = new Vector(pawn.AbsOrigin.X + 100.0f,pawn.AbsOrigin.Y,pawn.AbsOrigin.Z + 100.0f); + //Vector end = pawn.LookTargetPosition; if(invoke != null) { diff --git a/src/Lib.cs b/src/Lib.cs index b53e847..3d0e8c0 100644 --- a/src/Lib.cs +++ b/src/Lib.cs @@ -71,7 +71,7 @@ static public bool is_ct(this CCSPlayerController? player) // yes i know the null check is redundant but C# is dumb static public bool is_valid_alive(this CCSPlayerController? player) { - return player != null && player.is_valid() && player.PawnIsAlive; + return player != null && player.is_valid() && player.PawnIsAlive && player.get_health() > 0; } static public CCSPlayerPawn? pawn(this CCSPlayerController? player) @@ -247,6 +247,9 @@ static public void draw_laser(Vector start, Vector end, float life, float width, laser.Render = color; laser.Width = 2.0f; + // circle not working? + //laser.Flags |= 8; + // set pos laser.Teleport(start, ANGLE_ZERO, VEC_ZERO);