- Changed PawnIsAlive to LifeState
- Changed AdminCache - now it only removes flags added in the database - not all assigned to player
- Added config variable `IgnoredIps` to ignore ip check on connect, useful when proxying
This commit is contained in:
Dawid Bepierszcz 2025-03-25 11:39:00 +01:00
parent 888d6b0152
commit b6c876d709
13 changed files with 134 additions and 70 deletions

View file

@ -73,7 +73,7 @@ public static class PlayerExtensions
public static void SetHp(this CCSPlayerController? controller, int health = 100)
{
if (controller == null) return;
if ((health <= 0 || !controller.PawnIsAlive || controller.PlayerPawn.Value == null)) return;
if (health <= 0 || controller.PlayerPawn.Value == null || controller.PlayerPawn?.Value?.LifeState != (int)LifeState_t.LIFE_ALIVE) return;
controller.PlayerPawn.Value.Health = health;