Skip to content

Commit

Permalink
Merge pull request #310 from GMLambda/opsie
Browse files Browse the repository at this point in the history
Fix the spawn delay when npc makers are activated
  • Loading branch information
ZehMatt authored Jul 21, 2024
2 parents 8971123 + b225525 commit 22d8d30
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions entities/entities/lambda_npcmaker.lua
Original file line number Diff line number Diff line change
Expand Up @@ -274,14 +274,9 @@ end
function ENT:Enable()
self:SetNWVar("Disabled", false)
self.Think = self.MakerThink
local spawnFrequency = self:GetNWVar("SpawnFrequency")
local curTime = CurTime()
if spawnFrequency ~= -1 then
self.NextSpawnTime = curTime + spawnFrequency
else
self.NextSpawnTime = curTime
end
self:NextThink(self.NextSpawnTime)
self.NextSpawnTime = curTime
self:NextThink(curTime)
end

function ENT:Disable()
Expand Down

0 comments on commit 22d8d30

Please sign in to comment.