Updates & Fixes

# Updates & Fixes
- New Commands: Added `css_bot_place` which teleports a bot to the player's position with optional godmode and translation support.
- Miner (New Skill): Added a new skill that allows for detonating HE grenades near enemies.
- Bomb Abort Support: Introduced `BombAbortplant` support across `ISkill` and event registration; added handlers for aborting plants in Planter, ChillOut, and other skills.
- System (Rework & Optimization):
    - Reworked player event dispatching to call `SkillAction` once per distinct active skill, reducing redundant invocations.
    - Switched timing logic to use `Server.CurrentTime` (replacing `EngineTime`).
    - Added extensive null and validity guards for player and pawn objects.
- Skill-specific Changes:
    - AimLock: Fixed vector/validation issues and updated config defaults (cooldown, duration, and offset).
    - AreaReaper: Now uses `BombPlantedHere` state and includes `OnTick` alerts.
    - ChillOut & Planter: Improved tracking for planting players with center-print and HUD updates.
    - HomingNades: Simplified callbacks and fixed detonation timing.
    - Muhammed: Tweaked explosion delay handling and reduced friendly fire damage.
- Core & Utils:
    - TraceRay: Implemented `CS2TraceRay` for skills to prevent activation through doors or on dropped weapons.
    - Dependencies: Bumped `CounterStrikeSharp.API` to 1.0.364 and `MaxMind.Db` to 5.0.0.
    - Bug Fixes: Resolved multiple HUD/print update issues and fixed various translation keys.
This commit is contained in:
Juzlus 2026-04-05 03:08:43 +02:00
parent 8634665983
commit a8890bde6a
22 changed files with 669 additions and 149 deletions

View file

@ -42,6 +42,7 @@ namespace src.command
{ SplitCommands(config.NormalCommands.HealCommand.Alias), ("Heal", Command_Heal) },
{ SplitCommands(config.NormalCommands.HealthCommand.Alias), ("Set heath", Command_Health) },
{ SplitCommands(config.NormalCommands.PlantedBomb.Alias), ("Spawn planted bomb", Command_PlantedBomb) },
{ SplitCommands(config.NormalCommands.BotPlace.Alias), ("Place bot on your position", Command_BotPlace) },
{ SplitCommands(config.NormalCommands.HudCommand.Alias), ("Enable/Disable HUD", Command_HUD) },
{ SplitCommands(config.NormalCommands.SetStaticSkillCommand.Alias), ("Set static skill", Command_SetStaticSkill) },
{ SplitCommands(config.NormalCommands.ChangeLanguageCommand.Alias), ("Change language", Command_ChangeLanguage) },
@ -337,7 +338,7 @@ namespace src.command
if (int.TryParse(command.GetArg(1), out int health))
SkillUtils.AddHealth(pawn, health - pawn.Health, health);
player.PrintToChat($" {ChatColors.Green}{player.GetTranslation("healed")}");
player.PrintToChat($" {ChatColors.Green}{player.GetTranslation("set_health")}");
}
[CommandHelper(minArgs: 0, whoCanExecute: CommandUsage.CLIENT_ONLY)]
@ -358,7 +359,38 @@ namespace src.command
if (!int.TryParse(command.GetArg(1), out int time))
time = 40;
bomb.C4Blow = (float)Server.EngineTime + time;
bomb.C4Blow = Server.CurrentTime + time;
player.PrintToChat($" {ChatColors.Green}{player.GetTranslation("planted_bomb_spawned", [time])}");
}
[CommandHelper(minArgs: 0, whoCanExecute: CommandUsage.CLIENT_ONLY)]
private static void Command_BotPlace(CCSPlayerController? player, CommandInfo command)
{
Debug.WriteToDebug($"Player {player?.PlayerName} used the css_bot_place {command.ArgString} command.");
if (player == null || !player.IsValid || player.PlayerPawn.Value == null || !player.PlayerPawn.Value.IsValid || player.LifeState != (byte)LifeState_t.LIFE_ALIVE) return;
if (!string.IsNullOrEmpty(config.NormalCommands.BotPlace.Permissions) && !AdminManager.PlayerHasPermissions(player, config.NormalCommands.BotPlace.Permissions)) return;
var pawn = player.PlayerPawn.Value;
if (!player.PawnIsAlive || pawn.AbsOrigin == null || pawn.AbsRotation == null) return;
if (!int.TryParse(command.GetArg(1), out int botSlot))
botSlot = -1;
var bot = Utilities.GetPlayers().Where(p => p != null && p.IsValid && p.IsBot && p.PawnIsAlive && (botSlot == -1 || p.Slot == botSlot)).FirstOrDefault();
if (bot == null || bot.PlayerPawn.Value == null || !bot.PlayerPawn.Value.IsValid)
{
player.PrintToChat($" {ChatColors.Green}{player.GetTranslation("bot_placed_not_found")}");
return;
}
bot.PlayerPawn.Value.Teleport(new Vector(pawn.AbsOrigin.X, pawn.AbsOrigin.Y, pawn.AbsOrigin.Z), new QAngle(pawn.AbsRotation.X, pawn.AbsRotation.Y, pawn.AbsRotation.Z), Vector.Zero);
bot.PlayerPawn.Value.TakesDamage = true;
if ((bool.TryParse(command.GetArg(2), out bool godmode) && godmode == true)
|| (int.TryParse(command.GetArg(2), out int godmodeInt) && godmodeInt == 1))
bot.PlayerPawn.Value.TakesDamage = false;
player.PrintToChat($" {ChatColors.Green}{player.GetTranslation("bot_placed")}");
}
[CommandHelper(minArgs: 0, whoCanExecute: CommandUsage.CLIENT_ONLY)]