diff --git a/source/games/duke/src/dukeactor.h b/source/games/duke/src/dukeactor.h index 0525f4f97..e07c711f9 100644 --- a/source/games/duke/src/dukeactor.h +++ b/source/games/duke/src/dukeactor.h @@ -181,21 +181,11 @@ inline int bossguy(DDukeActor* pSprite) // old interface versions of already changed functions -inline void RANDOMSCRAP(spritetype* s, int i) -{ - return RANDOMSCRAP(&hittype[s - sprite]); -} - inline void deletesprite(int num) { deletesprite(&hittype[num]); } -inline int ssp(int i, unsigned int cliptype) //The set sprite function -{ - return ssp(&hittype[i], cliptype); -} - int movesprite_ex_d(DDukeActor* actor, int xchange, int ychange, int zchange, unsigned int cliptype, Collision& result); int movesprite_ex_r(DDukeActor* actor, int xchange, int ychange, int zchange, unsigned int cliptype, Collision& result); diff --git a/source/games/duke/src/premap.cpp b/source/games/duke/src/premap.cpp index 4ffb76284..5c729aa70 100644 --- a/source/games/duke/src/premap.cpp +++ b/source/games/duke/src/premap.cpp @@ -640,7 +640,7 @@ void resetpspritevars(int g) j = connectpoint2[j]; } - else deletesprite(i); + else deletesprite(act); } } diff --git a/source/games/duke/src/spawn_d.cpp b/source/games/duke/src/spawn_d.cpp index 140308aae..33394523f 100644 --- a/source/games/duke/src/spawn_d.cpp +++ b/source/games/duke/src/spawn_d.cpp @@ -342,7 +342,7 @@ int spawn_d(int j, int pn) sp->hitag = i; sp->xvel = 16; - ssp(i,CLIPMASK0); + ssp(act, CLIPMASK0); act->temp_data[0] = 17; act->temp_data[2] = 0; act->temp_data[5] = sp->ang; @@ -987,7 +987,7 @@ int spawn_d(int j, int pn) sp->lotag = 0; sp->z -= (32<<8); sp->zvel = -1024; - ssp(i,CLIPMASK0); + ssp(act, CLIPMASK0); sp->cstat = krand()&4; } else @@ -1091,7 +1091,7 @@ int spawn_d(int j, int pn) sp->cstat = 16+128+2; sp->xrepeat=sp->yrepeat=1; sp->xvel = -8; - ssp(i,CLIPMASK0); + ssp(act, CLIPMASK0); } case CEILINGSTEAM: changespritestat(i,STAT_STANDABLE); @@ -1146,7 +1146,7 @@ int spawn_d(int j, int pn) sp->owner = i; changespritestat(i,6); sp->xvel = 8; - ssp(i,CLIPMASK0); + ssp(act, CLIPMASK0); break; case TOILET: diff --git a/source/games/duke/src/spawn_r.cpp b/source/games/duke/src/spawn_r.cpp index 2f97cec91..61e7d20e4 100644 --- a/source/games/duke/src/spawn_r.cpp +++ b/source/games/duke/src/spawn_r.cpp @@ -1160,7 +1160,7 @@ int spawn_r(int j, int pn) { sp->zvel = 0; } - ssp(i,CLIPMASK0); + ssp(act, CLIPMASK0); sp->cstat = krand()&4; } else @@ -1172,7 +1172,7 @@ int spawn_r(int j, int pn) if( ( ud.multimode < 2 && sp->pal != 0) || (sp->lotag > ud.player_skill) ) { sp->xrepeat = sp->yrepeat = 0; - changespritestat(i, STAT_MISC); + changespritestat(act, STAT_MISC); break; } @@ -1355,10 +1355,10 @@ int spawn_r(int j, int pn) sp->cstat = 16+128+2; sp->xrepeat=sp->yrepeat=1; sp->xvel = -8; - ssp(i,CLIPMASK0); + ssp(act, CLIPMASK0); } case CEILINGSTEAM: - changespritestat(i,STAT_STANDABLE); + changespritestat(act, STAT_STANDABLE); break; case SECTOREFFECTOR: spawneffector(act); @@ -1397,7 +1397,7 @@ int spawn_r(int j, int pn) sp->owner = i; changespritestat(i,6); sp->xvel = 8; - ssp(i,CLIPMASK0); + ssp(act, CLIPMASK0); break; case EMPTYBIKE: