This removes the bullet spread from the pistol if the player is aiming directly at something aim() would target, allowing the special enhanced auto-aim for the pistol to be mimicked when auto-aim is disabled.

git-svn-id: https://svn.eduke32.com/eduke32@493 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2007-02-13 02:56:10 +00:00
parent 32470fe65c
commit 4dcb01ae6e
2 changed files with 25 additions and 3 deletions

View file

@ -3366,7 +3366,7 @@ void displayrest(long smoothratio)
OnEvent(EVENT_DISPLAYSBAR, ps[screenpeek].i, screenpeek, -1);
if (GetGameVarID(g_iReturnVarID,ps[screenpeek].i,screenpeek) == 0)
coolgaugetext(screenpeek);
operatefta();
if (KB_KeyPressed(sc_Escape) && ud.overhead_on == 0
@ -7674,8 +7674,6 @@ static void nonsharedkeys(void)
if (ud.statusbarscale < 37)
ud.statusbarscale = 37;
setstatusbarscale(ud.statusbarscale);
if (ud.screen_size == 8)
ud.statusbarmode = 1;
}
vscrn();
}

View file

@ -587,6 +587,18 @@ int shoot(int i,int atwith)
if (projectile[atwith].workslike & PROJECTILE_FLAG_ACCURATE_AUTOAIM)
{
if (!ps[p].auto_aim)
{
if (hittype[i].temp_data[9]) zvel = hittype[i].temp_data[9];
hitscan(sx,sy,sz,sect,sintable[(sa+512)&2047],sintable[sa&2047],
zvel<<6,&hitsect,&hitwall,&hitspr,&hitx,&hity,&hitz,CLIPMASK1);
if (hitspr != -1)
{
if (sprite[hitspr].statnum == 1 || sprite[hitspr].statnum == 2 || sprite[hitspr].statnum == 10 || sprite[hitspr].statnum == 13)
j = 1;
}
}
if (j == -1)
{
sa += (angRange/2)-(TRAND&(angRange-1));
@ -1144,6 +1156,18 @@ DOSKIPBULLETHOLE:
if (atwith == SHOTSPARK1__STATIC && !WW2GI && !NAM)
{
if (!ps[p].auto_aim)
{
if (hittype[i].temp_data[9]) zvel = hittype[i].temp_data[9];
hitscan(sx,sy,sz,sect,sintable[(sa+512)&2047],sintable[sa&2047],
zvel<<6,&hitsect,&hitwall,&hitspr,&hitx,&hity,&hitz,CLIPMASK1);
if (hitspr != -1)
{
if (sprite[hitspr].statnum == 1 || sprite[hitspr].statnum == 2 || sprite[hitspr].statnum == 10 || sprite[hitspr].statnum == 13)
j = 1;
}
}
if (j == -1)
{
sa += (angRange/2)-(TRAND&(angRange-1));