- ms function.

This commit is contained in:
Christoph Oelckers 2020-10-24 10:04:10 +02:00
parent c53653106e
commit b03a637e10
3 changed files with 10 additions and 5 deletions

View file

@ -280,19 +280,19 @@ void lotsofstuff(DDukeActor* actor, int n, int spawntype)
// //
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
void ms(short i) void ms(DDukeActor* const actor)
{ {
//T1,T2 and T3 are used for all the sector moving stuff!!! //T1,T2 and T3 are used for all the sector moving stuff!!!
short startwall, endwall, x; short startwall, endwall, x;
int tx, ty; int tx, ty;
auto s = &sprite[i]; auto s = &actor->s;
s->x += (s->xvel * (sintable[(s->ang + 512) & 2047])) >> 14; s->x += (s->xvel * (sintable[(s->ang + 512) & 2047])) >> 14;
s->y += (s->xvel * (sintable[s->ang & 2047])) >> 14; s->y += (s->xvel * (sintable[s->ang & 2047])) >> 14;
int j = hittype[i].temp_data[1]; int j = actor->temp_data[1];
int k = hittype[i].temp_data[2]; int k = actor->temp_data[2];
startwall = sector[s->sectnum].wallptr; startwall = sector[s->sectnum].wallptr;
endwall = startwall + sector[s->sectnum].wallnum; endwall = startwall + sector[s->sectnum].wallnum;

View file

@ -235,6 +235,11 @@ inline int movesprite_ex(DDukeActor* actor, int xchange, int ychange, int zchang
return f(actor, xchange, ychange, zchange, cliptype, result); return f(actor, xchange, ychange, zchange, cliptype, result);
} }
inline void ms(short i)
{
ms(&hittype[i]);
}
END_DUKE_NS END_DUKE_NS

View file

@ -29,7 +29,7 @@ void movefx();
void moveclouds(double smoothratio); void moveclouds(double smoothratio);
void RANDOMSCRAP(DDukeActor* i); void RANDOMSCRAP(DDukeActor* i);
void ms(short i); void ms(DDukeActor* i);
void movecrane(int i, int crane); void movecrane(int i, int crane);
void movefountain(int i, int fountain); void movefountain(int i, int fountain);
void moveflammable(int i, int tire, int box, int pool); void moveflammable(int i, int tire, int box, int pool);