y
This commit is contained in:
parent
61718e2981
commit
f657b6a4a4
94 changed files with 3970 additions and 1241 deletions
|
|
@ -12,9 +12,11 @@
|
|||
function updateClock(worldRef, dt) {
|
||||
const previousDay = worldRef.day || 1;
|
||||
worldRef.time += dt;
|
||||
worldRef.day = Math.floor(worldRef.time / CONFIG.dayLength) + 1;
|
||||
worldRef.elapsedDays = Math.max(0, Math.floor(worldRef.time / CONFIG.dayLength));
|
||||
worldRef.day = worldRef.elapsedDays + 1;
|
||||
if (worldRef.day !== previousDay) {
|
||||
for (const t of worldRef.tarinai || []) if (t) t.personalityDaily = { day: worldRef.day, total: 0, byKey: {}, byCause: {} };
|
||||
global.TarinaiAchievements?.evaluateEvent?.(worldRef, "season", { previousDay, day: worldRef.day });
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -43,8 +45,10 @@
|
|||
}
|
||||
|
||||
function prepareSpatialFrame(worldRef) {
|
||||
worldRef.spatialRebuildsThisFrame = 0;
|
||||
worldRef.spatialDirtyMarksThisFrame = 0;
|
||||
if (global.TarinaiPerf?.diagnosticsEnabled?.() === true) {
|
||||
worldRef.spatialRebuildsThisFrame = 0;
|
||||
worldRef.spatialDirtyMarksThisFrame = 0;
|
||||
}
|
||||
worldRef.ensureSpatial?.("update-start");
|
||||
worldRef.beginFramePerformanceBudgets?.();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue