Skip to content

Commit cfc90c0

Browse files
committed
Try fancy engine guard.
1 parent 25aa90e commit cfc90c0

1 file changed

Lines changed: 13 additions & 4 deletions

File tree

gamedata/modrules.lua

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,17 @@
1111
local forceSingleThreaded = false
1212
local modoptions = Spring.GetModOptions()
1313
if (modoptions and (modoptions.mtpath == 0 or modoptions.mtpath == "0")) then
14-
forceSingleThreaded = true
14+
forceSingleThreaded = true
1515
end
1616
Spring.Echo("forceSingleThreaded", forceSingleThreaded)
1717

1818
local pathExperiment = false
1919
local pathfinder = Spring.GetModOptions().pathfinder or "qtpfs"
2020
if Script.IsEngineMinVersion and Script.IsEngineMinVersion(2025, 3, 0) and (pathfinder == "qtpfs") then
21-
pathExperiment = true
22-
Spring.Echo("pathfinderSelection pathWithQtpfs")
21+
pathExperiment = true
22+
Spring.Echo("pathfinderSelection pathWithQtpfs")
2323
else
24-
Spring.Echo("pathfinderSelection pathWithOld")
24+
Spring.Echo("pathfinderSelection pathWithOld")
2525
end
2626

2727
local modrules = {
@@ -40,6 +40,15 @@ local modrules = {
4040
forceCollisionAvoidanceSingleThreaded = forceSingleThreaded,
4141
},
4242

43+
guard = {
44+
guardRecalculateThreshold = 100.0, -- Distance that a guardee must move before the guard goal is recalculated
45+
guardStoppedProximityGoal = 120.0, -- Distance that a guardian will stop at nearing a stopped guardee
46+
guardStoppedExtraDistance = 40.0, -- The extra distance a guardian will keep from a stopped guardee
47+
guardMovingProximityGoal = 160.0, -- Distance the guardian is considered to be in guarding range and will match the velocity
48+
guardMovingIntervalMultiplier = 3, -- A multiplier for the moving goal while guarding, smaller values will result in higher detail movement but more performance cost
49+
guardInterceptionLimit = 128.0, -- Limit for the intercept when a guardian is not in guarding range
50+
},
51+
4352
construction = {
4453
constructionDecay = false; -- defaults to true
4554
constructionDecayTime = 6.66; -- defaults to 6.66

0 commit comments

Comments
 (0)