From b2a3dd9d60ff256fac310311a79f94bb258577ce Mon Sep 17 00:00:00 2001 From: David Cernat Date: Fri, 9 Mar 2018 21:14:56 +0200 Subject: [PATCH] Revert "[Server] Add previous state to ON_RECORD_DYNAMIC" This reverts commit 2ac01dc02a4f85d63b89859c999b3b1ce028c8c9. Commit 2ac01dc02a4f85d63b89859c999b3b1ce028c8c9 had confused the ON_RECORD_DYNAMIC event meant for custom items with a hypothetical ON_PLAYER_STATS_DYNAMIC event meant for dynamic player stats and had added functionality appropriate for the latter. ON_PLAYER_STATS_DYNAMIC was never implemented because it would have caused too much event spam, with it constantly being triggered by any running player losing fatigue. If it ends up being added, the reverted lines from 2ac01dc02a4f85d63b89859c999b3b1ce028c8c9 should be added to it instead. --- .../player/ProcessorRecordDynamic.hpp | 21 +------------------ 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/apps/openmw-mp/processors/player/ProcessorRecordDynamic.hpp b/apps/openmw-mp/processors/player/ProcessorRecordDynamic.hpp index b36270840..14838fe06 100644 --- a/apps/openmw-mp/processors/player/ProcessorRecordDynamic.hpp +++ b/apps/openmw-mp/processors/player/ProcessorRecordDynamic.hpp @@ -8,36 +8,17 @@ namespace mwmp class ProcessorRecordDynamic final : public PlayerProcessor { public: - using OldDState = ESM::StatState; ProcessorRecordDynamic() { BPP_INIT(ID_RECORD_DYNAMIC) - - Networking::get().getState().getState()->new_usertype("OldDState", - "base", &OldDState::mBase, - "current", &OldDState::mCurrent, - "mod", &OldDState::mMod, - "damage", &OldDState::mDamage, - "progress", &OldDState::mProgress); - } - - void PreReading(PlayerPacket &packet, const std::shared_ptr &player) override - { - std::copy(std::begin(player->creatureStats.mDynamic), - std::end(player->creatureStats.mDynamic), - oldValues.begin() - ); - } void Do(PlayerPacket &packet, const std::shared_ptr &player) override { DEBUG_PRINTF(strPacketID.c_str()); - Networking::get().getState().getEventCtrl().Call(&oldValues, player); + Networking::get().getState().getEventCtrl().Call(player); } - private: - std::array oldValues; }; }