mirror of
https://github.com/XProger/OpenLara.git
synced 2025-08-10 23:24:06 +02:00
#368 fix weapon state while moving the block
This commit is contained in:
@@ -956,9 +956,6 @@ struct Block : Object
|
|||||||
|
|
||||||
virtual void collide(Lara* lara, CollisionInfo* cinfo)
|
virtual void collide(Lara* lara, CollisionInfo* cinfo)
|
||||||
{
|
{
|
||||||
if (lara->extraL->weaponState != WEAPON_STATE_FREE)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (!(lara->input & IN_ACTION))
|
if (!(lara->input & IN_ACTION))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -1007,6 +1004,9 @@ struct Block : Object
|
|||||||
|
|
||||||
if (lara->state == Lara::STATE_STOP)
|
if (lara->state == Lara::STATE_STOP)
|
||||||
{
|
{
|
||||||
|
if (lara->extraL->weaponState != WEAPON_STATE_FREE)
|
||||||
|
return;
|
||||||
|
|
||||||
if (lara->input & (IN_UP | IN_DOWN))
|
if (lara->input & (IN_UP | IN_DOWN))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -1019,6 +1019,9 @@ struct Block : Object
|
|||||||
lara->angle.y = angle.y;
|
lara->angle.y = angle.y;
|
||||||
lara->alignWall(LARA_RADIUS);
|
lara->alignWall(LARA_RADIUS);
|
||||||
lara->animProcess();
|
lara->animProcess();
|
||||||
|
if (lara->state == Lara::STATE_BLOCK_READY) {
|
||||||
|
lara->setWeaponState(WEAPON_STATE_BUSY);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user