Skip to content

Commit

Permalink
Merge pull request #293 from GMLambda/trigger-fix
Browse files Browse the repository at this point in the history
Fix trigger_multiple ignoring the delay time
  • Loading branch information
ZehMatt authored May 25, 2024
2 parents 5f09ca1 + 2051b75 commit 779433b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
0.9.24 (in development)
- Fixed: trigger_multiple ignoring the delay time.

0.9.23
- Improved: Some minor performance improvements for level transitioning.
Expand Down
5 changes: 3 additions & 2 deletions entities/entities/trigger_changelevel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,23 @@ if SERVER then

function ENT:PreInitialize()
BaseClass.PreInitialize(self)
BaseClass.SetWaitTime(self, -1) -- Remove once triggered.
self:SetInputFunction("ChangeLevel", self.InputChangeLevel)
self.TargetMap = ""
self.Landmark = ""
self.DisableTouch = false
end

function ENT:Initialize()
BaseClass.Initialize(self)

local timeout = GAMEMODE:GetSetting("map_change_timeout")
self:SetKeyValue("teamwait", "1")
self:SetKeyValue("timeout", timeout)
self:SetKeyValue("lockplayers", "1")
self:SetKeyValue("timeoutteleport", "0")
self:SetNWVar("DisableEndTouch", true)
self:AddSpawnFlags(SF_TRIGGER_ALLOW_CLIENTS)
BaseClass.Initialize(self)
BaseClass.SetWaitTime(self, -1) -- Remove once triggered.
end

function ENT:KeyValue(key, val)
Expand Down
5 changes: 2 additions & 3 deletions entities/entities/trigger_multiple.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ if SERVER then
ENT.Type = "brush"
DEFINE_BASECLASS("lambda_trigger")

function ENT:Initialize()
--DbgPrint(self, "trigger_multiple:Initialize")
BaseClass.Initialize(self)
function ENT:PreInitialize()
BaseClass.PreInitialize(self)
BaseClass.SetWaitTime(self, 0.2)
end
end
5 changes: 2 additions & 3 deletions entities/entities/trigger_once.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ if SERVER then
ENT.Type = "brush"
DEFINE_BASECLASS("lambda_trigger")

function ENT:Initialize()
--DbgPrint(self, "trigger_once:Initialize")
BaseClass.Initialize(self)
function ENT:PreInitialize()
BaseClass.PreInitialize(self)
BaseClass.SetWaitTime(self, -1) -- Remove once triggered.
end
end

0 comments on commit 779433b

Please sign in to comment.