Fix body part; Fix lara_col_all4s()

This commit is contained in:
asasas9500 2021-01-29 01:14:20 -03:00
parent 29e00e9219
commit 72d086d49b
2 changed files with 7 additions and 7 deletions

View file

@ -426,15 +426,13 @@ void lara_col_all4s(ITEM_INFO* item, COLL_INFO* coll)//14B40, 14C74 (F)
slope < 120) slope < 120)
{ {
int tmp; int tmp;
ITEM_INFO* tmp1;
MESH_INFO* tmp2;
int x = item->pos.xPos; int x = item->pos.xPos;
int z = item->pos.zPos; int z = item->pos.zPos;
item->pos.xPos -= 100 * phd_sin(coll->facing); item->pos.xPos -= 100 * phd_sin(coll->facing);
item->pos.zPos -= 100 * phd_cos(coll->facing); item->pos.zPos -= 100 * phd_cos(coll->facing);
tmp = GetCollidedObjects(item, 100, 1, &tmp1, &tmp2, 0); tmp = GetCollidedObjects(item, 100, 1, CollidedItems, CollidedMeshes, 0);
item->pos.xPos = x; item->pos.xPos = x;
item->pos.zPos = z; item->pos.zPos = z;

View file

@ -20,15 +20,17 @@ void ControlBodyPart(short fxNumber)
} }
else else
{ {
int modulus = 62 - fx->counter;
int random = modulus <= 1 ? 0 : 2 * GetRandomControl() % modulus;
if (fxNumber & 1) if (fxNumber & 1)
{ {
fx->pos.zRot -= 2 * (GetRandomControl() % (62 - fx->counter)); fx->pos.zRot -= random;
fx->pos.xRot += 2 * (GetRandomControl() % (62 - fx->counter)); fx->pos.xRot += random;
} }
else else
{ {
fx->pos.zRot += 2 * (GetRandomControl() % (62 - fx->counter)); fx->pos.zRot += random;
fx->pos.xRot -= 2 * (GetRandomControl() % (62 - fx->counter)); fx->pos.xRot -= random;
} }
if (--fx->counter < 8) if (--fx->counter < 8)
fx->fallspeed += 2; fx->fallspeed += 2;