- fixed: AdjustPlayerAngle should not use the angle that gets passed in the attack target struct. This is the actual angle of the attack but this function needs to adjust to the actual direction between player and victim.

This commit is contained in:
Christoph Oelckers 2016-03-16 22:32:09 +01:00
parent b20956e207
commit 9b1442915f

View file

@ -30,7 +30,7 @@ void AdjustPlayerAngle (AActor *pmo, FTranslatedLineTarget *t)
angle_t angle; angle_t angle;
int difference; int difference;
angle = t->angleFromSource; angle = pmo->AngleTo(t->linetarget);
difference = (int)angle - (int)pmo->angle; difference = (int)angle - (int)pmo->angle;
if (abs(difference) > MAX_ANGLE_ADJUST) if (abs(difference) > MAX_ANGLE_ADJUST)
{ {