- merged SpawnActor wrapper.

This commit is contained in:
Christoph Oelckers 2021-11-24 23:22:36 +01:00
parent d447e3e86f
commit c4e388ef56
2 changed files with 4 additions and 8 deletions

View file

@ -917,17 +917,17 @@ USERp SpawnUser(DSWActor* actor, short id, STATEp state)
return u;
}
DSWActor* SpawnActor(short stat, short id, STATEp state, short sectnum, int x, int y, int z, int init_ang, int vel)
DSWActor* SpawnActor(int stat, int id, STATEp state, sectortype* sect, int x, int y, int z, int init_ang, int vel)
{
SPRITEp sp;
USERp u;
if (sectnum < 0)
if (sect == nullptr)
return nullptr;
ASSERT(!Prediction);
auto spawnedActor = InsertActor(sectnum, stat);
auto spawnedActor = InsertActor(sect, stat);
sp = &spawnedActor->s();

View file

@ -31,11 +31,7 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
BEGIN_SW_NS
void KillActor(DSWActor* actor);
DSWActor* SpawnActor(short stat, short id, STATEp state, short sectnum, int x, int y, int z, int ang, int vel);
DSWActor* SpawnActor(short stat, short id, STATEp state, sectortype* sect, int x, int y, int z, int ang, int vel)
{
return SpawnActor(stat, id, state, sectnum(sect), x, y, z, ang, vel);
}
DSWActor* SpawnActor(int stat, int id, STATEp state, sectortype* sect, int x, int y, int z, int ang, int vel);
void SpriteSetup(void);
int move_actor(DSWActor* actor, int xchange, int ychange, int zchange);