33 Commits

Author SHA1 Message Date
Gabriel Hirakawa
fcb3a939e2 Disable buggy LR and SD's (#404)
- Disable Coinflip LR
- Disable Speed Runners Special Day
2025-12-01 15:47:56 -08:00
pdtttt
c56ae735ca Trigger Build 2025-12-01 15:32:02 -08:00
ShookEagle
9ba38bdbf1 Trigger Build 2025-12-01 15:37:30 -06:00
ShookEagle
80c0943770 Disable Speedrunners Day 2025-12-01 12:28:31 -06:00
ShookEagle
5d38655914 Disable Coinflip LER 2025-12-01 12:28:23 -06:00
ShookEagle
ef3ade9efe Trigger Build 2025-11-24 07:33:04 -06:00
ShookEagle
100f1b4b5d Revert "Fix Grenade Bounce Detection"
This reverts commit 619a4b0f4b.
2025-11-24 07:32:11 -06:00
ShookEagle
675cb22ae6 Revert "Update Grenade Bounce Func"
This reverts commit 2fda4b2aae.
2025-11-24 07:32:10 -06:00
ShookEagle
13e260ae7e Revert "Re-Enable Rocket Jump"
This reverts commit e38a63a507.
2025-11-24 07:32:10 -06:00
ShookEagle
e38a63a507 Re-Enable Rocket Jump 2025-11-01 13:52:57 -05:00
ShookEagle
2fda4b2aae Update Grenade Bounce Func 2025-11-01 13:52:41 -05:00
ShookEagle
619a4b0f4b Fix Grenade Bounce Detection 2025-11-01 13:50:36 -05:00
MSWS
fb1affd1bb Build 2025-10-31 17:50:07 -07:00
Isaac
717df13482 Update dev (#402) 2025-10-19 02:38:33 -07:00
MSWS
86543064c5 Build 2025-10-18 21:17:24 -07:00
MSWS
345530feae Disable Damage Manager 2025-10-16 18:59:32 -07:00
MSWS
47d529e44c Fix compilation error 2025-10-16 13:57:29 -07:00
MSWS
0e899c48d7 Merge branch 'dev' 2025-10-16 13:54:21 -07:00
MSWS
2d9561b4a8 Update CS# 2025-10-16 13:54:14 -07:00
Isaac
6900848ef9 Re-add removed features (#401) 2025-10-12 11:44:58 -07:00
MSWS
b8beac3d14 Re-apply prod fixes 2025-10-12 11:42:59 -07:00
MSWS
4bde4e8f0a Re-add features 2025-10-12 11:31:10 -07:00
MSWS
1cf95f1b3d Remove TODO comment 2025-10-12 10:21:22 -07:00
MSWS
2182c22e44 Re-add removed features 2025-10-12 10:20:37 -07:00
Isaac
a2dd074403 Simplify LR Manager / Guntoss (#400) 2025-10-09 10:02:29 -07:00
MSWS
faeec955f8 Merge branch 'dev' of github.com:edgegamers/Jailbreak into dev 2025-10-09 10:00:36 -07:00
MSWS
4e94f724e9 refactor: Refactor damage and event handling logic for LRs
- Remove obsolete method overload in `IDamageBlocker.cs` to simplify the interface.
- Simplify logic in `GunToss.cs` by removing initialization and cleanup operations, locale injection, and timer setup for guard status.
- Refactor `LastRequestManager.cs` by:
  - Adding `JetBrains.Annotations` and replacing game event handler attributes for better annotation usage.
  - Streamlining last request event handling by removing redundant tasks and encapsulating utility functions.
  - Suppressing extra damage event broadcasts and improving message clarity.
  - Adjusting round time management logic for last requests.
2025-10-09 09:59:54 -07:00
Isaac
b89f2c1b60 Fix: Paint and Misc (#399)
Changelogs:
- Fix Paint
- Temporarily disable RJ until further notice
- Speculative LR Crash Fixes
- Speculative LR Damage Bug Fixes
2025-09-29 20:43:08 -07:00
Isaac
54e9262b56 Autowarden DS Perk, Special Day Tweaks (#396)
## Changelogs:
- Auto Warden DS Perk
- DS Perk that auto queues a player for warden if they are on the CT
Team
  - Available to DS-Silver+
  - Use `css_autowarden` and `css_aw` to enable auto warden
  - Will not queue AFK players for Warden
  - Default Value: `Disabled`
- Special Days
  - Rocket Jump
    - Delay Nova shots underwater
    - Buff Damage from 57 -> 65
    - Fix typos in messaging 
  - Ghost War
    - Fix Invisibility
2025-08-11 00:31:13 -07:00
Reece
9a5acc5926 Dev (#394) 2025-08-05 17:44:52 -05:00
blank_dvth
9cba0c155d fix: temporarily disable @aim for css_st due to CS# bug (#393) 2025-08-04 21:26:20 -04:00
Reece
dcc4da4ac5 Add Ghost War Day (#392) 2025-08-04 18:32:26 -05:00
Isaac
6ec15da3cf Dev (#391) 2025-08-04 16:07:57 -07:00
6 changed files with 25 additions and 37 deletions

View File

@@ -24,7 +24,7 @@ public class LastRequestFactory(ILastRequestManager manager,
guard, false),
LRType.ROCK_PAPER_SCISSORS => new RockPaperScissors(plugin, services,
prisoner, guard),
LRType.COINFLIP => new Coinflip(plugin, services, prisoner, guard),
// LRType.COINFLIP => new Coinflip(plugin, services, prisoner, guard),
// LRType.RACE => new Race(plugin, manager, prisoner, guard,
// services.GetRequiredService<ILRRaceLocale>()),
LRType.MAG_FOR_MAG => new BulletForBullet(plugin, services, prisoner,

View File

@@ -28,12 +28,12 @@ using Jailbreak.Public.Mod.Rainbow;
using Jailbreak.Public.Mod.Rebel;
using Jailbreak.Public.Mod.Weapon;
using Jailbreak.Public.Utils;
using JetBrains.Annotations;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Localization;
using MStatsShared;
namespace Jailbreak.LastRequest;
//TODO: Fix Various Server Crashes
public class LastRequestManager(ILRLocale messages, IServiceProvider provider)
: ILastRequestManager, IDamageBlocker {
@@ -87,8 +87,8 @@ public class LastRequestManager(ILRLocale messages, IServiceProvider provider)
// Both of them are in LR, verify they're in same LR
if (victimLR == null) return false;
if (victimLR.Prisoner.SteamID == attacker.SteamID
|| victimLR.Guard.SteamID == attacker.SteamID)
if (victimLR.Prisoner.Slot == attacker.Slot
|| victimLR.Guard.Slot == attacker.Slot)
// The person attacking is the victim's LR participant, allow damage
return false;
@@ -110,8 +110,8 @@ public class LastRequestManager(ILRLocale messages, IServiceProvider provider)
stats?.Stats.Add(new LRStat());
basePlugin.RegisterListener<Listeners.OnEntityParentChanged>(OnDrop);
VirtualFunctions.CBaseEntity_TakeDamageOldFunc.Hook(OnTakeDamage,
HookMode.Pre);
// VirtualFunctions.CBaseEntity_TakeDamageOldFunc.Hook(OnTakeDamage,
// HookMode.Pre);
VirtualFunctions.CCSPlayer_ItemServices_CanAcquireFunc.Hook(OnCanAcquire,
HookMode.Pre);
}
@@ -120,8 +120,8 @@ public class LastRequestManager(ILRLocale messages, IServiceProvider provider)
VirtualFunctions.CCSPlayer_ItemServices_CanAcquireFunc.Unhook(OnCanAcquire,
HookMode.Pre);
VirtualFunctions.CBaseEntity_TakeDamageOldFunc.Unhook(OnTakeDamage,
HookMode.Pre);
// VirtualFunctions.CBaseEntity_TakeDamageOldFunc.Unhook(OnTakeDamage,
// HookMode.Pre);
}
public void DisableLR() { IsLREnabled = false; }
@@ -443,14 +443,14 @@ public class LastRequestManager(ILRLocale messages, IServiceProvider provider)
}
private HookResult OnTakeDamage(DynamicHook hook) {
var info = hook.GetParam<CTakeDamageInfo>(1);
var playerPawn = hook.GetParam<CCSPlayerPawn>(0);
var info = hook.GetParam<CTakeDamageInfo>(1);
var player = playerPawn.Controller.Value?.As<CCSPlayerController>();
if (player == null || !player.IsValid) return HookResult.Continue;
var attackerPawn = info.Attacker;
var attacker = attackerPawn.Value?.As<CCSPlayerController>();
var attackerPawn = info.Attacker.Value?.As<CCSPlayerPawn>();
var attacker = attackerPawn?.As<CCSPlayerController>();
if (attacker == null || !attacker.IsValid) return HookResult.Continue;
@@ -459,6 +459,7 @@ public class LastRequestManager(ILRLocale messages, IServiceProvider provider)
HookResult.Continue;
}
[UsedImplicitly]
[GameEventHandler]
public HookResult OnTakeDamage(EventPlayerHurt ev, GameEventInfo info) {
var player = ev.Userid;
@@ -467,7 +468,7 @@ public class LastRequestManager(ILRLocale messages, IServiceProvider provider)
if (!ShouldBlockDamage(player, attacker)) return HookResult.Continue;
if (player.PlayerPawn.IsValid) {
var playerPawn = player.PlayerPawn.Value!;
playerPawn.Health = playerPawn.LastHealth;
playerPawn.Health += ev.DmgHealth;
}
info.DontBroadcast = false;
@@ -480,6 +481,7 @@ public class LastRequestManager(ILRLocale messages, IServiceProvider provider)
foreach (var lr in ActiveLRs.ToList())
EndLastRequest(lr, LRResult.TIMED_OUT);
IsLREnabled = false;
return HookResult.Continue;
}
@@ -489,6 +491,10 @@ public class LastRequestManager(ILRLocale messages, IServiceProvider provider)
IsLREnabled = false;
foreach (var player in Utilities.GetPlayers())
MenuManager.CloseActiveMenu(player);
foreach (var lr in ActiveLRs.ToList())
EndLastRequest(lr, LRResult.TIMED_OUT);
ActiveLRs.Clear();
return HookResult.Continue;
}

View File

@@ -20,11 +20,6 @@ public class GunToss(BasePlugin plugin, ILastRequestManager manager,
IServiceProvider provider, CCSPlayerController prisoner,
CCSPlayerController guard)
: TeleportingRequest(plugin, manager, prisoner, guard), IDropListener {
private readonly List<BeamLine> guardLines = [], prisonerLines = [];
private readonly ILRGunTossLocale locale =
provider.GetRequiredService<ILRGunTossLocale>();
/// <summary>
/// Null if no one has thrown a gun yet, negative if only one has thrown a gun,
/// Positive if both have thrown a gun.
@@ -56,11 +51,11 @@ public class GunToss(BasePlugin plugin, ILastRequestManager manager,
}
if (prisonerTossed && guardTossed) bothThrewTick = Server.TickCount;
if (bothThrewTick > 0)
Plugin.AddTimer(5, () => {
if (State != LRState.ACTIVE) return;
Guard.SetHealth(Math.Min(Guard.PlayerPawn.Value!.Health, 100));
if (State != LRState.ACTIVE || !Guard.IsValid || !Guard.Pawn.IsValid) return;
Guard.SetHealth(Math.Min(Guard.Pawn.Value!.Health, 100));
Guard.SetArmor(Math.Min(Guard.PawnArmor, 100));
});
}
@@ -70,7 +65,7 @@ public class GunToss(BasePlugin plugin, ILastRequestManager manager,
Prisoner.RemoveWeapons();
Guard.RemoveWeapons();
Server.NextFrame(() => {
if (!Guard.IsValid) return;
@@ -91,14 +86,7 @@ public class GunToss(BasePlugin plugin, ILastRequestManager manager,
Server.RunOnTick(Server.TickCount + 16, () => State = LRState.ACTIVE);
}
public override void OnEnd(LRResult result) {
State = LRState.COMPLETED;
guardLines.ForEach(l => l.Remove());
guardLines.Clear();
prisonerLines.ForEach(l => l.Remove());
prisonerLines.Clear();
}
public override void OnEnd(LRResult result) { State = LRState.COMPLETED; }
public override bool PreventEquip(CCSPlayerController player,
CCSWeaponBaseVData weapon) {

View File

@@ -24,7 +24,7 @@ public class SpecialDayFactory(IServiceProvider provider) : ISpecialDayFactory {
SDType.NOSCOPE => new NoScopeDay(plugin, provider),
SDType.OITC => new OneInTheChamberDay(plugin, provider),
//SDType.ROCKETJUMP => new RocketJumpDay(plugin, provider),
SDType.SPEEDRUN => new SpeedrunDay(plugin, provider),
//SDType.SPEEDRUN => new SpeedrunDay(plugin, provider),
SDType.TELEPORT => new TeleportDay(plugin, provider),
SDType.WARDAY => new WardayDay(plugin, provider),
_ => throw new NotImplementedException()

View File

@@ -8,7 +8,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="CounterStrikeSharp.API" Version="1.0.330" />
<PackageReference Include="CounterStrikeSharp.API" Version="1.0.342" />
<PackageReference Include="JetBrains.Annotations" Version="2024.2.0"/>
<PackageReference Include="System.Text.Json" Version="8.0.5"/>
<ProjectReference Include="..\Jailbreak.Tag\Jailbreak.Tag.csproj"/>

View File

@@ -7,12 +7,6 @@ namespace Jailbreak.Public.Mod.Damage;
/// taking damage.
/// </summary>
public interface IDamageBlocker {
[Obsolete("Do not use the EventPlayerHurt overload.")]
bool ShouldBlockDamage(CCSPlayerController victim,
CCSPlayerController? attacker, EventPlayerHurt @event) {
return ShouldBlockDamage(victim, attacker);
}
bool ShouldBlockDamage(CCSPlayerController victim,
CCSPlayerController? attacker);
}