From bcff7ff6988240ebd556ce7ce25a76ed53c0d581 Mon Sep 17 00:00:00 2001 From: greerdv Date: Tue, 8 Jun 2021 14:53:22 +0100 Subject: [PATCH] fix argument processing for physx debug console commands --- Gems/PhysXDebug/Code/Source/SystemComponent.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Gems/PhysXDebug/Code/Source/SystemComponent.cpp b/Gems/PhysXDebug/Code/Source/SystemComponent.cpp index 34315eb11e..5f3186604c 100644 --- a/Gems/PhysXDebug/Code/Source/SystemComponent.cpp +++ b/Gems/PhysXDebug/Code/Source/SystemComponent.cpp @@ -565,9 +565,9 @@ namespace PhysXDebug static void physx_CullingBoxSize([[maybe_unused]] const AZ::ConsoleCommandContainer& arguments) { const int argumentCount = arguments.size(); - if (argumentCount == 2) + if (argumentCount == 1) { - float newCullingBoxSize = (float)strtol(AZ::CVarFixedString(arguments[1]).c_str(), nullptr, 10); + float newCullingBoxSize = (float)strtol(AZ::CVarFixedString(arguments[0]).c_str(), nullptr, 10); PhysXDebug::PhysXDebugRequestBus::Broadcast(&PhysXDebug::PhysXDebugRequestBus::Events::SetCullingBoxSize, newCullingBoxSize); } else @@ -584,9 +584,9 @@ namespace PhysXDebug const int argumentCount = arguments.size(); - if (argumentCount == 2) + if (argumentCount == 1) { - const auto userPreference = static_cast(strtol(AZ::CVarFixedString(arguments[1]).c_str(), nullptr, 10)); + const auto userPreference = static_cast(strtol(AZ::CVarFixedString(arguments[0]).c_str(), nullptr, 10)); switch (userPreference) {