Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions FastTravelPlugin/FastTravelPlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,13 @@ public FastTravelPlugin(FastTravelConfiguration configuration,
{
_aiSpline = aiSpline ?? throw new ConfigurationException("FastTravelPlugin does not work with AI traffic disabled");

if (configuration.DisableCollisions && serverConfiguration.CSPTrackOptions.MinimumCSPVersion < CSPVersion.V0_2_8)
{
throw new ConfigurationException("FastTravelPlugin needs a minimum required CSP version of 0.2.8 (3424)");
}
var requiredVersion = configuration.DisableCollisions ? CSPVersion.V0_2_8 : CSPVersion.V0_2_0;
var requiredVersionString = configuration.DisableCollisions ? "0.2.8 (3424)" : "0.2.0 (2651)";
var minimumVersion = serverConfiguration.CSPTrackOptions.MinimumCSPVersion ?? throw new ConfigurationException($"FastTravelPlugin needs a minimum required CSP version of {requiredVersionString}");

if (!configuration.DisableCollisions && serverConfiguration.CSPTrackOptions.MinimumCSPVersion < CSPVersion.V0_2_0)
if (minimumVersion < requiredVersion)
{
throw new ConfigurationException("FastTravelPlugin needs a minimum required CSP version of 0.2.0 (2651)");
throw new ConfigurationException($"FastTravelPlugin needs a minimum required CSP version of {requiredVersionString}");
}

if (!serverConfiguration.Extra.EnableClientMessages)
Expand Down
2 changes: 2 additions & 0 deletions FastTravelPlugin/lua/fasttravel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,7 @@ local function window_FastTravelDebug()
if ui.checkbox("Use Group Draw Mode", debugUseGroupDrawMode) then
debugUseGroupDrawMode = not debugUseGroupDrawMode
config.useGroupDrawMode = debugUseGroupDrawMode
getTeleports()
end

if not debugUseGroupDrawMode then
Expand All @@ -346,6 +347,7 @@ local function window_FastTravelDebug()
debugHideUntypedPoints, config.hideUntypedPoints = debugOrigHideUntypedPoints, debugOrigHideUntypedPoints
debugUseGroupDrawMode, config.useGroupDrawMode = debugOrigUseGroupDrawMode, debugOrigUseGroupDrawMode
debugDistanceModeRange, config.distanceModeRange = debugOrigDistanceModeRange, debugOrigDistanceModeRange
getTeleports()
end
end)

Expand Down