Merge pull request #1182 from aws-lumberyard-dev/physx_debug_args_fix
fix argument processing for physx debug console commands
This commit is contained in:
@@ -565,9 +565,9 @@ namespace PhysXDebug
|
|||||||
static void physx_CullingBoxSize([[maybe_unused]] const AZ::ConsoleCommandContainer& arguments)
|
static void physx_CullingBoxSize([[maybe_unused]] const AZ::ConsoleCommandContainer& arguments)
|
||||||
{
|
{
|
||||||
const int argumentCount = arguments.size();
|
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);
|
PhysXDebug::PhysXDebugRequestBus::Broadcast(&PhysXDebug::PhysXDebugRequestBus::Events::SetCullingBoxSize, newCullingBoxSize);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -584,9 +584,9 @@ namespace PhysXDebug
|
|||||||
|
|
||||||
const int argumentCount = arguments.size();
|
const int argumentCount = arguments.size();
|
||||||
|
|
||||||
if (argumentCount == 2)
|
if (argumentCount == 1)
|
||||||
{
|
{
|
||||||
const auto userPreference = static_cast<DebugCVarValues>(strtol(AZ::CVarFixedString(arguments[1]).c_str(), nullptr, 10));
|
const auto userPreference = static_cast<DebugCVarValues>(strtol(AZ::CVarFixedString(arguments[0]).c_str(), nullptr, 10));
|
||||||
|
|
||||||
switch (userPreference)
|
switch (userPreference)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user