From 763fcdbd9ccbdfc6aa8ee556eff7ed97489d99c9 Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Sun, 22 Jan 2023 14:22:28 -0800 Subject: [PATCH] Various minor fixes --- Runtime/CMain.cpp | 3 +-- Runtime/ConsoleVariables/CVarManager.cpp | 6 ++++- Runtime/ConsoleVariables/CVarManager.hpp | 3 ++- Runtime/Input/RumbleFxTable.cpp | 2 +- Runtime/MP1/World/CMetroidPrimeProjectile.cpp | 26 ++++++++++++++++++- Runtime/MP1/World/CMetroidPrimeProjectile.hpp | 12 +++++++++ extern/aurora | 2 +- 7 files changed, 47 insertions(+), 7 deletions(-) diff --git a/Runtime/CMain.cpp b/Runtime/CMain.cpp index 3f68eae06..4217088e8 100644 --- a/Runtime/CMain.cpp +++ b/Runtime/CMain.cpp @@ -490,10 +490,9 @@ int main(int argc, char** argv) { do { metaforce::CVarManager cvarMgr{fileMgr}; metaforce::CVarCommons cvarCmns{cvarMgr}; + cvarMgr.parseCommandLine(args); if (!restart) { - cvarMgr.parseCommandLine(args); - // TODO add clear loggers func to logvisor so we can recreate loggers on restart bool logging = IsClientLoggingEnabled(argc, argv); #if _WIN32 diff --git a/Runtime/ConsoleVariables/CVarManager.cpp b/Runtime/ConsoleVariables/CVarManager.cpp index 8879f4a4b..0252c1efd 100644 --- a/Runtime/ConsoleVariables/CVarManager.cpp +++ b/Runtime/ConsoleVariables/CVarManager.cpp @@ -294,6 +294,7 @@ void CVarManager::parseCommandLine(const std::vector& args) { cv->fromLiteralToType(cvarValue); } cv->m_wasDeserialized = true; + cv->forceClearModified(); CStringExtras::ToLower(cvarName); if (developerName == cvarName) /* Make sure we're not overriding developer mode when we restore */ @@ -301,7 +302,10 @@ void CVarManager::parseCommandLine(const std::vector& args) { } else { /* Unable to find an existing CVar, let's defer for the time being 8 */ CStringExtras::ToLower(cvarName); - m_deferedCVars.insert_or_assign(std::move(cvarName), std::move(cvarValue)); + if (cvarValue.empty()) { + cvarValue = "true"; + } + m_deferedCVars.insert(std::make_pair(std::move(cvarName), std::move(cvarValue))); } } diff --git a/Runtime/ConsoleVariables/CVarManager.hpp b/Runtime/ConsoleVariables/CVarManager.hpp index de049d2aa..bec4275c7 100644 --- a/Runtime/ConsoleVariables/CVarManager.hpp +++ b/Runtime/ConsoleVariables/CVarManager.hpp @@ -3,6 +3,7 @@ #include #include #include +#include #include #include "Runtime/ConsoleVariables/CVar.hpp" @@ -109,7 +110,7 @@ private: void restoreDeveloper(bool oldDeveloper); std::unordered_map> m_cvars; - std::unordered_map m_deferedCVars; + std::map m_deferedCVars; std::vector loadCVars(const std::string& filename) const; }; diff --git a/Runtime/Input/RumbleFxTable.cpp b/Runtime/Input/RumbleFxTable.cpp index 9bb60bb18..2331d22f0 100644 --- a/Runtime/Input/RumbleFxTable.cpp +++ b/Runtime/Input/RumbleFxTable.cpp @@ -15,7 +15,7 @@ constexpr RumbleFXTable RumbleFxTable{{ {0.48f, 0.f, 0.065f, 0.175f, 0.4f, 0.0f, false, false}, {0.72f, 0.f, 0.01f, 0.01f, 0.6f, 0.1f, false, false}, {0.24f, 0.f, 0.01f, 0.525f, 0.2f, 0.2f, false, false}, - {2.4f, 0.f, 0.01f, 0.466f, 0.f, 0.f, false, false}, // PlayerBump + {2.4f, 0.f, 0.01f, 0.466f, 0.f, 0.f, false, false}, // PlayerBump {0.5532f, 0.f, 0.f, 1.345f, 0.f, 1.756f, false, false}, // PlayerGunCharge {2.4f, 0.f, 0.01f, 0.125f, 0.25f, 0.5f, false, false}, // PlayerMissileFire {0.84f, 0.f, 0.1f, 0.125f, 0.35f, 1.0f, false, false}, // PlayerGrappleFire diff --git a/Runtime/MP1/World/CMetroidPrimeProjectile.cpp b/Runtime/MP1/World/CMetroidPrimeProjectile.cpp index 3c96b62f0..6258ba49d 100644 --- a/Runtime/MP1/World/CMetroidPrimeProjectile.cpp +++ b/Runtime/MP1/World/CMetroidPrimeProjectile.cpp @@ -1,7 +1,8 @@ #include "Runtime/MP1/World/CMetroidPrimeProjectile.hpp" - +#include "Runtime/World/CFire.hpp" #include "Runtime/CSimplePool.hpp" #include "Runtime/GameGlobalObjects.hpp" +#include "Runtime/CStateManager.hpp" namespace metaforce::MP1 { @@ -30,4 +31,27 @@ CMetroidPrimeProjectile::CMetroidPrimeProjectile(bool active, const TToken>& visorParticle, u16 visorSfx, bool sendCollideMsg); + + bool Explode(const zeus::CVector3f& pos, const zeus::CVector3f& normal, const EWeaponCollisionResponseTypes type, + CStateManager& mgr, const CDamageVulnerability& dVuln, TUniqueId hitActor) override; }; } // namespace metaforce::MP1 diff --git a/extern/aurora b/extern/aurora index b91c2739c..ca822a767 160000 --- a/extern/aurora +++ b/extern/aurora @@ -1 +1 @@ -Subproject commit b91c2739c9bff672355daf3bf6daa4d8813a52ba +Subproject commit ca822a7679bd0589ce8243f0138054085e3cabd6