From c9be0e540227c59216def01b1fab6192f92fd507 Mon Sep 17 00:00:00 2001 From: dongresource Date: Sun, 27 Sep 2020 20:29:26 +0200 Subject: [PATCH] Do not tick dead players. This fixes the "dancing in Fusion Matter" bug. Also (temporarily?) added updateNPCPosition() to the suppression list. Might want to take it out again (along with some of the other ones) if we do end up implementing Chunk GC. --- src/MobManager.cpp | 6 +++++- suppr.txt | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/MobManager.cpp b/src/MobManager.cpp index 991cbbb..4ca5f9f 100644 --- a/src/MobManager.cpp +++ b/src/MobManager.cpp @@ -547,6 +547,10 @@ void MobManager::playerTick(CNServer *serv, time_t currTime) { Player *plr = pair.second.plr; bool transmit = false; + // do not tick dead players + if (plr->HP <= 0) + continue; + // fm patch/lake damage if (plr->dotDamage) dealGooDamage(sock, 150); @@ -615,4 +619,4 @@ std::pair MobManager::getDamage(int attackPower, int defensePower, bool } return ret; -} \ No newline at end of file +} diff --git a/suppr.txt b/suppr.txt index 781647b..254330a 100644 --- a/suppr.txt +++ b/suppr.txt @@ -1,5 +1,6 @@ leak:TableData::init leak:ChunkManager::addPlayer leak:ChunkManager::addNPC +leak:NPCManager::updateNPCPosition leak:NPCManager::npcSummonHandler leak:nlohmann::basic_json