aboutsummaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/common')
-rw-r--r--src/common/Collision/Management/MMapFactory.cpp2
-rw-r--r--src/common/Collision/Management/MMapFactory.h1
-rw-r--r--src/common/Collision/Management/MMapManager.h2
-rw-r--r--src/common/Collision/Maps/MapDefines.h2
-rw-r--r--src/common/Collision/VMapDefinitions.h4
-rw-r--r--src/common/Common.cpp1
-rw-r--r--src/common/Cryptography/Authentication/AuthCrypt.cpp1
-rw-r--r--src/common/Cryptography/BigNumber.cpp1
-rw-r--r--src/common/Cryptography/BigNumber.h1
-rw-r--r--src/common/Cryptography/HMACSHA1.h1
-rw-r--r--src/common/Debugging/WheatyExceptionReport.cpp2
-rw-r--r--src/common/Debugging/WheatyExceptionReport.h1
-rw-r--r--src/common/Metric/Metric.cpp5
-rw-r--r--src/common/Utilities/ByteConverter.h1
-rw-r--r--src/common/Utilities/EventProcessor.cpp21
-rw-r--r--src/common/Utilities/EventProcessor.h8
16 files changed, 24 insertions, 30 deletions
diff --git a/src/common/Collision/Management/MMapFactory.cpp b/src/common/Collision/Management/MMapFactory.cpp
index 02295c2b2db..6834756dca6 100644
--- a/src/common/Collision/Management/MMapFactory.cpp
+++ b/src/common/Collision/Management/MMapFactory.cpp
@@ -41,4 +41,4 @@ namespace MMAP
g_MMapManager = nullptr;
}
}
-} \ No newline at end of file
+}
diff --git a/src/common/Collision/Management/MMapFactory.h b/src/common/Collision/Management/MMapFactory.h
index 4aa39c6ffcc..770cec1bf1a 100644
--- a/src/common/Collision/Management/MMapFactory.h
+++ b/src/common/Collision/Management/MMapFactory.h
@@ -47,4 +47,3 @@ namespace MMAP
}
#endif
-
diff --git a/src/common/Collision/Management/MMapManager.h b/src/common/Collision/Management/MMapManager.h
index e55a9a3a9d0..296eb813206 100644
--- a/src/common/Collision/Management/MMapManager.h
+++ b/src/common/Collision/Management/MMapManager.h
@@ -86,4 +86,4 @@ namespace MMAP
};
}
-#endif \ No newline at end of file
+#endif
diff --git a/src/common/Collision/Maps/MapDefines.h b/src/common/Collision/Maps/MapDefines.h
index 3dd19735ff9..ad7bdd5fddc 100644
--- a/src/common/Collision/Maps/MapDefines.h
+++ b/src/common/Collision/Maps/MapDefines.h
@@ -22,7 +22,7 @@
#include "DetourNavMesh.h"
const uint32 MMAP_MAGIC = 0x4d4d4150; // 'MMAP'
-#define MMAP_VERSION 6
+#define MMAP_VERSION 7
struct MmapTileHeader
{
diff --git a/src/common/Collision/VMapDefinitions.h b/src/common/Collision/VMapDefinitions.h
index d5beac48a3c..5af52770dd3 100644
--- a/src/common/Collision/VMapDefinitions.h
+++ b/src/common/Collision/VMapDefinitions.h
@@ -25,8 +25,8 @@
namespace VMAP
{
- const char VMAP_MAGIC[] = "VMAP_4.3";
- const char RAW_VMAP_MAGIC[] = "VMAP043"; // used in extracted vmap files with raw data
+ const char VMAP_MAGIC[] = "VMAP_4.4";
+ const char RAW_VMAP_MAGIC[] = "VMAP044"; // used in extracted vmap files with raw data
const char GAMEOBJECT_MODELS[] = "GameObjectModels.dtree";
// defined in TileAssembler.cpp currently...
diff --git a/src/common/Common.cpp b/src/common/Common.cpp
index 9e361c35e11..a41cf23fadb 100644
--- a/src/common/Common.cpp
+++ b/src/common/Common.cpp
@@ -39,4 +39,3 @@ LocaleConstant GetLocaleByName(const std::string& name)
return LOCALE_enUS; // including enGB case
}
-
diff --git a/src/common/Cryptography/Authentication/AuthCrypt.cpp b/src/common/Cryptography/Authentication/AuthCrypt.cpp
index 64d29782424..2b6eb3a5229 100644
--- a/src/common/Cryptography/Authentication/AuthCrypt.cpp
+++ b/src/common/Cryptography/Authentication/AuthCrypt.cpp
@@ -72,4 +72,3 @@ void AuthCrypt::EncryptSend(uint8 *data, size_t len)
_serverEncrypt.UpdateData(len, data);
}
-
diff --git a/src/common/Cryptography/BigNumber.cpp b/src/common/Cryptography/BigNumber.cpp
index c67e8c8fbbc..93463fedbd7 100644
--- a/src/common/Cryptography/BigNumber.cpp
+++ b/src/common/Cryptography/BigNumber.cpp
@@ -209,4 +209,3 @@ std::string BigNumber::AsDecStr() const
OPENSSL_free(ch);
return ret;
}
-
diff --git a/src/common/Cryptography/BigNumber.h b/src/common/Cryptography/BigNumber.h
index 8936ffffe53..0e68a760497 100644
--- a/src/common/Cryptography/BigNumber.h
+++ b/src/common/Cryptography/BigNumber.h
@@ -99,4 +99,3 @@ class TC_COMMON_API BigNumber
};
#endif
-
diff --git a/src/common/Cryptography/HMACSHA1.h b/src/common/Cryptography/HMACSHA1.h
index 972c9b02012..6b66a2a78d9 100644
--- a/src/common/Cryptography/HMACSHA1.h
+++ b/src/common/Cryptography/HMACSHA1.h
@@ -44,4 +44,3 @@ class TC_COMMON_API HmacHash
uint8 m_digest[SHA_DIGEST_LENGTH];
};
#endif
-
diff --git a/src/common/Debugging/WheatyExceptionReport.cpp b/src/common/Debugging/WheatyExceptionReport.cpp
index e818df4e8fb..f541efcc001 100644
--- a/src/common/Debugging/WheatyExceptionReport.cpp
+++ b/src/common/Debugging/WheatyExceptionReport.cpp
@@ -1028,7 +1028,7 @@ bool logChildren)
ULONG64 length;
SymGetTypeInfo(m_hProcess, modBase, innerTypeID, TI_GET_LENGTH, &length);
char buffer2[50];
- FormatOutputValue(buffer2, basicType, length, (PVOID)address, sizeof(buffer));
+ FormatOutputValue(buffer2, basicType, length, (PVOID)address, sizeof(buffer2));
symbolDetails.top().Value = buffer2;
}
bHandled = true;
diff --git a/src/common/Debugging/WheatyExceptionReport.h b/src/common/Debugging/WheatyExceptionReport.h
index 2fee14708f2..6a3560f1993 100644
--- a/src/common/Debugging/WheatyExceptionReport.h
+++ b/src/common/Debugging/WheatyExceptionReport.h
@@ -212,4 +212,3 @@ class WheatyExceptionReport
extern WheatyExceptionReport g_WheatyExceptionReport; // global instance of class
#endif // _WIN32
#endif // _WHEATYEXCEPTIONREPORT_
-
diff --git a/src/common/Metric/Metric.cpp b/src/common/Metric/Metric.cpp
index 10f0d13b688..e208cdc4aec 100644
--- a/src/common/Metric/Metric.cpp
+++ b/src/common/Metric/Metric.cpp
@@ -217,7 +217,12 @@ void Metric::ForceSend()
{
// Send what's queued only if io_service is stopped (so only on shutdown)
if (_enabled && _batchTimer->get_io_service().stopped())
+ {
+ _enabled = false;
SendBatch();
+ _batchTimer->cancel();
+ _overallStatusTimer->cancel();
+ }
}
void Metric::ScheduleOverallStatusLog()
diff --git a/src/common/Utilities/ByteConverter.h b/src/common/Utilities/ByteConverter.h
index 29d7497f242..18047d0d3a5 100644
--- a/src/common/Utilities/ByteConverter.h
+++ b/src/common/Utilities/ByteConverter.h
@@ -65,4 +65,3 @@ inline void EndianConvertReverse(uint8&) { }
inline void EndianConvertReverse( int8&) { }
#endif
-
diff --git a/src/common/Utilities/EventProcessor.cpp b/src/common/Utilities/EventProcessor.cpp
index 0149f222da8..eda5c5ed5ac 100644
--- a/src/common/Utilities/EventProcessor.cpp
+++ b/src/common/Utilities/EventProcessor.cpp
@@ -111,29 +111,24 @@ void EventProcessor::KillAllEvents(bool force)
m_events.clear();
}
-void EventProcessor::AddEvent(BasicEvent* Event, uint64 e_time, bool set_addtime)
+void EventProcessor::AddEvent(BasicEvent* event, uint64 e_time, bool set_addtime)
{
if (set_addtime)
- Event->m_addTime = m_time;
- Event->m_execTime = e_time;
- m_events.insert(std::pair<uint64, BasicEvent*>(e_time, Event));
+ event->m_addTime = m_time;
+ event->m_execTime = e_time;
+ m_events.insert(std::pair<uint64, BasicEvent*>(e_time, event));
}
-void EventProcessor::ModifyEventTime(BasicEvent* Event, uint64 newTime)
+void EventProcessor::ModifyEventTime(BasicEvent* event, uint64 newTime)
{
for (auto itr = m_events.begin(); itr != m_events.end(); ++itr)
{
- if (itr->second != Event)
+ if (itr->second != event)
continue;
- Event->m_execTime = newTime;
+ event->m_execTime = newTime;
m_events.erase(itr);
- m_events.insert(std::pair<uint64, BasicEvent*>(newTime, Event));
+ m_events.insert(std::pair<uint64, BasicEvent*>(newTime, event));
break;
}
}
-
-uint64 EventProcessor::CalculateTime(uint64 t_offset) const
-{
- return(m_time + t_offset);
-}
diff --git a/src/common/Utilities/EventProcessor.h b/src/common/Utilities/EventProcessor.h
index 9a356b0e3f5..488d4a98649 100644
--- a/src/common/Utilities/EventProcessor.h
+++ b/src/common/Utilities/EventProcessor.h
@@ -20,6 +20,7 @@
#define __EVENTPROCESSOR_H
#include "Define.h"
+#include "Duration.h"
#include <map>
class EventProcessor;
@@ -76,9 +77,10 @@ class TC_COMMON_API EventProcessor
void Update(uint32 p_time);
void KillAllEvents(bool force);
- void AddEvent(BasicEvent* Event, uint64 e_time, bool set_addtime = true);
- void ModifyEventTime(BasicEvent* Event, uint64 newTime);
- uint64 CalculateTime(uint64 t_offset) const;
+ void AddEvent(BasicEvent* event, uint64 e_time, bool set_addtime = true);
+ void AddEventAtOffset(BasicEvent* event, Milliseconds const& offset) { AddEvent(event, CalculateTime(offset.count())); }
+ void ModifyEventTime(BasicEvent* event, uint64 newTime);
+ uint64 CalculateTime(uint64 t_offset) const { return m_time + t_offset; }
protected:
uint64 m_time;