v1.2.3.b4
- Curses are now tracked at all times and cleared when a player leaves, so a curse can no longer stick to whoever joins into that player slot afterwards - Wallhack and Nightmare no longer shows up for the whole server during the round start skill reveal - One skill throwing during round cleanup no longer cancels the rest of the cleanup or leaves entity kills suppressed for the rest of the map - Fixed the TakeAmmo crash on map change while restoring weapon reserve ammo - Friendly fire reduction now applies to BlastShot, DeathBomb, ExplodingBarrel, ExplosiveShot and ToxicSmoke - FireRain molotovs now land around the decoy instead of on nearby rooftops, and the fire keeps its owner and team so friendly fire rules apply to it - Teammates can no longer shoot the chickens spawned by HealingChicken - Fortnite wall now spawns with its model and health set up front, so it takes the configured amount of damage instead of breaking on the first bullet - JetKick, CarefulBullets and WildThrow now clean up after their target disconnects
This commit is contained in:
parent
20f1ba212a
commit
db7108517a
43 changed files with 449 additions and 208 deletions
|
|
@ -136,6 +136,39 @@ namespace src.player
|
|||
}
|
||||
}
|
||||
|
||||
private static void ReleaseCursesTargeting(uint victimIndex)
|
||||
{
|
||||
foreach (uint curserIndex in SkillUtils.GetCursersOf(victimIndex))
|
||||
{
|
||||
if (curserIndex == victimIndex) continue;
|
||||
|
||||
var curser = Utilities.GetPlayerFromIndex((int)curserIndex);
|
||||
if (curser == null || !curser.IsValid) continue;
|
||||
|
||||
if (PlayerManager.GetPlayerByIndex(curserIndex)?.Skill is not Skills curserSkill || curserSkill == Skills.None)
|
||||
continue;
|
||||
|
||||
try
|
||||
{
|
||||
Instance.SkillAction(curserSkill.ToString(), "DisableSkill", [curser]);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Server.PrintToConsole($"[jRandomSkills] {curserSkill}.DisableSkill failed while releasing curse on leaving player: {(ex.InnerException ?? ex).Message}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void DispatchCheckTransmit(object[] args)
|
||||
{
|
||||
var seen = new HashSet<Skills>();
|
||||
foreach (var p in Instance.SkillPlayer)
|
||||
{
|
||||
if (!seen.Add(p.Skill)) continue;
|
||||
InvokeSkill(p.Skill, "CheckTransmit", args);
|
||||
}
|
||||
}
|
||||
|
||||
private static void DispatchOnTakeDamage(DynamicHook h, bool post = false)
|
||||
{
|
||||
object[] args = [h];
|
||||
|
|
@ -517,6 +550,9 @@ namespace src.player
|
|||
Instance.SkillAction(skillPlayer.Skill.ToString(), "DisableSkill", [player]);
|
||||
|
||||
uint leavingIndex = player.Index;
|
||||
|
||||
ReleaseCursesTargeting(leavingIndex);
|
||||
|
||||
foreach (var skill in SkillData.Skills)
|
||||
Instance.SkillAction(skill.Skill.ToString(), "PlayerDisconnect", [leavingIndex]);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue