mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-08-04 08:41:58 +02:00
fixed high cpu usage caused by spawning stupid amounts of script objects each tick
This commit is contained in:
parent
53207a9ff0
commit
ddad27a5f9
7 changed files with 41 additions and 27 deletions
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -396,8 +396,7 @@ namespace FFXIVClassic_Map_Server.Actors
|
|||
|
||||
public override void Update(DateTime tick)
|
||||
{
|
||||
var deltaTime = (tick - aiContainer.GetLatestUpdate()).Milliseconds;
|
||||
LuaEngine.GetInstance().CallLuaFunction(null, this, "onUpdate", true, deltaTime);
|
||||
|
||||
}
|
||||
|
||||
//A party member list packet came, set the party
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue