mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-29 07:21:54 +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
8a5501480e
commit
6fd0827d24
1 changed files with 4 additions and 4 deletions
|
@ -4224,17 +4224,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.angle += add;
|
||||
if (hits(actor) < 51.25)
|
||||
if (hits(actor) < 52.75)
|
||||
actor->spr.angle -= add;
|
||||
}
|
||||
}
|
||||
else if (ticselapsed > 18 && ticselapsed < 26) // choose
|
||||
{
|
||||
if (angdif < DAngle90) actor->spr.angle = goalang;
|
||||
if (abs(angdif) < DAngle90) actor->spr.angle = goalang;
|
||||
else actor->spr.angle += angdif * 0.25;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue