mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-11 15:21:48 +00:00
- reimplemented autoaim mode 2 (hitscan only)
This commit is contained in:
parent
efb73d04a0
commit
c7a9b5678b
2 changed files with 29 additions and 5 deletions
|
@ -281,16 +281,39 @@ int aim(spritetype* s, int aang)
|
|||
{
|
||||
char gotshrinker, gotfreezer;
|
||||
int i, j, a, k, cans;
|
||||
int aimstats[] = { 10,13,1,2 };
|
||||
int aimstats[] = { STAT_PLAYER, STAT_DUMMYPLAYER, STAT_ACTOR, STAT_ZOMBIEACTOR };
|
||||
int dx1, dy1, dx2, dy2, dx3, dy3, smax, sdist;
|
||||
int xv, yv;
|
||||
|
||||
a = s->ang;
|
||||
|
||||
// Autoaim from DukeGDX.
|
||||
if (s->picnum == TILE_APLAYER && ps[s->yvel].auto_aim == 0)
|
||||
return -1;
|
||||
if (s->picnum == TILE_APLAYER)
|
||||
{
|
||||
if (ps[s->yvel].auto_aim == 0)
|
||||
{
|
||||
// The chickens in RRRA are homing and must always autoaim.
|
||||
if (!isRRRA() || ps[s->yvel].curr_weapon != CHICKEN_WEAPON)
|
||||
return -1;
|
||||
}
|
||||
else if (ps[s->yvel].auto_aim == 2)
|
||||
{
|
||||
int weap;
|
||||
if (!isWW2GI())
|
||||
{
|
||||
weap = ps[s->yvel].curr_weapon;
|
||||
}
|
||||
else
|
||||
{
|
||||
weap = aplWeaponWorksLike[ps[s->yvel].curr_weapon][s->yvel];
|
||||
}
|
||||
if (weap > CHAINGUN_WEAPON || weap == KNEE_WEAPON)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
j = -1;
|
||||
// if(s->picnum == TILE_APLAYER && ps[s->yvel].aim_mode) return -1;
|
||||
|
||||
|
|
|
@ -507,10 +507,11 @@ void resetprestat(int snum,int g)
|
|||
|
||||
void resetpspritevars(int g)
|
||||
{
|
||||
short i, j, nexti, circ;
|
||||
int i, j;
|
||||
short nexti, circ;
|
||||
int firstx, firsty;
|
||||
spritetype* s;
|
||||
char aimmode[MAXPLAYERS], autoaim[MAXPLAYERS];
|
||||
int aimmode[MAXPLAYERS], autoaim[MAXPLAYERS];
|
||||
STATUSBARTYPE tsbar[MAXPLAYERS];
|
||||
|
||||
EGS(ps[0].cursectnum, ps[0].posx, ps[0].posy, ps[0].posz,
|
||||
|
|
Loading…
Reference in a new issue