mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-05-12 05:26:57 +03:00
fixing
This commit is contained in:
parent
040df20441
commit
52b5cc7472
1 changed files with 54 additions and 53 deletions
|
@ -738,8 +738,8 @@ void KeyHoleCollision(short itemNum, ITEM_INFO* l, COLL_INFO* coll)
|
||||||
|
|
||||||
void do_pickup()
|
void do_pickup()
|
||||||
{
|
{
|
||||||
|
pickupitem = (short)Lara.generalPtr;
|
||||||
ITEM_INFO* item = &Items[pickupitem];
|
ITEM_INFO* item = &Items[pickupitem];
|
||||||
pickupitem = item->objectNumber;
|
|
||||||
short oldXrot = item->pos.xRot;
|
short oldXrot = item->pos.xRot;
|
||||||
short oldYrot = item->pos.yRot;
|
short oldYrot = item->pos.yRot;
|
||||||
short oldZrot = item->pos.zRot;
|
short oldZrot = item->pos.zRot;
|
||||||
|
@ -757,68 +757,45 @@ void do_pickup()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
if (item->objectNumber == ID_FLARE_ITEM)
|
if (item->objectNumber == ID_FLARE_ITEM)
|
||||||
{
|
|
||||||
if (LaraItem->currentAnimState == ANIMATION_LARA_UNDERWATER_FLARE_PICKUP)
|
|
||||||
{
|
{
|
||||||
Lara.requestGunType = WEAPON_FLARE;
|
if (LaraItem->currentAnimState == ANIMATION_LARA_UNDERWATER_FLARE_PICKUP)
|
||||||
Lara.gunType = WEAPON_FLARE;
|
|
||||||
InitialiseNewWeapon();
|
|
||||||
Lara.gunStatus = LG_SPECIAL;
|
|
||||||
Lara.flareAge = (int)(item->data) & 0x7FFF;
|
|
||||||
draw_flare_meshes();
|
|
||||||
KillItem(pickupitem);
|
|
||||||
|
|
||||||
item->pos.xRot = oldXrot;
|
|
||||||
item->pos.yRot = oldYrot;
|
|
||||||
item->pos.zRot = oldZrot;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
if (LaraItem->currentAnimState == STATE_LARA_FLARE_PICKUP)
|
|
||||||
{
|
|
||||||
Lara.requestGunType = WEAPON_FLARE;
|
|
||||||
Lara.gunType = WEAPON_FLARE;
|
|
||||||
InitialiseNewWeapon();
|
|
||||||
Lara.gunStatus = LG_SPECIAL;
|
|
||||||
Lara.flareAge = (short)(item->data) & 0x7FFF;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (LaraItem->animNumber == ANIMATION_LARA_UNDERWATER_PICKUP)
|
|
||||||
{
|
|
||||||
AddDisplayPickup(item->objectNumber);
|
|
||||||
if (!(item->triggerFlags & 0xC0))
|
|
||||||
{
|
{
|
||||||
|
Lara.requestGunType = WEAPON_FLARE;
|
||||||
|
Lara.gunType = WEAPON_FLARE;
|
||||||
|
InitialiseNewWeapon();
|
||||||
|
Lara.gunStatus = LG_SPECIAL;
|
||||||
|
Lara.flareAge = (int)(item->data) & 0x7FFF;
|
||||||
|
draw_flare_meshes();
|
||||||
KillItem(pickupitem);
|
KillItem(pickupitem);
|
||||||
|
|
||||||
|
item->pos.xRot = oldXrot;
|
||||||
|
item->pos.yRot = oldYrot;
|
||||||
|
item->pos.zRot = oldZrot;
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
if (LaraItem->currentAnimState == STATE_LARA_FLARE_PICKUP)
|
||||||
item->itemFlags[3] = 1;
|
{
|
||||||
item->flags |= 0x20;
|
Lara.requestGunType = WEAPON_FLARE;
|
||||||
item->status = ITEM_INVISIBLE;
|
Lara.gunType = WEAPON_FLARE;
|
||||||
}
|
InitialiseNewWeapon();
|
||||||
item->pos.xRot = oldXrot;
|
Lara.gunStatus = LG_SPECIAL;
|
||||||
item->pos.yRot = oldYrot;
|
Lara.flareAge = (short)(item->data) & 0x7FFF;
|
||||||
item->pos.zRot = oldZrot;
|
KillItem(pickupitem);
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (LaraItem->animNumber == ANIMATION_LARA_PICKUP)
|
if (LaraItem->animNumber == ANIMATION_LARA_UNDERWATER_PICKUP)//dirty but what can I do, it uses the same state
|
||||||
{
|
{
|
||||||
AddDisplayPickup(item->objectNumber);
|
AddDisplayPickup(item->objectNumber);
|
||||||
if (item->triggerFlags & 0x100)
|
if (!(item->triggerFlags & 0xC0))
|
||||||
{
|
{
|
||||||
for (int i = 0; i < LevelItems; i++)
|
KillItem(pickupitem);
|
||||||
{
|
|
||||||
if (Items[i].objectNumber == item->objectNumber)
|
|
||||||
KillItem(i);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (item->triggerFlags & 0xC0)
|
else
|
||||||
{
|
{
|
||||||
item->itemFlags[3] = 1;
|
item->itemFlags[3] = 1;
|
||||||
item->flags |= 0x20;
|
item->flags |= 0x20;
|
||||||
|
@ -827,11 +804,35 @@ void do_pickup()
|
||||||
item->pos.xRot = oldXrot;
|
item->pos.xRot = oldXrot;
|
||||||
item->pos.yRot = oldYrot;
|
item->pos.yRot = oldYrot;
|
||||||
item->pos.zRot = oldZrot;
|
item->pos.zRot = oldZrot;
|
||||||
KillItem(pickupitem);//?
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (LaraItem->currentAnimState == STATE_LARA_PICKUP || LaraItem->currentAnimState == STATE_LARA_PICKUP_FROM_CHEST)
|
||||||
|
{
|
||||||
|
AddDisplayPickup(item->objectNumber);
|
||||||
|
if (item->triggerFlags & 0x100)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < LevelItems; i++)
|
||||||
|
{
|
||||||
|
if (Items[i].objectNumber == item->objectNumber)
|
||||||
|
KillItem(i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (item->triggerFlags & 0xC0)
|
||||||
|
{
|
||||||
|
item->itemFlags[3] = 1;
|
||||||
|
item->flags |= 0x20;
|
||||||
|
item->status = ITEM_INVISIBLE;
|
||||||
|
}
|
||||||
|
item->pos.xRot = oldXrot;
|
||||||
|
item->pos.yRot = oldYrot;
|
||||||
|
item->pos.zRot = oldZrot;
|
||||||
|
KillItem(pickupitem);//?
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void PickupCollision(short itemNum, ITEM_INFO* l, COLL_INFO* coll)
|
void PickupCollision(short itemNum, ITEM_INFO* l, COLL_INFO* coll)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue