mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-23 04:22:16 +00:00
- Duke/RR: Use the exact same trajectory for autoaiming and the actual attack hitscan for the pistol.
These were not identical so the pistol was likely to miss small targets the autoaim acquired. This was particularly bad for Duke's ceiling turret and RR's mosquito.
This commit is contained in:
parent
94a80dda11
commit
fa1e667140
2 changed files with 2 additions and 4 deletions
|
@ -209,7 +209,7 @@ DDukeActor* aim(DDukeActor* actor, int abase, bool force)
|
|||
{
|
||||
// Some fudging to avoid aim randomization when autoaim is off.
|
||||
// This is a reimplementation of how it was solved in RedNukem.
|
||||
if (plr->curr_weapon == PISTOL_WEAPON && !isWW2GI())
|
||||
if (plr->curr_weapon == PISTOL_WEAPON && !isWW2GI() && 0)
|
||||
{
|
||||
double vel = 1024, zvel = 0;
|
||||
setFreeAimVelocity(vel, zvel, plr->Angles.getPitchWithView(), 16.);
|
||||
|
|
|
@ -48,9 +48,7 @@ extend class DukeActor
|
|||
let aimed = actor.aim(self, aimangle);
|
||||
if (aimed)
|
||||
{
|
||||
double dal = ((aimed.scale.X * aimed.spriteHeight()) * 0.5) + aimed.sparkoffset;
|
||||
double dist = (p.actor.pos.XY - aimed.pos.XY).Length();
|
||||
zvel = ((aimed.pos.Z - pos.Z - dal) * 16) / dist;
|
||||
[vel, zvel] = Raze.setFreeAimVelocity(vel, zvel, p.getPitchWithView(), 16.);
|
||||
ang = (aimed.pos - pos).Angle();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue