Skip to content

Instantly share code, notes, and snippets.

@AXDOOMER
Last active February 26, 2022 08:35
Show Gist options
  • Save AXDOOMER/a678186fcaee1bb772f5697771bb84ae to your computer and use it in GitHub Desktop.
Save AXDOOMER/a678186fcaee1bb772f5697771bb84ae to your computer and use it in GitHub Desktop.
void sub_GAME_7F053A10(ALSoundState *state, coord3d *pos)
{
if (getPlayerCount() == 1)
{
PropRecord *p = g_CurrentPlayer->prop;
float ang = atan2f(pos->z - p->pos.z, pos->x - p->pos.x);
float theta = ang - DegToRad(g_CurrentPlayer->vv_theta) + 3.14159265f;
//if (theta < 0)
// theta += 6.2831853f;
state->pan = (ALPan) 64 + cosf(theta) * 63.0f;
}
sub_GAME_7F05396C(state, pos, 0x459C4000, 0x45BB8000);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment