mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-14 08:30:35 +00:00
- Duke: Additional fixes for alterang()
.
- Initial issue started in3c1970e9e0
. - Fix in4f59e8a3d1
was partial and not enough. - Ensure delta angle is absolute in if statements as required, but don't use absangle as we need to apply the true delta in the last conditional. - Fix incorrect random angle addition as compared to older source. - Fixes #735.
This commit is contained in:
parent
1d0e9b369e
commit
5e2991acc7
1 changed files with 4 additions and 4 deletions
|
@ -3157,17 +3157,17 @@ void alterang(int ang, DDukeActor* actor, int playernum)
|
|||
|
||||
if (ticselapsed < 2)
|
||||
{
|
||||
if (angdif < DAngle45)
|
||||
if (abs(angdif) < DAngle45)
|
||||
{
|
||||
DAngle add = DAngle22_5 * ((krand() & 256)? 1 : -1);
|
||||
DAngle add = DAngle22_5 - randomAngle(DAngle45);
|
||||
actor->spr.Angles.Yaw += add;
|
||||
if (hits(actor) < 51.25)
|
||||
if (hits(actor) < 52.75)
|
||||
actor->spr.Angles.Yaw -= add;
|
||||
}
|
||||
}
|
||||
else if (ticselapsed > 18 && ticselapsed < 26) // choose
|
||||
{
|
||||
if (angdif < DAngle90) actor->spr.Angles.Yaw = goalang;
|
||||
if (abs(angdif) < DAngle90) actor->spr.Angles.Yaw = goalang;
|
||||
else actor->spr.Angles.Yaw += angdif * 0.25;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue