Skip to content

Commit

Permalink
Revert change in default teleport time (#6213)
Browse files Browse the repository at this point in the history
  • Loading branch information
lL1l1 authored May 24, 2024
1 parent 96224e5 commit 47c6861
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions changelog/snippets/fix.6213.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- (#6213) Fix the default teleport delay being set to 15 seconds instead of 0, which caused some modded units to teleport much slower.
8 changes: 6 additions & 2 deletions engine/Core/Blueprints/UnitBlueprint.lua
Original file line number Diff line number Diff line change
Expand Up @@ -755,8 +755,9 @@
---@field TeleportMassMod? number
--- Multiplied by the resulting total energy cost of the teleport to get its required time.
--- Treated as `0.01` when absent.
---@see TeleportDelay For an additional flat delay that also delays teleport FX showing at the destination.
---@field TeleportTimeMod? number
--- Whether to use the new variable teleport cost calculation method, or revert to the old
--- Whether to use the new distance-based teleport cost calculation method, or revert to the old unit cost based method.
---@field UseVariableTeleportCosts? boolean

---@class UnitBlueprintExternalFactory
Expand Down Expand Up @@ -947,7 +948,10 @@
---@field TarmacGlowDecal? any unused
--- defines the tech level used for display purposes
---@field TechLevel UnitTechLevel
--- if present, makes the "teleport" ability show up in the unit view with the delay of this value. Defaults to 15 seconds.
--- Extra time taken to teleport before other teleport time calculations. Defaults to 0 seconds.
--- If `UseVariableTeleportCosts` is false, then this also delays teleport FX appearing at the destination.
--- If `UseVariableTeleportCosts` is true, then destination FX appear after 0.4x the total teleport time.
---@see TeleportTimeMod For an energy-scaling teleport time that does not delay teleport FX at the destination.
---@field TeleportDelay? number
--- if present, adds a flat energy cost to the "teleport" ability. Defaults to 150000 energy. Only applies when `UseVariableTeleportCosts` is true.
---@field TeleportFlatEnergyCost? number
Expand Down
2 changes: 1 addition & 1 deletion lua/shared/teleport.lua
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ TeleportCostFunction = function(unit, location)
end

local dist = VDist3(pos, location)
local teleDelay = bp.General.TeleportDelay or 15
local teleDelay = bp.General.TeleportDelay or 0
local teleportFlatEnergyCost = bp.General.TeleportFlatEnergyCost or 75000
local teleportMaximumEnergyCost = bp.General.TeleportMaximumEnergyCost or 2500000
local teleportMaximumDuration = bp.General.TeleportMaximumDuration or 50
Expand Down

0 comments on commit 47c6861

Please sign in to comment.