diff --git a/source/games/duke/src/actors.cpp b/source/games/duke/src/actors.cpp index 814cc2149..70a41a9b7 100644 --- a/source/games/duke/src/actors.cpp +++ b/source/games/duke/src/actors.cpp @@ -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!!! short startwall, endwall, x; int tx, ty; - auto s = &sprite[i]; + auto s = &actor->s; s->x += (s->xvel * (sintable[(s->ang + 512) & 2047])) >> 14; s->y += (s->xvel * (sintable[s->ang & 2047])) >> 14; - int j = hittype[i].temp_data[1]; - int k = hittype[i].temp_data[2]; + int j = actor->temp_data[1]; + int k = actor->temp_data[2]; startwall = sector[s->sectnum].wallptr; endwall = startwall + sector[s->sectnum].wallnum; diff --git a/source/games/duke/src/dukeactor.h b/source/games/duke/src/dukeactor.h index de7f7f7c9..c69593766 100644 --- a/source/games/duke/src/dukeactor.h +++ b/source/games/duke/src/dukeactor.h @@ -235,6 +235,11 @@ inline int movesprite_ex(DDukeActor* actor, int xchange, int ychange, int zchang return f(actor, xchange, ychange, zchange, cliptype, result); } +inline void ms(short i) +{ + ms(&hittype[i]); +} + END_DUKE_NS diff --git a/source/games/duke/src/funct.h b/source/games/duke/src/funct.h index 14cc0043d..c7638fbe3 100644 --- a/source/games/duke/src/funct.h +++ b/source/games/duke/src/funct.h @@ -29,7 +29,7 @@ void movefx(); void moveclouds(double smoothratio); void RANDOMSCRAP(DDukeActor* i); -void ms(short i); +void ms(DDukeActor* i); void movecrane(int i, int crane); void movefountain(int i, int fountain); void moveflammable(int i, int tire, int box, int pool);