v1.2.2.b2
## GENERAL - Updated CSS to version 1.0.369. - Upgraded the project from .NET 8.0 to .NET 10.0. - Updated Turkish language translation by @ByDexterTR. - Added Russian language translation by @213sdfsdgf. - Fixed an issue with incorrect display of Arabic nicknames. - Used ForceFullUpdate to resolve the "FATAL ERROR: CopyExistingEntity" crash. - Disabled stale HandleCommandDrop hook to avoid crashes when a player joins a team (thanks to @vladimir214sd). - Added new signatures to gamedata. - Added the ability to configure the number of grenades for every skill that uses grenades as part of its ability (e.g., Miner, AntyFlash, MagneticDecoy, etc.). ## SKILL IMPROVEMENTS - Re-Zombie: -- Fixed weapon switching issues when a player is holding a Zeus and a knife. -- Weapons are now removed for bots in zombie mode. - Ghost: -- Blocked the ability to use the Zeus. - Thorns: -- Added a configurable maximum health limit (37 HP) for the damage that can be reflected. - Second Life / Phoenix / Re-Zombie: -- Fixed an issue where players would occasionally fail to respawn if they took too much damage too quickly. - Ghost / Chicken: -- Blocked the ability to use the SG556 (`weapon_sg556`). - Wallhack: -- Fixed a bug that caused temporary enemy highlighting right after death. - Cypher: -- Added camera position persistence. - God Mode: -- Fixed an issue with permanent immortality triggering after reaching exactly 0 HP. - Weapons Swap: -- The ammo count is now also transferred when weapons are swapped. - Muhammed: -- Renamed the skill to "DeathBomb". - Spectator: -- Fixed a bug where a player with the Chicken skill would still display as a ragdoll after death when spectated. - Friendly Fire: -- The skill now works even when the server's mp_friendlyfire setting is set to 0. - Baseball: -- Disabled teammate killing.
This commit is contained in:
parent
cba834e8f0
commit
91761f7376
84 changed files with 6894 additions and 1689 deletions
|
|
@ -13,6 +13,8 @@ namespace src.player.skills
|
|||
private static readonly ConcurrentDictionary<uint, PlayerSkillInfo> SkillPlayerInfo = [];
|
||||
private static readonly object setLock = new();
|
||||
|
||||
public static bool HaveHodMode(uint playerIndex) => SkillPlayerInfo.TryGetValue(playerIndex, out var skillInfo) && skillInfo.CanUse == false;
|
||||
|
||||
public static void LoadSkill()
|
||||
{
|
||||
SkillUtils.RegisterSkill(skillName, SkillsInfo.GetValue<string>(skillName, "color"));
|
||||
|
|
@ -30,8 +32,12 @@ namespace src.player.skills
|
|||
{
|
||||
SteamID = player.Index,
|
||||
CanUse = true,
|
||||
HaveGodMode = false,
|
||||
Cooldown = DateTime.MinValue,
|
||||
});
|
||||
|
||||
if (SkillPlayerInfo.TryGetValue(player.Index, out var skillInfo))
|
||||
skillInfo.HaveGodMode = true;
|
||||
}
|
||||
|
||||
public static void OnTick()
|
||||
|
|
@ -90,11 +96,15 @@ namespace src.player.skills
|
|||
{
|
||||
skillInfo.CanUse = false;
|
||||
skillInfo.Cooldown = DateTime.Now;
|
||||
skillInfo.HaveGodMode = true;
|
||||
|
||||
PlayerManager.GetPlayerFromEvent(player)?.PrintToChat($" {ChatColors.Green} {player.GetTranslation("godmode_on")}");
|
||||
player.PlayerPawn.Value.TakesDamage = false;
|
||||
|
||||
Instance.AddTimer(SkillsInfo.GetValue<float>(skillName, "duration"), () => {
|
||||
if (SkillPlayerInfo.TryGetValue(playerIndex, out var skillInfo))
|
||||
skillInfo.HaveGodMode = false;
|
||||
|
||||
var player = Utilities.GetPlayerFromIndex((int)playerIndex);
|
||||
if (player != null && player.IsValid)
|
||||
{
|
||||
|
|
@ -102,6 +112,9 @@ namespace src.player.skills
|
|||
|
||||
player.PlayerPawn.Value.TakesDamage = true;
|
||||
PlayerManager.GetPlayerFromEvent(player)?.PrintToChat($" {ChatColors.Red} {player.GetTranslation("godmode_off")}");
|
||||
|
||||
if (player.PlayerPawn.Value.Health <= 0)
|
||||
player.CommitSuicide(false, true);
|
||||
}
|
||||
}, CounterStrikeSharp.API.Modules.Timers.TimerFlags.STOP_ON_MAPCHANGE);
|
||||
}
|
||||
|
|
@ -112,6 +125,7 @@ namespace src.player.skills
|
|||
{
|
||||
public ulong SteamID { get; set; }
|
||||
public bool CanUse { get; set; }
|
||||
public bool HaveGodMode { get; set; }
|
||||
public DateTime Cooldown { get; set; }
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue