mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-05-20 08:26:59 -04:00
fixed high cpu usage caused by spawning stupid amounts of script objects each tick
This commit is contained in:
@@ -616,6 +616,9 @@ namespace FFXIVClassic_Map_Server.Actors
|
||||
{
|
||||
foreach (Actor a in mActorList.Values)
|
||||
a.Update(tick);
|
||||
|
||||
var deltaTime = (tick - Program.LastTick).Milliseconds;
|
||||
LuaEngine.GetInstance().CallLuaFunction(null, this, "onUpdate", true, deltaTime);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -166,9 +166,9 @@ namespace FFXIVClassic_Map_Server.actors.area
|
||||
public override void Update(DateTime tick)
|
||||
{
|
||||
// todo: again, this is retarded but debug stuff
|
||||
var diffTime = tick - lastUpdate;
|
||||
base.Update(tick);
|
||||
|
||||
var diffTime = tick - lastUpdate;
|
||||
// arbitrary cap
|
||||
if (diffTime.Milliseconds >= 33)
|
||||
{
|
||||
|
Reference in New Issue
Block a user