fix: add check for arg nums on handlepushobject (#1081)

This commit is contained in:
Aaron Kimbrell 2023-05-10 07:44:21 -05:00 committed by GitHub
parent b1cd2776fa
commit bf0ae6f181
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -235,6 +235,8 @@ void TriggerComponent::HandleRotateObject(Entity* targetEntity, std::vector<std:
} }
void TriggerComponent::HandlePushObject(Entity* targetEntity, std::vector<std::string> argArray){ void TriggerComponent::HandlePushObject(Entity* targetEntity, std::vector<std::string> argArray){
if (argArray.size() < 3) return;
auto* phantomPhysicsComponent = m_Parent->GetComponent<PhantomPhysicsComponent>(); auto* phantomPhysicsComponent = m_Parent->GetComponent<PhantomPhysicsComponent>();
if (!phantomPhysicsComponent) { if (!phantomPhysicsComponent) {
Game::logger->LogDebug("TriggerComponent::HandlePushObject", "Phantom Physics component not found!"); Game::logger->LogDebug("TriggerComponent::HandlePushObject", "Phantom Physics component not found!");