mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-05-08 11:38:08 +03:00
Only shatter harpoons if no intelligent target was hit
This commit is contained in:
parent
3acd7d9e31
commit
c39c125570
1 changed files with 6 additions and 1 deletions
|
@ -180,6 +180,7 @@ void HarpoonBoltControl(short itemNumber)
|
|||
|
||||
int n = 0;
|
||||
bool foundCollidedObjects = false;
|
||||
bool explodeItem = true;
|
||||
|
||||
// Found possible collided items and statics
|
||||
GetCollidedObjects(item, HARPOON_HIT_RADIUS, 1, &CollidedItems[0], &CollidedMeshes[0], 1);
|
||||
|
@ -201,7 +202,10 @@ void HarpoonBoltControl(short itemNumber)
|
|||
foundCollidedObjects = true;
|
||||
|
||||
if (currentObj->intelligent && currentObj->collision && currentItem->status == ITEM_ACTIVE && !currentObj->undead)
|
||||
{
|
||||
explodeItem = false;
|
||||
HitTarget(LaraItem, currentItem, (GAME_VECTOR*)&item->pos, Weapons[WEAPON_HARPOON_GUN].damage, 0);
|
||||
}
|
||||
|
||||
// All other items (like puzzles) can't be hit
|
||||
k++;
|
||||
|
@ -243,7 +247,8 @@ void HarpoonBoltControl(short itemNumber)
|
|||
// If harpoon has hit some objects then shatter itself
|
||||
if (foundCollidedObjects)
|
||||
{
|
||||
ExplodeItemNode(item, 0, 0, EXPLODE_NORMAL);
|
||||
if (explodeItem)
|
||||
ExplodeItemNode(item, 0, 0, EXPLODE_NORMAL);
|
||||
KillItem(itemNumber);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue