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