diff options
| author | Dragorn421 <Dragorn421@users.noreply.github.com> | 2022-03-09 01:43:07 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-03-08 19:43:07 -0500 |
| commit | c73053db6fb44dd602a5e598e9047c2c1584877c (patch) | |
| tree | 92dace199c98c4bc9d7c7c8d3888d64c34d01596 /src/code/z_actor.c | |
| parent | e53ec1962b7d3eede313df6f9b3022171121947c (diff) | |
Name variables holding poly normals and variables used in `COLPOLY_GET_NORMAL` (#1168)
Diffstat (limited to 'src/code/z_actor.c')
| -rw-r--r-- | src/code/z_actor.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/code/z_actor.c b/src/code/z_actor.c index 2781e2a4c..eb654a66b 100644 --- a/src/code/z_actor.c +++ b/src/code/z_actor.c @@ -4158,9 +4158,9 @@ Actor* func_800358DC(Actor* actor, Vec3f* spawnPos, Vec3s* spawnRot, f32* arg3, } void func_800359B8(Actor* actor, s16 arg1, Vec3s* arg2) { - f32 sp44; - f32 sp40; - f32 sp3C; + f32 floorPolyNormalX; + f32 floorPolyNormalY; + f32 floorPolyNormalZ; f32 sp38; f32 sp34; f32 sp30; @@ -4172,19 +4172,19 @@ void func_800359B8(Actor* actor, s16 arg1, Vec3s* arg2) { if (actor->floorPoly != NULL) { floorPoly = actor->floorPoly; - sp44 = COLPOLY_GET_NORMAL(floorPoly->normal.x); - sp40 = COLPOLY_GET_NORMAL(floorPoly->normal.y); - sp3C = COLPOLY_GET_NORMAL(floorPoly->normal.z); + floorPolyNormalX = COLPOLY_GET_NORMAL(floorPoly->normal.x); + floorPolyNormalY = COLPOLY_GET_NORMAL(floorPoly->normal.y); + floorPolyNormalZ = COLPOLY_GET_NORMAL(floorPoly->normal.z); sp38 = Math_SinS(arg1); sp34 = Math_CosS(arg1); - sp28 = (-(sp44 * sp38) - (sp3C * sp34)); - arg2->x = -(s16)(Math_FAtan2F(sp28 * sp40, 1.0f) * (32768 / M_PI)); + sp28 = (-(floorPolyNormalX * sp38) - (floorPolyNormalZ * sp34)); + arg2->x = -(s16)(Math_FAtan2F(sp28 * floorPolyNormalY, 1.0f) * (32768 / M_PI)); sp2C = Math_SinS(arg1 - 16375); sp30 = Math_CosS(arg1 - 16375); - sp24 = (-(sp44 * sp2C) - (sp3C * sp30)); - arg2->z = -(s16)(Math_FAtan2F(sp24 * sp40, 1.0f) * (32768 / M_PI)); + sp24 = (-(floorPolyNormalX * sp2C) - (floorPolyNormalZ * sp30)); + arg2->z = -(s16)(Math_FAtan2F(sp24 * floorPolyNormalY, 1.0f) * (32768 / M_PI)); } } |
