From f1e2bc01f6bc37eb31a8a6a4b09400e7c7551d42 Mon Sep 17 00:00:00 2001 From: Koncord Date: Fri, 19 Jan 2018 15:41:29 +0800 Subject: [PATCH] [General] Use floats instead of doubles for enchantmentCharge --- apps/openmw/mwmp/WorldEvent.cpp | 2 +- components/openmw-mp/Base/BaseEvent.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/openmw/mwmp/WorldEvent.cpp b/apps/openmw/mwmp/WorldEvent.cpp index a1ee01f17..d22e6de38 100644 --- a/apps/openmw/mwmp/WorldEvent.cpp +++ b/apps/openmw/mwmp/WorldEvent.cpp @@ -90,7 +90,7 @@ void WorldEvent::editContainers(MWWorld::CellStore* cellStore) if (containerItem.charge > -1) newPtr.getCellRef().setCharge(containerItem.charge); - if (containerItem.enchantmentCharge > -1) + if (containerItem.enchantmentCharge > -1.0f) newPtr.getCellRef().setEnchantmentCharge(containerItem.enchantmentCharge); containerStore.add(newPtr, containerItem.count, ownerPtr, true); diff --git a/components/openmw-mp/Base/BaseEvent.hpp b/components/openmw-mp/Base/BaseEvent.hpp index ef44176bb..93db6a8f2 100644 --- a/components/openmw-mp/Base/BaseEvent.hpp +++ b/components/openmw-mp/Base/BaseEvent.hpp @@ -12,7 +12,7 @@ namespace mwmp std::string refId; int count; int charge; - double enchantmentCharge; + float enchantmentCharge; int actionCount;