GL - using movetolimbo in massdriver pickup functionallity

This commit is contained in:
Erik Persson 2014-02-03 15:45:48 +01:00
parent f1f56fc769
commit d77b3d92d8
2 changed files with 2 additions and 1 deletions

View File

@ -80,6 +80,7 @@ void AttatchmentMassDriver::ForcePush(const GameLogic::WEAPON_FIRE &usage, float
Oyster::Physics::ICustomBody::State state = heldObject->GetState();
state.ApplyLinearImpulse((Oyster::Math::Float3)pushForce);
heldObject->SetState(state);
Oyster::Physics::API::Instance().ReleaseFromLimbo(heldObject);
hasObject = false;
heldObject = NULL;
return;

View File

@ -119,8 +119,8 @@ using namespace GameLogic;
switch(realObj->GetObjectType())
{
case OBJECT_TYPE::OBJECT_TYPE_BOX:
obj->SetGravity(true); //will now ignore gravity, dont mind the naming
//move obj to limbo in physics to make sure it wont collide with anything
Oyster::Physics::API::Instance().MoveToLimbo(obj);
weapon->heldObject = obj; //weapon now holds the object
weapon->hasObject = true;