From 328fc61b27533ea14e78c5e30ee98c2369884642 Mon Sep 17 00:00:00 2001 From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> Date: Wed, 23 Mar 2022 19:23:53 +0100 Subject: [PATCH] Fix MSVC compiler errors --- r5dev/game/server/ai_networkmanager.cpp | 7 ++++--- r5dev/tier0/cpu.cpp | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/r5dev/game/server/ai_networkmanager.cpp b/r5dev/game/server/ai_networkmanager.cpp index 9632388a..1246c6d6 100644 --- a/r5dev/game/server/ai_networkmanager.cpp +++ b/r5dev/game/server/ai_networkmanager.cpp @@ -75,7 +75,7 @@ void CAI_NetworkBuilder::SaveNetworkGraph(CAI_Network* pNetwork) } else { - Warning(eDLL_T::RTECH, "%s - No %s NavMesh found. Unable to calculate CRC for AI Network\n", __FUNCTION__, HULL_SIZE[3].c_str()); + Warning(eDLL_T::SERVER, "%s - No %s NavMesh found. Unable to calculate CRC for AI Network\n", __FUNCTION__, HULL_SIZE[3].c_str()); } // Large NavMesh CRC. @@ -169,9 +169,10 @@ void CAI_NetworkBuilder::SaveNetworkGraph(CAI_Network* pNetwork) if (pNetwork->m_iNumNodes > 0) { - uint32_t unkNodeBlock[pNetwork->m_iNumNodes]; + uint32_t* unkNodeBlock = new uint32_t[pNetwork->m_iNumNodes]; memset(&unkNodeBlock, '\0', pNetwork->m_iNumNodes * sizeof(uint32_t)); - writeStream.write(reinterpret_cast(&unkNodeBlock), pNetwork->m_iNumNodes * sizeof(uint32_t)); + writeStream.write(reinterpret_cast(*unkNodeBlock), pNetwork->m_iNumNodes * sizeof(uint32_t)); + delete[] unkNodeBlock; } // TODO: This is traverse nodes i think? these aren't used in r2 ains so we can get away with just writing count=0 and skipping diff --git a/r5dev/tier0/cpu.cpp b/r5dev/tier0/cpu.cpp index 4f5a7f64..a5e6a42d 100644 --- a/r5dev/tier0/cpu.cpp +++ b/r5dev/tier0/cpu.cpp @@ -445,7 +445,7 @@ const CPUInformation& GetCPUInformation(void) // it likes to report 0 processors for some reason. if (pi.m_nPhysicalProcessors == 0 && pi.m_nLogicalProcessors == 0) { - Assert(!"Missing CPU detection code for this processor."); + assert(!"Missing CPU detection code for this processor."); pi.m_nPhysicalProcessors = 1; pi.m_nLogicalProcessors = 1; }