GL - using movetolimbo in massdriver pickup functionallity
This commit is contained in:
parent
f1f56fc769
commit
d77b3d92d8
|
@ -80,6 +80,7 @@ void AttatchmentMassDriver::ForcePush(const GameLogic::WEAPON_FIRE &usage, float
|
||||||
Oyster::Physics::ICustomBody::State state = heldObject->GetState();
|
Oyster::Physics::ICustomBody::State state = heldObject->GetState();
|
||||||
state.ApplyLinearImpulse((Oyster::Math::Float3)pushForce);
|
state.ApplyLinearImpulse((Oyster::Math::Float3)pushForce);
|
||||||
heldObject->SetState(state);
|
heldObject->SetState(state);
|
||||||
|
Oyster::Physics::API::Instance().ReleaseFromLimbo(heldObject);
|
||||||
hasObject = false;
|
hasObject = false;
|
||||||
heldObject = NULL;
|
heldObject = NULL;
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -119,8 +119,8 @@ using namespace GameLogic;
|
||||||
switch(realObj->GetObjectType())
|
switch(realObj->GetObjectType())
|
||||||
{
|
{
|
||||||
case OBJECT_TYPE::OBJECT_TYPE_BOX:
|
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
|
//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->heldObject = obj; //weapon now holds the object
|
||||||
weapon->hasObject = true;
|
weapon->hasObject = true;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue