From 4dcb01ae6ef85d51ae77a90506afead2ff5abe2c Mon Sep 17 00:00:00 2001 From: terminx Date: Tue, 13 Feb 2007 02:56:10 +0000 Subject: [PATCH] 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 --- polymer/eduke32/source/game.c | 4 +--- polymer/eduke32/source/player.c | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index beef89580..92c01ca14 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -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(); } diff --git a/polymer/eduke32/source/player.c b/polymer/eduke32/source/player.c index 529791c23..bdea31c38 100644 --- a/polymer/eduke32/source/player.c +++ b/polymer/eduke32/source/player.c @@ -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));