Picked box should be dropped when impacted by any dynamic object
This commit is contained in:
parent
8111e9f51e
commit
2592e4d3e3
|
@ -242,6 +242,18 @@ using namespace GameLogic;
|
|||
return;
|
||||
}
|
||||
|
||||
Player *player = realObjA->getManipulatingPlayer();
|
||||
if( player != nullptr )
|
||||
{
|
||||
player->UseWeapon( WEAPON_INTERRUPT );
|
||||
}
|
||||
|
||||
player = realObjB->getManipulatingPlayer();
|
||||
if( player != nullptr )
|
||||
{
|
||||
player->UseWeapon( WEAPON_INTERRUPT );
|
||||
}
|
||||
|
||||
//check which obj is the one that is already affected, if both are then use the special case of changing ownership.
|
||||
if(realObjA->getAffectingPlayer() == NULL && realObjB->getAffectingPlayer() == NULL) //None of the objects have a player affecting them
|
||||
{
|
||||
|
@ -350,7 +362,6 @@ using namespace GameLogic;
|
|||
weapon->heldObject = obj; //weapon now holds the object
|
||||
weapon->hasObject = true;
|
||||
dynamicObj->SetManipulatingPlayer(*weapon->owner); //TODO: add if this is to be a struggle of who has the most power in its weapon, the player that is already manipulating the object or you. if you then you take the object from the other player, if not then you do not take the object
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -32,6 +32,7 @@ namespace GameLogic
|
|||
WEAPON_USE_SECONDARY_RELEASE = 4,
|
||||
WEAPON_USE_UTILLITY_PRESS = 8,
|
||||
WEAPON_USE_UTILLITY_RELEASE = 16,
|
||||
WEAPON_INTERRUPT = 32
|
||||
};
|
||||
|
||||
enum WEAPON_STATE
|
||||
|
|
Loading…
Reference in New Issue