1
0
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:
XProger
2022-01-21 04:34:34 +03:00
parent 2c8f55a22b
commit 0a481523b1

View File

@@ -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);
}
} }
} }