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,17 +13,8 @@ namespace src.player.skills
|
|||
public class Ghost : ISkill
|
||||
{
|
||||
private const Skills skillName = Skills.Ghost;
|
||||
private static readonly string[] disabledWeapons =
|
||||
[
|
||||
"weapon_deagle", "weapon_revolver", "weapon_glock", "weapon_usp_silencer",
|
||||
"weapon_cz75a", "weapon_fiveseven", "weapon_p250", "weapon_tec9",
|
||||
"weapon_elite", "weapon_hkp2000", "weapon_ak47", "weapon_m4a1",
|
||||
"weapon_m4a4", "weapon_m4a1_silencer", "weapon_famas", "weapon_galilar",
|
||||
"weapon_aug", "weapon_sg553", "weapon_mp9", "weapon_mac10",
|
||||
"weapon_bizon", "weapon_mp7", "weapon_ump45", "weapon_p90",
|
||||
"weapon_mp5sd", "weapon_ssg08", "weapon_awp", "weapon_scar20",
|
||||
"weapon_g3sg1", "weapon_nova", "weapon_xm1014", "weapon_mag7",
|
||||
"weapon_sawedoff", "weapon_m249", "weapon_negev"
|
||||
private static readonly string[] allowedWeapons = [
|
||||
"weapon_molotov", "weapon_incgrenade", "weapon_flashbang", "weapon_smokegrenade", "weapon_decoy", "weapon_hegrenade", "weapon_knife", "weapon_bayonet"
|
||||
];
|
||||
private static readonly ConcurrentDictionary<uint, byte> invisiblePlayers = [];
|
||||
private const string bloodParticle = "particles/blood_impact/blood_impact_high.vpcf";
|
||||
|
|
@ -96,7 +87,8 @@ namespace src.player.skills
|
|||
var entity = Utilities.GetEntityFromIndex<CBaseEntity>((int)playerPawn.Index);
|
||||
if (entity == null || !entity.IsValid) continue;
|
||||
|
||||
info.TransmitEntities.Remove(entity.Index);
|
||||
if (info.TransmitEntities.Contains(entity.Index))
|
||||
info.TransmitEntities.Remove(entity.Index);
|
||||
|
||||
var bombIndex = GetBombIndex(playerController);
|
||||
if (bombIndex == null) continue;
|
||||
|
|
@ -104,7 +96,8 @@ namespace src.player.skills
|
|||
var bombEntity = Utilities.GetEntityFromIndex<CBaseEntity>((int)bombIndex);
|
||||
if (bombEntity == null || !bombEntity.IsValid) continue;
|
||||
|
||||
info.TransmitEntities.Remove(bombEntity.Index);
|
||||
if (info.TransmitEntities.Contains(bombEntity.Index))
|
||||
info.TransmitEntities.Remove(bombEntity.Index);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -113,12 +106,15 @@ namespace src.player.skills
|
|||
public static void EnableSkill(CCSPlayerController player)
|
||||
{
|
||||
Event.EnableTransmit();
|
||||
|
||||
SetWeaponAttack(player, true);
|
||||
SkillUtils.SetPlayerInvisibility(player, .5f);
|
||||
invisiblePlayers.TryAdd(player.Index, 0);
|
||||
|
||||
if (EntityManager.GetPlayerEntities(player.Index, "empty_prop").Count == 0)
|
||||
CreatePlayerPosProp(player);
|
||||
|
||||
SkillUtils.ForceFullUpdateToAll();
|
||||
}
|
||||
|
||||
private static void CreatePlayerPosProp(CCSPlayerController player)
|
||||
|
|
@ -154,6 +150,8 @@ namespace src.player.skills
|
|||
|
||||
invisiblePlayers.TryRemove(player.Index, out _);
|
||||
EntityManager.DestroyPlayerEntities(player.Index);
|
||||
|
||||
SkillUtils.ForceFullUpdateToAll();
|
||||
}
|
||||
|
||||
public static void OnTick()
|
||||
|
|
@ -210,8 +208,10 @@ namespace src.player.skills
|
|||
if (pawn == null || !pawn.IsValid || pawn.WeaponServices == null) return;
|
||||
|
||||
foreach (var weapon in pawn.WeaponServices.MyWeapons)
|
||||
if (weapon != null && weapon.IsValid && weapon.Value != null && weapon.Value.IsValid)
|
||||
if (disabledWeapons.Contains(weapon.Value.DesignerName))
|
||||
if (weapon != null && weapon.IsValid && weapon.Value != null && weapon.Value.IsValid && !string.IsNullOrEmpty(weapon.Value.DesignerName))
|
||||
{
|
||||
string weaponName = weapon.Value.DesignerName;
|
||||
if (!allowedWeapons.Contains(weaponName))
|
||||
{
|
||||
weapon.Value.NextPrimaryAttackTick = disableWeapon ? int.MaxValue : Server.TickCount;
|
||||
weapon.Value.NextSecondaryAttackTick = disableWeapon ? int.MaxValue : Server.TickCount;
|
||||
|
|
@ -219,6 +219,7 @@ namespace src.player.skills
|
|||
Utilities.SetStateChanged(weapon.Value, "CBasePlayerWeapon", "m_nNextPrimaryAttackTick");
|
||||
Utilities.SetStateChanged(weapon.Value, "CBasePlayerWeapon", "m_nNextSecondaryAttackTick");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void UpdateHUD(CCSPlayerController player)
|
||||
|
|
@ -231,7 +232,7 @@ namespace src.player.skills
|
|||
if (playerInfo == null) return;
|
||||
|
||||
var weapon = pawn.WeaponServices.ActiveWeapon.Value;
|
||||
if (weapon == null || !weapon.IsValid || !disabledWeapons.Contains(weapon.DesignerName))
|
||||
if (weapon == null || !weapon.IsValid || allowedWeapons.Contains(weapon.DesignerName))
|
||||
{
|
||||
playerInfo.PrintHTML = null;
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue