mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-19 07:01:09 +00:00
- SW: SpawnActor with float vector
This commit is contained in:
parent
8f4c418a1b
commit
0c8ed75d54
2 changed files with 8 additions and 3 deletions
|
@ -871,7 +871,7 @@ void SpawnUser(DSWActor* actor, short id, STATE* state)
|
||||||
actor->user.hi_sectp = actor->sector();
|
actor->user.hi_sectp = actor->sector();
|
||||||
}
|
}
|
||||||
|
|
||||||
DSWActor* SpawnActor(int stat, int id, STATE* state, sectortype* sect, int x, int y, int z, int init_ang, int vel)
|
DSWActor* SpawnActor(int stat, int id, STATE* state, sectortype* sect, const DVector3& pos, int init_ang, int vel)
|
||||||
{
|
{
|
||||||
if (sect == nullptr)
|
if (sect == nullptr)
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
@ -880,7 +880,7 @@ DSWActor* SpawnActor(int stat, int id, STATE* state, sectortype* sect, int x, in
|
||||||
|
|
||||||
auto spawnedActor = insertActor(sect, stat);
|
auto spawnedActor = insertActor(sect, stat);
|
||||||
|
|
||||||
spawnedActor->set_int_pos({ x, y, z });
|
spawnedActor->spr.pos = pos;
|
||||||
|
|
||||||
SpawnUser(spawnedActor, id, state);
|
SpawnUser(spawnedActor, id, state);
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,12 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
|
||||||
BEGIN_SW_NS
|
BEGIN_SW_NS
|
||||||
|
|
||||||
void KillActor(DSWActor* actor);
|
void KillActor(DSWActor* actor);
|
||||||
DSWActor* SpawnActor(int stat, int id, STATE* state, sectortype* sect, int x, int y, int z, int ang, int vel);
|
DSWActor* SpawnActor(int stat, int id, STATE* state, sectortype* sect, const DVector3& pos, int ang, int vel);
|
||||||
|
inline DSWActor* SpawnActor(int stat, int id, STATE* state, sectortype* sect, int x, int y, int z, int ang, int vel)
|
||||||
|
{
|
||||||
|
auto vec= DVector3(x * inttoworld, y * inttoworld, z * zinttoworld);
|
||||||
|
return SpawnActor(stat, id, state, sect, vec, ang, vel);
|
||||||
|
}
|
||||||
|
|
||||||
void SpriteSetup(void);
|
void SpriteSetup(void);
|
||||||
int move_actor(DSWActor* actor, int xchange, int ychange, int zchange);
|
int move_actor(DSWActor* actor, int xchange, int ychange, int zchange);
|
||||||
|
|
Loading…
Reference in a new issue