- revert ea98978ae7 and baed75ff8a, and do in a more compatible way with synchronised and unsychronised input.

This commit is contained in:
Mitchell Richters 2020-08-05 17:43:06 +10:00
parent bb0129c331
commit 65428a2d1a
2 changed files with 26 additions and 12 deletions

View file

@ -464,6 +464,19 @@ void moveplayers(void) //Players
p->jetpack_amount = 1599;
}
if (p->actorsqu >= 0)
{
int ang = getincangle(p->getang(), getangle(sprite[p->actorsqu].x - p->posx, sprite[p->actorsqu].y - p->posy)) >> 2;
if (!cl_syncinput)
{
p->angAdjust += ang;
}
else
{
p->addang(ang);
}
}
if (s->extra > 0)
{
// currently alive...
@ -481,6 +494,19 @@ void moveplayers(void) //Players
p->posz = s->z - (20 << 8);
p->newowner = -1;
if (p->wackedbyactor >= 0 && sprite[p->wackedbyactor].statnum < MAXSTATUS)
{
int ang = getincangle(p->getang(), getangle(sprite[p->wackedbyactor].x - p->posx, sprite[p->wackedbyactor].y - p->posy)) >> 1;
if (!cl_syncinput)
{
p->angAdjust += ang;
}
else
{
p->addang(ang);
}
}
}
s->ang = p->getang();
}

View file

@ -810,11 +810,6 @@ void applylook(int snum, double factor, fixed_t adjustment)
p->addrotscrnang(factor * -24);
}
if (p->actorsqu >= 0)
{
p->q16ang += fix16_from_dbl(factor * (getincangle(p->getang(), getangle(sprite[p->actorsqu].x - p->posx, sprite[p->actorsqu].y - p->posy)) >> 2));
}
if (p->one_eighty_count < 0 && p->on_crane < 0)
{
fixed_t add = fix16_from_dbl(factor * 128);
@ -830,13 +825,6 @@ void applylook(int snum, double factor, fixed_t adjustment)
p->q16ang += fix16_from_dbl(factor * p->angAdjust) + adjustment;
apply_seasick(p, factor);
}
else
{
if (p->wackedbyactor >= 0 && sprite[p->wackedbyactor].statnum < MAXSTATUS)
{
p->q16ang += fix16_from_dbl(factor * (getincangle(p->getang(), getangle(sprite[p->wackedbyactor].x - p->posx, sprite[p->wackedbyactor].y - p->posy)) >> 1));
}
}
}
//---------------------------------------------------------------------------