mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 17:01:28 +00:00
- the remaining SpawnActor calls.
This commit is contained in:
parent
80f019c429
commit
12b238b2bf
2 changed files with 11 additions and 21 deletions
|
@ -16249,18 +16249,12 @@ int InitGrenade(PLAYER* pp)
|
|||
|
||||
int InitSpriteGrenade(DSWActor* actor)
|
||||
{
|
||||
int nx, ny, nz;
|
||||
|
||||
PlaySound(DIGI_30MMFIRE, actor, v3df_dontpan|v3df_doppler);
|
||||
|
||||
nx = actor->int_pos().X;
|
||||
ny = actor->int_pos().Y;
|
||||
nz = actor->int_pos().Z - Z(40);
|
||||
|
||||
// Spawn a shot
|
||||
// Inserting and setting up variables
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, GRENADE, &s_Grenade[0][0], actor->sector(),
|
||||
nx, ny, nz, actor->int_ang(), GRENADE_VELOCITY);
|
||||
actor->spr.pos.plusZ(-40), actor->spr.angle, GRENADE_VELOCITY);
|
||||
|
||||
actorNew->user.RotNum = 5;
|
||||
NewStateGroup(actorNew, &sg_Grenade[0]);
|
||||
|
@ -16375,8 +16369,7 @@ int InitEnemyMine(DSWActor* actor)
|
|||
|
||||
// Spawn a shot
|
||||
// Inserting and setting up variables
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, MINE, s_Mine, actor->sector(),
|
||||
nx, ny, nz, actor->int_ang(), MINE_VELOCITY);
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, MINE, s_Mine, actor->sector(), actor->spr.pos.plusZ(-40), actor->spr.angle, MINE_VELOCITY);
|
||||
|
||||
SetOwner(actor, actorNew);
|
||||
actorNew->spr.yrepeat = 32;
|
||||
|
@ -16972,7 +16965,7 @@ DSWActor* SpawnBubble(DSWActor* actor)
|
|||
if (Prediction)
|
||||
return nullptr;
|
||||
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, BUBBLE, s_Bubble, actor->sector(), actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->int_ang(), 0);
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, BUBBLE, s_Bubble, actor->sector(), actor->spr.pos, actor->spr.angle, 0);
|
||||
|
||||
actorNew->spr.xrepeat = 8 + (RANDOM_P2(8 << 8) >> 8);
|
||||
actorNew->spr.yrepeat = actorNew->spr.xrepeat;
|
||||
|
@ -17009,8 +17002,7 @@ int SpawnVehicleSmoke(DSWActor* actor)
|
|||
if (MoveSkip2 != 0)
|
||||
return false;
|
||||
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, PUFF, s_VehicleSmoke, actor->sector(),
|
||||
actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z - RANDOM_P2(Z(8)), actor->int_ang(), 0);
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, PUFF, s_VehicleSmoke, actor->sector(), actor->spr.pos.plusZ(-RANDOM_P2F(8, 8)), actor->spr.angle, 0);
|
||||
|
||||
actorNew->user.WaitTics = 1*120;
|
||||
actorNew->spr.shade = -40;
|
||||
|
@ -17035,8 +17027,7 @@ int SpawnVehicleSmoke(DSWActor* actor)
|
|||
|
||||
int SpawnSmokePuff(DSWActor* actor)
|
||||
{
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, PUFF, s_WaterSmoke, actor->sector(),
|
||||
actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z - RANDOM_P2(Z(8)), actor->int_ang(), 0);
|
||||
auto actorNew = SpawnActor(STAT_MISSILE, PUFF, s_WaterSmoke, actor->sector(), actor->spr.pos.plusZ(-RANDOM_P2F(8, 8)), actor->spr.angle, 0);
|
||||
|
||||
actorNew->user.WaitTics = 1*120;
|
||||
actorNew->spr.shade = -40;
|
||||
|
@ -17329,7 +17320,7 @@ int QueueFloorBlood(DSWActor* actor)
|
|||
KillActor(FloorBloodQueue[FloorBloodQueueHead]);
|
||||
|
||||
FloorBloodQueue[FloorBloodQueueHead] = spawnedActor =
|
||||
SpawnActor(STAT_SKIP4, FLOORBLOOD1, s_FloorBlood1, actor->sector(), actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->int_ang(), 0);
|
||||
SpawnActor(STAT_SKIP4, FLOORBLOOD1, s_FloorBlood1, actor->sector(), actor->spr.pos, actor->spr.angle, 0);
|
||||
|
||||
FloorBloodQueueHead = (FloorBloodQueueHead+1) & (MAX_FLOORBLOOD_QUEUE-1);
|
||||
|
||||
|
@ -17422,13 +17413,13 @@ int QueueFootPrint(DSWActor* actor)
|
|||
|
||||
if (rnd_num > 683)
|
||||
FloorBloodQueue[FloorBloodQueueHead] = spawnedActor =
|
||||
SpawnActor(STAT_WALLBLOOD_QUEUE, FOOTPRINT1, s_FootPrint1, actor->sector(), actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->int_ang(), 0);
|
||||
SpawnActor(STAT_WALLBLOOD_QUEUE, FOOTPRINT1, s_FootPrint1, actor->sector(), actor->spr.pos, actor->spr.angle, 0);
|
||||
else if (rnd_num > 342)
|
||||
FloorBloodQueue[FloorBloodQueueHead] = spawnedActor =
|
||||
SpawnActor(STAT_WALLBLOOD_QUEUE, FOOTPRINT2, s_FootPrint2, actor->sector(), actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->int_ang(), 0);
|
||||
SpawnActor(STAT_WALLBLOOD_QUEUE, FOOTPRINT2, s_FootPrint2, actor->sector(), actor->spr.pos, actor->spr.angle, 0);
|
||||
else
|
||||
FloorBloodQueue[FloorBloodQueueHead] = spawnedActor =
|
||||
SpawnActor(STAT_WALLBLOOD_QUEUE, FOOTPRINT3, s_FootPrint3, actor->sector(), actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->int_ang(), 0);
|
||||
SpawnActor(STAT_WALLBLOOD_QUEUE, FOOTPRINT3, s_FootPrint3, actor->sector(), actor->spr.pos, actor->spr.angle, 0);
|
||||
|
||||
FloorBloodQueueHead = (FloorBloodQueueHead+1) & (MAX_FLOORBLOOD_QUEUE-1);
|
||||
|
||||
|
@ -18192,8 +18183,7 @@ void QueueLoWangs(DSWActor* actor)
|
|||
if (LoWangsQueue[LoWangsQueueHead] == nullptr)
|
||||
{
|
||||
LoWangsQueue[LoWangsQueueHead] = spawnedActor =
|
||||
SpawnActor(STAT_GENERIC_QUEUE, actor->spr.picnum, s_DeadLoWang, actor->sector(),
|
||||
actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z, actor->int_ang(), 0);
|
||||
SpawnActor(STAT_GENERIC_QUEUE, actor->spr.picnum, s_DeadLoWang, actor->sector(), actor->spr.pos, actor->spr.angle, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -776,7 +776,7 @@ void SpawnZombie(PLAYER* pp, DSWActor* weaponActor)
|
|||
if (ownerActor == nullptr)
|
||||
return;
|
||||
|
||||
auto actorNew = SpawnActor(STAT_ENEMY, ZOMBIE_RUN_R0, s_ZombieRun[0], pp->cursector, pp->int_ppos().X, pp->int_ppos().Y, pp->int_ppos().Z, pp->angle.ang.Buildang(), 0);
|
||||
auto actorNew = SpawnActor(STAT_ENEMY, ZOMBIE_RUN_R0, s_ZombieRun[0], pp->cursector, pp->pos, pp->angle.ang, 0);
|
||||
SetOwner(actorNew, ownerActor);
|
||||
actorNew->spr.pal = actorNew->user.spal = ownerActor->user.spal;
|
||||
actorNew->spr.angle = RANDOM_ANGLE();
|
||||
|
|
Loading…
Reference in a new issue