Added MF9_SHADOWAIMVERT.

This flag causes the vertical aiming of monsters to also be affected when they aim at shadow actors.
This commit is contained in:
inkoalawetrust 2023-01-17 00:44:17 +02:00 committed by Rachael Alexanderson
commit 814c6f2188
6 changed files with 81 additions and 13 deletions

View file

@ -92,6 +92,7 @@
#include "r_sky.h"
#include "g_levellocals.h"
#include "actorinlines.h"
#include <shadowinlines.h>
CVAR(Bool, cl_bloodsplats, true, CVAR_ARCHIVE)
CVAR(Int, sv_smartaim, 0, CVAR_ARCHIVE | CVAR_SERVERINFO)
@ -4452,6 +4453,11 @@ DAngle P_AimLineAttack(AActor *t1, DAngle angle, double distance, FTranslatedLin
{
*pLineTarget = *result;
}
DAngle newPitch = P_AimLineAttack_ShadowHandling(t1,target,result->linetarget,shootz);
if (newPitch != nullAngle)
result->pitch = newPitch;
return result->linetarget ? result->pitch : t1->Angles.Pitch;
}