diff --git a/source/games/sw/src/game.h b/source/games/sw/src/game.h index 2d6706acf..bd130d7ac 100644 --- a/source/games/sw/src/game.h +++ b/source/games/sw/src/game.h @@ -1097,9 +1097,6 @@ struct USER uint8_t filler; }; -using USERp = USER*; - - enum { // sprite->extra flags @@ -1627,7 +1624,7 @@ int Distance(int x1, int y1, int x2, int y2); int NewStateGroup(DSWActor* actor, STATEp SpriteGroup[]); void SectorMidPoint(sectortype* sect, int *xmid, int *ymid, int *zmid); -USERp SpawnUser(DSWActor* actor, short id, STATEp state); +void SpawnUser(DSWActor* actor, short id, STATEp state); short ActorFindTrack(DSWActor* actor, int8_t player_dir, int track_type, int *track_point_num, int *track_dir); diff --git a/source/games/sw/src/sprite.cpp b/source/games/sw/src/sprite.cpp index 8269dac16..b103e2557 100644 --- a/source/games/sw/src/sprite.cpp +++ b/source/games/sw/src/sprite.cpp @@ -700,7 +700,6 @@ void KillActor(DSWActor* actor) // that it is already dead if (TEST(actor->spr.extra, SPRX_PLAYER_OR_ENEMY)) { - USERp mu; static int8_t MissileStats[] = {STAT_MISSILE, STAT_MISSILE_SKIP4}; for (stat = 0; stat < SIZ(MissileStats); stat++) @@ -821,7 +820,7 @@ void change_actor_stat(DSWActor* actor, int stat, bool quick) } } -USERp SpawnUser(DSWActor* actor, short id, STATEp state) +void SpawnUser(DSWActor* actor, short id, STATEp state) { ASSERT(!Prediction); @@ -870,8 +869,6 @@ USERp SpawnUser(DSWActor* actor, short id, STATEp state) actor->user.highActor = nullptr; actor->user.lo_sectp = actor->spr.sector(); actor->user.hi_sectp = actor->spr.sector(); - - return &actor->user; } DSWActor* SpawnActor(int stat, int id, STATEp state, sectortype* sect, int x, int y, int z, int init_ang, int vel) diff --git a/source/games/sw/src/swactor.h b/source/games/sw/src/swactor.h index a02bcac8e..557737c42 100644 --- a/source/games/sw/src/swactor.h +++ b/source/games/sw/src/swactor.h @@ -29,11 +29,9 @@ public: bool hasU() { return hasUser; } - USER* u() { return &user; } - USER* allocUser() + void allocUser() { hasUser = true; - return u(); } void clearUser()