I suppose you didn't test this too thoroughly, this assert will fire for half-a-circle of orientations. cPlayer::GetRotation() returns the rotation in the [-180, +180) interval, you're subtracting 180 before calling this, so a_Yaw is in the [-360, 0) interval.