mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-24 10:40:46 +00:00
Modified shoot() to have an extra parameter for the projectile tilenum and added an option to disable autoaim on RPG type projectiles. Also added "advanced options" to the "video settings" menu.
git-svn-id: https://svn.eduke32.com/eduke32@18 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
70346eda8f
commit
13d3cfaffa
3 changed files with 43 additions and 18 deletions
|
@ -119,7 +119,7 @@ extern void tracers(long x1,long y1,long z1,long x2,long y2,long z2,long n);
|
|||
extern long hits(short i);
|
||||
extern long hitasprite(short i,short *hitsp);
|
||||
extern long hitawall(struct player_struct *p,short *hitw);
|
||||
extern short aim(spritetype *s,short aang);
|
||||
extern short aim(spritetype *s,short aang,short atwith);
|
||||
extern short shoot(short i,short atwith);
|
||||
extern void displayloogie(short snum);
|
||||
extern char animatefist(short gs,short snum);
|
||||
|
|
|
@ -1917,7 +1917,7 @@ cheat_for_port_credits:
|
|||
case 230:
|
||||
|
||||
rotatesprite(320<<15,19<<16,65536L,0,MENUBAR,16,0,10,0,0,xdim-1,ydim-1);
|
||||
menutext(320>>1,24,0,0,"OMFG LOL VIDEO S3TT1NGZ");
|
||||
menutext(320>>1,24,0,0,"ADVANCED VIDEO");
|
||||
|
||||
c = (320>>1)-120;
|
||||
|
||||
|
@ -1942,7 +1942,7 @@ cheat_for_port_credits:
|
|||
"-",
|
||||
"-",
|
||||
"-",
|
||||
"Boobs",
|
||||
"-",
|
||||
NULL
|
||||
};
|
||||
|
||||
|
@ -1959,7 +1959,7 @@ cheat_for_port_credits:
|
|||
onbar = (probey == 0);
|
||||
x = probesm(c,yy+5,0,io);
|
||||
|
||||
if (x == -1) { cmenu(202); break; }
|
||||
if (x == -1) { cmenu(203); break; }
|
||||
|
||||
yy = 34;
|
||||
for (ii=io=0; opts[ii]; ii++) {
|
||||
|
@ -2068,9 +2068,10 @@ cheat_for_port_credits:
|
|||
modval(0,1,(int *)&ud.mouseflip,1,probey==5);
|
||||
gametextpal(d,yy, ud.mouseflip ? "On" : "Off", 0, 0); break;
|
||||
case 6: if (ps[myconnectindex].gm&MODE_GAME || numplayers > 1) enabled = 0;
|
||||
if (enabled && x==io) AutoAim = 1-AutoAim;
|
||||
if (enabled) modval(0,1,(int *)&AutoAim,1,probey==6);
|
||||
gametextpal(d,yy, AutoAim ? "On" : "Off", enabled?0:10, 0); break;
|
||||
if (enabled && x==io) { AutoAim = (AutoAim == 2) ? 0 : AutoAim+1; }
|
||||
if (enabled) modval(0,2,(int *)&AutoAim,1,probey==6);
|
||||
{ char *s[] = { "Off", "Full", "Hitscan" };
|
||||
gametextpal(d,yy, s[AutoAim], enabled?0:10, 0); break; }
|
||||
case 7: if (x==io) ud.runkey_mode = 1-ud.runkey_mode;
|
||||
modval(0,1,(int *)&ud.runkey_mode,1,probey==7);
|
||||
gametextpal(d,yy, ud.runkey_mode ? "Classic" : "Modern", 0, 0); break;
|
||||
|
@ -2294,7 +2295,7 @@ cheat_for_port_credits:
|
|||
c = (320>>1)-120;
|
||||
|
||||
#if defined(POLYMOST) && defined(USE_OPENGL)
|
||||
x = 7;
|
||||
x = 8;
|
||||
#else
|
||||
x = 5;
|
||||
#endif
|
||||
|
@ -2486,6 +2487,9 @@ cheat_for_port_credits:
|
|||
if (glanisotropy > glinfo.maxanisotropy) glanisotropy = 1;
|
||||
gltexapplyprops();
|
||||
break;
|
||||
case 7:
|
||||
cmenu(230);
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -2528,6 +2532,8 @@ cheat_for_port_credits:
|
|||
if (glanisotropy == 1) strcpy(tempbuf,"NONE");
|
||||
else sprintf(tempbuf,"%ld-tap",glanisotropy);
|
||||
menutext(c+154,50+62+16+16+16,0,bpp==8,tempbuf);
|
||||
menutext(c,50+62+16+16+16+16,0,0,"ADVANCED OPTIONS");
|
||||
|
||||
#endif
|
||||
break;
|
||||
|
||||
|
|
|
@ -268,7 +268,7 @@ long hitawall(struct player_struct *p,short *hitw)
|
|||
return ( FindDistance2D(sx-p->posx,sy-p->posy) );
|
||||
}
|
||||
|
||||
short aim(spritetype *s,short aang)
|
||||
short aim(spritetype *s,short aang,short atwith)
|
||||
{
|
||||
char gotshrinker,gotfreezer;
|
||||
short i, j, a, k, cans;
|
||||
|
@ -279,8 +279,27 @@ short aim(spritetype *s,short aang)
|
|||
a = s->ang;
|
||||
|
||||
j = -1;
|
||||
if(s->picnum == APLAYER && !ps[s->yvel].auto_aim) return -1;
|
||||
|
||||
if(s->picnum == APLAYER) {
|
||||
if(!ps[s->yvel].auto_aim)
|
||||
return -1;
|
||||
if(ps[s->yvel].auto_aim == 2)
|
||||
{
|
||||
if(checkspriteflagsp(atwith,SPRITE_FLAG_PROJECTILE) && (projectile[atwith].workslike & PROJECTILE_FLAG_RPG))
|
||||
return -1;
|
||||
else switch(dynamictostatic[atwith]) {
|
||||
case TONGUE__STATIC:
|
||||
case FREEZEBLAST__STATIC:
|
||||
case SHRINKSPARK__STATIC:
|
||||
case RPG__STATIC:
|
||||
case FIRELASER__STATIC:
|
||||
case SPIT__STATIC:
|
||||
case COOLEXPLOSION1__STATIC:
|
||||
return -1;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
gotshrinker = s->picnum == APLAYER && *aplWeaponWorksLike[ps[s->yvel].curr_weapon] == SHRINKER_WEAPON;
|
||||
gotfreezer = s->picnum == APLAYER && *aplWeaponWorksLike[ps[s->yvel].curr_weapon] == FREEZE_WEAPON;
|
||||
|
||||
|
@ -617,7 +636,7 @@ short shoot(short i,short atwith)
|
|||
j=-1;
|
||||
if( GetGameVarID(g_iAimAngleVarID,i,p) > 0 )
|
||||
{
|
||||
j = aim( s, GetGameVarID(g_iAimAngleVarID,i,p));
|
||||
j = aim( s, GetGameVarID(g_iAimAngleVarID,i,p),atwith);
|
||||
}
|
||||
if(j >= 0)
|
||||
{
|
||||
|
@ -903,7 +922,7 @@ DOSKIPBULLETHOLE:
|
|||
j=-1;
|
||||
if( GetGameVarID(g_iAimAngleVarID,i,p) > 0 )
|
||||
{
|
||||
j = aim( s, GetGameVarID(g_iAimAngleVarID,i,p));
|
||||
j = aim( s, GetGameVarID(g_iAimAngleVarID,i,p),atwith);
|
||||
}
|
||||
if(j >= 0)
|
||||
{
|
||||
|
@ -1142,7 +1161,7 @@ DOSKIPBULLETHOLE:
|
|||
j=-1;
|
||||
if( GetGameVarID(g_iAimAngleVarID,i,p) > 0 )
|
||||
{
|
||||
j = aim( s, GetGameVarID(g_iAimAngleVarID,i,p));
|
||||
j = aim( s, GetGameVarID(g_iAimAngleVarID,i,p),atwith);
|
||||
}
|
||||
if(j >= 0)
|
||||
{
|
||||
|
@ -1386,7 +1405,7 @@ SKIPBULLETHOLE:
|
|||
j=-1;
|
||||
if( GetGameVarID(g_iAimAngleVarID,i,p) > 0 )
|
||||
{
|
||||
j = aim( s, GetGameVarID(g_iAimAngleVarID,i,p));
|
||||
j = aim( s, GetGameVarID(g_iAimAngleVarID,i,p),atwith);
|
||||
}
|
||||
|
||||
if(j >= 0)
|
||||
|
@ -1482,7 +1501,7 @@ SKIPBULLETHOLE:
|
|||
j=-1;
|
||||
if( GetGameVarID(g_iAimAngleVarID,i,p) > 0 )
|
||||
{
|
||||
j = aim( s, GetGameVarID(g_iAimAngleVarID,i,p));
|
||||
j = aim( s, GetGameVarID(g_iAimAngleVarID,i,p),atwith);
|
||||
}
|
||||
|
||||
if(j >= 0)
|
||||
|
@ -1682,7 +1701,7 @@ SKIPBULLETHOLE:
|
|||
j=-1;
|
||||
if( GetGameVarID(g_iAimAngleVarID,i,p) > 0 )
|
||||
{
|
||||
j = aim( s, GetGameVarID(g_iAimAngleVarID,i,p));
|
||||
j = aim( s, GetGameVarID(g_iAimAngleVarID,i,p),atwith);
|
||||
}
|
||||
|
||||
if(j >= 0)
|
||||
|
@ -1773,7 +1792,7 @@ SKIPBULLETHOLE:
|
|||
j=-1;
|
||||
if( GetGameVarID(g_iAimAngleVarID,i,p) > 0 )
|
||||
{
|
||||
j = aim( s, GetGameVarID(g_iAimAngleVarID,i,p));
|
||||
j = aim( s, GetGameVarID(g_iAimAngleVarID,i,p),atwith);
|
||||
}
|
||||
|
||||
if(j >= 0)
|
||||
|
|
Loading…
Reference in a new issue