OnDynamicCollision drop box .. missed a file in commit
This commit is contained in:
parent
701c0e19e1
commit
36761a8314
|
@ -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;
|
||||||
|
@ -51,23 +51,24 @@ void AttatchmentMassDriver::UseAttatchment(const GameLogic::WEAPON_FIRE &usage,
|
||||||
// add CD
|
// add CD
|
||||||
((Game*)&Game::Instance())->onActionEventFnc(this->owner, WeaponAction::WeaponAction_PrimaryShoot);
|
((Game*)&Game::Instance())->onActionEventFnc(this->owner, WeaponAction::WeaponAction_PrimaryShoot);
|
||||||
}
|
}
|
||||||
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 )
|
||||||
{
|
{
|
||||||
currentEnergy -= 1.0f;
|
if(this->hasObject)
|
||||||
if(!this->hasObject)
|
|
||||||
{
|
{
|
||||||
ForcePull(usage,dt);
|
currentEnergy -= 1.0f;
|
||||||
// add CD
|
if(!this->hasObject)
|
||||||
((Game*)&Game::Instance())->onActionEventFnc(this->owner, WeaponAction::WeaponAction_SecondaryShoot);
|
{
|
||||||
|
ForcePull(usage,dt);
|
||||||
|
// add CD
|
||||||
|
((Game*)&Game::Instance())->onActionEventFnc(this->owner, WeaponAction::WeaponAction_SecondaryShoot);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else //Energy drained, release object
|
else //Energy drained, release object
|
||||||
|
@ -76,20 +77,27 @@ void AttatchmentMassDriver::UseAttatchment(const GameLogic::WEAPON_FIRE &usage,
|
||||||
this->hasObject = false;
|
this->hasObject = false;
|
||||||
this->heldObject = NULL;
|
this->heldObject = NULL;
|
||||||
}
|
}
|
||||||
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
|
|
||||||
{
|
{
|
||||||
//((DynamicObject*)(this->heldObject->GetCustomTag()))->RemoveManipulation();
|
if (this->hasObject) //Dummy check
|
||||||
//this->hasObject = false;
|
{
|
||||||
//this->heldObject = NULL;
|
//((DynamicObject*)(this->heldObject->GetCustomTag()))->RemoveManipulation();
|
||||||
|
//this->hasObject = false;
|
||||||
|
//this->heldObject = NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
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;
|
||||||
|
@ -97,9 +105,8 @@ void AttatchmentMassDriver::UseAttatchment(const GameLogic::WEAPON_FIRE &usage,
|
||||||
// add CD
|
// add CD
|
||||||
((Game*)&Game::Instance())->onActionEventFnc(this->owner, WeaponAction::WeaponAction_UtilityActivate);
|
((Game*)&Game::Instance())->onActionEventFnc(this->owner, WeaponAction::WeaponAction_UtilityActivate);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void AttatchmentMassDriver::Update(float dt)
|
void AttatchmentMassDriver::Update(float dt)
|
||||||
|
|
Loading…
Reference in New Issue