mirror of
https://github.com/Gurge44/EndlessHostRoles.git
synced 2026-10-20 01:46:25 +00:00
fix dissolve time desync
This commit is contained in:
1 parent
345c683789
commit
f0afd36b96
2 files changed
+2
-17
No files matched your search
@@ -398,6 +398,8 @@ public sealed class PlayerGameOptionsSender(PlayerControl player) : GameOptionsS
|
||||
case CustomGameMode.Standard:
|
||||
{
|
||||
President.OnAnyoneApplyGameOptions(opt);
|
||||
|
||||
AURoleOptions.ViperDissolveTime = ImpostorVanillaRoles.ViperDissolveTime.GetFloat(); // can't be desynced
|
||||
|
||||
float playerSpeed = Main.AllPlayerSpeed.GetValueOrDefault(player.PlayerId);
|
||||
bool frozen = Mathf.Approximately(playerSpeed, Main.MinSpeed);
|
||||
@@ -521,11 +523,6 @@ public sealed class PlayerGameOptionsSender(PlayerControl player) : GameOptionsS
|
||||
AURoleOptions.DetectiveSuspectLimit = Examiner.ExaminerSuspectLimit.GetFloat();
|
||||
break;
|
||||
}
|
||||
case CustomRoles.Venom when roleTypes == RoleTypes.Viper:
|
||||
{
|
||||
AURoleOptions.ViperDissolveTime = Venom.VenomDissolveTime.GetFloat();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -570,9 +567,6 @@ public sealed class PlayerGameOptionsSender(PlayerControl player) : GameOptionsS
|
||||
case CustomRoles.DetectiveEHR:
|
||||
AURoleOptions.DetectiveSuspectLimit = CrewmateVanillaRoles.DetectiveSuspectLimit.GetFloat();
|
||||
break;
|
||||
case CustomRoles.ViperEHR:
|
||||
AURoleOptions.ViperDissolveTime = ImpostorVanillaRoles.ViperDissolveTime.GetFloat();
|
||||
break;
|
||||
}
|
||||
|
||||
// When impostor alert is off, and the player is a desync crewmate, set impostor alert as true
|
||||
@@ -696,9 +690,6 @@ public sealed class PlayerGameOptionsSender(PlayerControl player) : GameOptionsS
|
||||
case RoleTypes.Tracker:
|
||||
AURoleOptions.TrackerCooldown *= 0.75f;
|
||||
break;
|
||||
case RoleTypes.Viper:
|
||||
AURoleOptions.ViperDissolveTime *= 0.75f;
|
||||
break;
|
||||
case RoleTypes.Detective:
|
||||
AURoleOptions.DetectiveSuspectLimit *= 1.25f;
|
||||
goto default;
|
||||
|
||||
@@ -4,14 +4,8 @@ public class Venom : IAddon
|
||||
{
|
||||
public AddonTypes Type => AddonTypes.ImpOnly;
|
||||
|
||||
public static OptionItem VenomDissolveTime;
|
||||
|
||||
public void SetupCustomOption()
|
||||
{
|
||||
Options.SetupAdtRoleOptions(654500, CustomRoles.Venom, canSetNum: true);
|
||||
|
||||
VenomDissolveTime = new FloatOptionItem(654510, "ViperDissolveTime", new(0f, 60f, 0.5f), 10f, TabGroup.Addons)
|
||||
.SetParent(Options.CustomRoleSpawnChances[CustomRoles.Venom])
|
||||
.SetValueFormat(OptionFormat.Seconds);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user