Common-Utils icon indicating copy to clipboard operation
Common-Utils copied to clipboard

You can escape as CI or MTF even when you're not cuffed

Open Czekoloczek opened this issue 1 year ago • 3 comments

Describe the bug You can escape as CI or MTF even when you're not cuffed

To Reproduce Steps to reproduce the behavior:

  1. Change your class to CI or MTF
  2. Go to the surface escape

Expected behavior Nothing

Server logs I don't think the vsr allows me to do that, because localadmin logs contains other users IP

Copy of current CU config section The problem is now fixed in #136 and I don't want to leak my config anymore

EXILED Version ("latest" is not a version): 8.8.1

Results of show plugins command in console: Command show does not exist! :trollface: (here's plym show instead) The problem is now fixed in #136 and I don't want to leak my plugins anymore Additional context https://youtu.be/BEzhoHXG7f8

Czekoloczek avatar Jun 02 '24 19:06 Czekoloczek

also the scp target counter goes up by 1 every time you escape as a not cuffed CI this doesn't affect the win conditions tho image

Czekoloczek avatar Jun 02 '24 19:06 Czekoloczek

also no matter if you're cuffed or not you always become a CI

Czekoloczek avatar Jun 02 '24 20:06 Czekoloczek

i confirm that here is the method that handles the escape, no check for if the player is cuffed or not and both case alwas leads to the chaosConscript role.

public void OnEscaping(EscapingEventArgs ev)
{
    if (ev.EscapeScenario is EscapeScenario.CustomEscape)
    {
        ev.NewRole = ev.Player.Role.Type switch
        {
            RoleTypeId.FacilityGuard or RoleTypeId.NtfPrivate or RoleTypeId.NtfSergeant or RoleTypeId.NtfCaptain or RoleTypeId.NtfSpecialist => RoleTypeId.ChaosConscript,
            RoleTypeId.ChaosConscript or RoleTypeId.ChaosMarauder or RoleTypeId.ChaosRepressor or RoleTypeId.ChaosRifleman => RoleTypeId.ChaosConscript,
            _ => RoleTypeId.None,
        };

        ev.IsAllowed = ev.NewRole is not RoleTypeId.None;
    }
}

Antoniofo avatar Jun 10 '24 20:06 Antoniofo