Rework pilot, fix spawnspoints location

# Updates & Fixes (v1.2.1.b4)
- Pilot (Rework): Completely rewritten jump and fuel logic. You must now double-click space to activate flying. Re-activating in mid-air is now smoother and fuel consumption is properly clamped.
- Hermit: Increased default `HealthToAdd` to 100 and adjusted reserve ammo values.
- Planter / ShortBomb: Notifications now reach all valid players regardless of life status.
- ChillOut: Removed redundant empty center-print messages.
- System & Optimization:
    - Skill Detection: Faster lookups for enabled skills using the core skill list.
    - Round Logic: More stable round termination using direct game rules calls.
    - SkillUtils: Fixed spawn point selection bugs and memory referencing issues.
This commit is contained in:
Juzlus 2026-04-06 20:59:03 +02:00
parent 17f26a1458
commit 3954fc3af4
13 changed files with 74 additions and 46 deletions

View file

@ -12,15 +12,15 @@ namespace src.player.skills
private const Skills skillName = Skills.Hermit;
private static readonly ConcurrentDictionary<string, int> ConcurrentDictionary = new(
[
new KeyValuePair<string, int>("weapon_glock", 120), new KeyValuePair<string, int>("weapon_usp_silencer", 24), new KeyValuePair<string, int>("weapon_hkp2000", 52), new KeyValuePair<string, int>("weapon_p250", 26),
new KeyValuePair<string, int>("weapon_cz75", 12), new KeyValuePair<string, int>("weapon_deagle", 35), new KeyValuePair<string, int>("weapon_fiveseven", 100), new KeyValuePair<string, int>("weapon_elite", 120),
new KeyValuePair<string, int>("weapon_tec9", 90), new KeyValuePair<string, int>("weapon_revolver", 8), new KeyValuePair<string, int>("weapon_mac10", 100), new KeyValuePair<string, int>("weapon_mp9", 120),
new KeyValuePair<string, int>("weapon_mp7", 120), new KeyValuePair<string, int>("weapon_mp5", 120), new KeyValuePair<string, int>("weapon_mp5sd", 120), new KeyValuePair<string, int>("weapon_ump45", 100),
new KeyValuePair<string, int>("weapon_p90", 100), new KeyValuePair<string, int>("weapon_bizon", 120), new KeyValuePair<string, int>("weapon_ak47", 90), new KeyValuePair<string, int>("weapon_m4a1", 90),
new KeyValuePair<string, int>("weapon_m4a1_silencer", 80), new KeyValuePair<string, int>("weapon_galilar", 90), new KeyValuePair<string, int>("weapon_famas", 90), new KeyValuePair<string, int>("weapon_aug", 90),
new KeyValuePair<string, int>("weapon_sg556", 90), new KeyValuePair<string, int>("weapon_ssg08", 90), new KeyValuePair<string, int>("weapon_awp", 30), new KeyValuePair<string, int>("weapon_scar20", 90),
new KeyValuePair<string, int>("weapon_g3sg1", 90), new KeyValuePair<string, int>("weapon_nova", 32), new KeyValuePair<string, int>("weapon_xm1014", 32), new KeyValuePair<string, int>("weapon_sawedoff", 32),
new KeyValuePair<string, int>("weapon_mag7", 32), new KeyValuePair<string, int>("weapon_m249", 200), new KeyValuePair<string, int>("weapon_negev", 300)
new KeyValuePair<string, int>("weapon_glock", 3), new KeyValuePair<string, int>("weapon_usp_silencer", 2), new KeyValuePair<string, int>("weapon_hkp2000", 4), new KeyValuePair<string, int>("weapon_p250", 3),
new KeyValuePair<string, int>("weapon_cz75", 2), new KeyValuePair<string, int>("weapon_deagle", 3), new KeyValuePair<string, int>("weapon_fiveseven", 2), new KeyValuePair<string, int>("weapon_elite", 2),
new KeyValuePair<string, int>("weapon_tec9", 3), new KeyValuePair<string, int>("weapon_revolver", 2), new KeyValuePair<string, int>("weapon_mac10", 3), new KeyValuePair<string, int>("weapon_mp9", 2),
new KeyValuePair<string, int>("weapon_mp7", 3), new KeyValuePair<string, int>("weapon_mp5", 3), new KeyValuePair<string, int>("weapon_mp5sd", 3), new KeyValuePair<string, int>("weapon_ump45", 3),
new KeyValuePair<string, int>("weapon_p90", 2), new KeyValuePair<string, int>("weapon_bizon", 2), new KeyValuePair<string, int>("weapon_ak47", 3), new KeyValuePair<string, int>("weapon_m4a1", 4),
new KeyValuePair<string, int>("weapon_m4a1_silencer", 3), new KeyValuePair<string, int>("weapon_galilar", 4), new KeyValuePair<string, int>("weapon_famas", 4), new KeyValuePair<string, int>("weapon_aug", 3),
new KeyValuePair<string, int>("weapon_sg556", 3), new KeyValuePair<string, int>("weapon_ssg08", 2), new KeyValuePair<string, int>("weapon_awp", 2), new KeyValuePair<string, int>("weapon_scar20", 2),
new KeyValuePair<string, int>("weapon_g3sg1", 2), new KeyValuePair<string, int>("weapon_nova", 32), new KeyValuePair<string, int>("weapon_xm1014", 32), new KeyValuePair<string, int>("weapon_sawedoff", 32),
new KeyValuePair<string, int>("weapon_mag7", 3), new KeyValuePair<string, int>("weapon_m249", 2), new KeyValuePair<string, int>("weapon_negev", 2)
]);
private static readonly ConcurrentDictionary<string, int> maxReserveAmmo = ConcurrentDictionary;
@ -52,7 +52,7 @@ namespace src.player.skills
SkillUtils.AddHealth(pawn, SkillsInfo.GetValue<int>(skillName, "healthToAdd"));
}
public class SkillConfig(Skills skill = skillName, bool active = true, string color = "#ded678", CsTeam onlyTeam = CsTeam.None, bool disableOnFreezeTime = false, bool needsTeammates = false, string requiredPermission = "", int healthToAdd = 25) : SkillsInfo.DefaultSkillInfo(skill, active, color, onlyTeam, disableOnFreezeTime, needsTeammates, requiredPermission)
public class SkillConfig(Skills skill = skillName, bool active = true, string color = "#ded678", CsTeam onlyTeam = CsTeam.None, bool disableOnFreezeTime = false, bool needsTeammates = false, string requiredPermission = "", int healthToAdd = 100) : SkillsInfo.DefaultSkillInfo(skill, active, color, onlyTeam, disableOnFreezeTime, needsTeammates, requiredPermission)
{
public int HealthToAdd { get; set; } = healthToAdd;
}