OnDynamicCollision drop box .. missed a file in commit

This commit is contained in:
Dander7BD 2014-02-27 14:37:15 +01:00
parent 701c0e19e1
commit 36761a8314
1 changed files with 29 additions and 22 deletions

View File

@ -43,7 +43,7 @@ void AttatchmentMassDriver::UseAttatchment(const GameLogic::WEAPON_FIRE &usage,
//switch case to determin what functionallity to use in the attatchment
switch (usage)
{
case WEAPON_FIRE::WEAPON_USE_PRIMARY_PRESS:
case WEAPON_USE_PRIMARY_PRESS:
//if(currentEnergy >= 9.0f)
{
currentEnergy -= 9.0f;
@ -53,14 +53,14 @@ void AttatchmentMassDriver::UseAttatchment(const GameLogic::WEAPON_FIRE &usage,
}
break;
case WEAPON_FIRE::WEAPON_USE_SECONDARY_PRESS:
case WEAPON_USE_SECONDARY_PRESS:
if(this->hasObject)
{
((DynamicObject*)(this->heldObject->GetCustomTag()))->RemoveManipulation();
this->hasObject = false;
this->heldObject = NULL;
goto CASE_WEAPON_INTERRUPT;
}
else if( currentEnergy >= 1.0f )
{
if(this->hasObject)
{
currentEnergy -= 1.0f;
if(!this->hasObject)
@ -70,6 +70,7 @@ void AttatchmentMassDriver::UseAttatchment(const GameLogic::WEAPON_FIRE &usage,
((Game*)&Game::Instance())->onActionEventFnc(this->owner, WeaponAction::WeaponAction_SecondaryShoot);
}
}
}
else //Energy drained, release object
{
((DynamicObject*)(this->heldObject->GetCustomTag()))->RemoveManipulation();
@ -78,6 +79,13 @@ void AttatchmentMassDriver::UseAttatchment(const GameLogic::WEAPON_FIRE &usage,
}
break;
case WEAPON_INTERRUPT:
CASE_WEAPON_INTERRUPT:
((DynamicObject*)(this->heldObject->GetCustomTag()))->RemoveManipulation();
this->hasObject = false;
this->heldObject = NULL;
break;
case WEAPON_USE_SECONDARY_RELEASE:
{
if (this->hasObject) //Dummy check
@ -89,7 +97,7 @@ void AttatchmentMassDriver::UseAttatchment(const GameLogic::WEAPON_FIRE &usage,
}
break;
case WEAPON_FIRE::WEAPON_USE_UTILLITY_PRESS:
case WEAPON_USE_UTILLITY_PRESS:
if(currentEnergy >= 90.0f)
{
currentEnergy -= 90.0f;
@ -99,7 +107,6 @@ void AttatchmentMassDriver::UseAttatchment(const GameLogic::WEAPON_FIRE &usage,
}
break;
}
}
void AttatchmentMassDriver::Update(float dt)