From 5c0fdf1a0ba9e4938e4dc154e1756158550171b7 Mon Sep 17 00:00:00 2001 From: d1str4ught <> Date: Fri, 22 Aug 2025 22:49:19 +0200 Subject: [PATCH] fps fixed --- src/game/char.cpp | 2 +- src/game/char_item.cpp | 4 ++-- src/game/main.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/game/char.cpp b/src/game/char.cpp index a8edf83..51f0ba7 100644 --- a/src/game/char.cpp +++ b/src/game/char.cpp @@ -7262,5 +7262,5 @@ int CHARACTER::GetSkillPowerByLevel(int level, bool bMob) const void CHARACTER::SetLastPMPulse(void) { - m_iLastPMPulse = thecore_pulse() + 25; + m_iLastPMPulse = thecore_pulse() + passes_per_sec; } diff --git a/src/game/char_item.cpp b/src/game/char_item.cpp index 693fa2d..986979a 100644 --- a/src/game/char_item.cpp +++ b/src/game/char_item.cpp @@ -5437,11 +5437,11 @@ bool CHARACTER::DropItem(TItemPos Cell, BYTE bCount) PIXEL_POSITION pxPos = GetXYZ(); // Clear the variable, it looks the player does not dropped any item in the past second. - if (thecore_pulse() > LastDropTime + 25) + if (thecore_pulse() > LastDropTime + passes_per_sec) CountDrops = 0; // It looks the player dropped min. 4 items in the past 1 second - if (thecore_pulse() < LastDropTime + 25 && CountDrops >= 4) + if (thecore_pulse() < LastDropTime + passes_per_sec && CountDrops >= 4) { // Set it to 0 CountDrops = 0; diff --git a/src/game/main.cpp b/src/game/main.cpp index fc0e065..8243d93 100644 --- a/src/game/main.cpp +++ b/src/game/main.cpp @@ -791,7 +791,7 @@ int start(int argc, char **argv) if (!bVerbose) freopen("stdout", "a", stdout); - bool is_thecore_initialized = thecore_init(25, heartbeat); + bool is_thecore_initialized = thecore_init(passes_per_sec, heartbeat); if (!is_thecore_initialized) {