git-svn-id: https://svn.eduke32.com/eduke32@516 1a8010ca-5511-0410-912e-c29ae57300e0

This commit is contained in:
terminx 2007-03-08 00:09:20 +00:00
parent 070c38a85e
commit 9c819e7042

View file

@ -3256,7 +3256,7 @@ static void move(void)
goalang = getangle(ps[g_p].oposx-g_sp->x,ps[g_p].oposy-g_sp->y); goalang = getangle(ps[g_p].oposx-g_sp->x,ps[g_p].oposy-g_sp->y);
else goalang = getangle(ps[g_p].posx-g_sp->x,ps[g_p].posy-g_sp->y); else goalang = getangle(ps[g_p].posx-g_sp->x,ps[g_p].posy-g_sp->y);
angdif = getincangle(g_sp->ang,goalang)>>2; angdif = getincangle(g_sp->ang,goalang)>>2;
if (angdif > -8 && angdif < 0) angdif = 0; if ((angdif > -8 && angdif < 0) || (angdif > 0 && angdif < 8)) angdif = 0;
g_sp->ang += angdif; g_sp->ang += angdif;
} }
@ -3269,7 +3269,7 @@ static void move(void)
goalang = getangle(ps[g_p].oposx-g_sp->x,ps[g_p].oposy-g_sp->y); goalang = getangle(ps[g_p].oposx-g_sp->x,ps[g_p].oposy-g_sp->y);
else goalang = getangle(ps[g_p].posx-g_sp->x,ps[g_p].posy-g_sp->y); else goalang = getangle(ps[g_p].posx-g_sp->x,ps[g_p].posy-g_sp->y);
angdif = ksgn(getincangle(g_sp->ang,goalang))<<5; angdif = ksgn(getincangle(g_sp->ang,goalang))<<5;
if (angdif > -32 && angdif < 0) if ((angdif > -32 && angdif < 0) || (angdif > 0 && angdif < 32))
{ {
angdif = 0; angdif = 0;
g_sp->ang = goalang; g_sp->ang = goalang;
@ -3285,13 +3285,12 @@ static void move(void)
if (a&face_player_smart) if (a&face_player_smart)
{ {
long newx,newy; long newx = ps[g_p].posx+(ps[g_p].posxv/768);
long newy = ps[g_p].posy+(ps[g_p].posyv/768);
newx = ps[g_p].posx+(ps[g_p].posxv/768);
newy = ps[g_p].posy+(ps[g_p].posyv/768);
goalang = getangle(newx-g_sp->x,newy-g_sp->y); goalang = getangle(newx-g_sp->x,newy-g_sp->y);
angdif = getincangle(g_sp->ang,goalang)>>2; angdif = getincangle(g_sp->ang,goalang)>>2;
if (angdif > -8 && angdif < 0) angdif = 0; if ((angdif > -8 && angdif < 0) || (angdif > 0 && angdif < 8)) angdif = 0;
g_sp->ang += angdif; g_sp->ang += angdif;
} }