mirror of
https://github.com/DrBeef/Raze.git
synced 2025-01-19 23:51:01 +00:00
- internal cleanup of some spawn functions.
This commit is contained in:
parent
96ebfe808c
commit
f438773af9
1 changed files with 18 additions and 32 deletions
|
@ -19740,9 +19740,9 @@ DSWActor* SpawnBubble(DSWActor* actor)
|
||||||
if (Prediction)
|
if (Prediction)
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
auto bActor = SpawnActor(STAT_MISSILE, BUBBLE, s_Bubble, sp->sectnum, sp->x, sp->y, sp->z, sp->ang, 0);
|
auto actorNew = SpawnActor(STAT_MISSILE, BUBBLE, s_Bubble, sp->sectnum, sp->x, sp->y, sp->z, sp->ang, 0);
|
||||||
bp = &bActor->s();
|
bp = &actorNew->s();
|
||||||
bu = bActor->u();
|
bu = actorNew->u();
|
||||||
|
|
||||||
bp->xrepeat = 8 + (RANDOM_P2(8 << 8) >> 8);
|
bp->xrepeat = 8 + (RANDOM_P2(8 << 8) >> 8);
|
||||||
bp->yrepeat = bp->xrepeat;
|
bp->yrepeat = bp->xrepeat;
|
||||||
|
@ -19758,15 +19758,13 @@ DSWActor* SpawnBubble(DSWActor* actor)
|
||||||
SET(bu->Flags, SPR_UNDERWATER);
|
SET(bu->Flags, SPR_UNDERWATER);
|
||||||
bp->shade = -60; // Make em brighter
|
bp->shade = -60; // Make em brighter
|
||||||
|
|
||||||
return bActor;
|
return actorNew;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int DoVehicleSmoke(DSWActor* actor)
|
||||||
DoVehicleSmoke(DSWActor* actor)
|
|
||||||
{
|
{
|
||||||
USER* u = actor->u();
|
USER* u = actor->u();
|
||||||
int SpriteNum = u->SpriteNum;
|
SPRITEp sp = &actor->s();
|
||||||
SPRITEp sp = &sprite[SpriteNum];
|
|
||||||
|
|
||||||
sp->z -= sp->zvel;
|
sp->z -= sp->zvel;
|
||||||
|
|
||||||
|
@ -19777,35 +19775,27 @@ DoVehicleSmoke(DSWActor* actor)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int DoWaterSmoke(DSWActor* actor)
|
||||||
DoWaterSmoke(DSWActor* actor)
|
|
||||||
{
|
{
|
||||||
USER* u = actor->u();
|
SPRITEp sp = &actor->s();
|
||||||
int SpriteNum = u->SpriteNum;
|
|
||||||
SPRITEp sp = &sprite[SpriteNum];
|
|
||||||
|
|
||||||
sp->z -= sp->zvel;
|
sp->z -= sp->zvel;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int SpawnVehicleSmoke(DSWActor* actor)
|
||||||
SpawnVehicleSmoke(DSWActor* actor)
|
|
||||||
{
|
{
|
||||||
USER* u = actor->u();
|
USER* u = actor->u();
|
||||||
int SpriteNum = u->SpriteNum;
|
SPRITEp sp = &actor->s(),np;
|
||||||
SPRITEp sp = &sprite[SpriteNum],np;
|
|
||||||
USERp nu;
|
USERp nu;
|
||||||
short New;
|
|
||||||
|
|
||||||
if (MoveSkip2 != 0)
|
if (MoveSkip2 != 0)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
New = SpawnSprite(STAT_MISSILE, PUFF, s_VehicleSmoke, sp->sectnum,
|
auto actorNew = SpawnActor(STAT_MISSILE, PUFF, s_VehicleSmoke, sp->sectnum,
|
||||||
sp->x, sp->y, sp->z - RANDOM_P2(Z(8)), sp->ang, 0);
|
sp->x, sp->y, sp->z - RANDOM_P2(Z(8)), sp->ang, 0);
|
||||||
|
|
||||||
np = &sprite[New];
|
np = &actorNew->s();
|
||||||
nu = User[New].Data();
|
nu = actorNew->u();
|
||||||
|
|
||||||
nu->WaitTics = 1*120;
|
nu->WaitTics = 1*120;
|
||||||
np->shade = -40;
|
np->shade = -40;
|
||||||
|
@ -19828,20 +19818,17 @@ SpawnVehicleSmoke(DSWActor* actor)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int SpawnSmokePuff(DSWActor* actor)
|
||||||
SpawnSmokePuff(DSWActor* actor)
|
|
||||||
{
|
{
|
||||||
USER* u = actor->u();
|
USER* u = actor->u();
|
||||||
int SpriteNum = u->SpriteNum;
|
SPRITEp sp = &actor->s(),np;
|
||||||
SPRITEp sp = &sprite[SpriteNum],np;
|
|
||||||
USERp nu;
|
USERp nu;
|
||||||
short New;
|
|
||||||
|
|
||||||
New = SpawnSprite(STAT_MISSILE, PUFF, s_WaterSmoke, sp->sectnum,
|
auto actorNew = SpawnActor(STAT_MISSILE, PUFF, s_WaterSmoke, sp->sectnum,
|
||||||
sp->x, sp->y, sp->z - RANDOM_P2(Z(8)), sp->ang, 0);
|
sp->x, sp->y, sp->z - RANDOM_P2(Z(8)), sp->ang, 0);
|
||||||
|
|
||||||
np = &sprite[New];
|
np = &actorNew->s();
|
||||||
nu = User[New].Data();
|
nu = actorNew->u();
|
||||||
|
|
||||||
nu->WaitTics = 1*120;
|
nu->WaitTics = 1*120;
|
||||||
np->shade = -40;
|
np->shade = -40;
|
||||||
|
@ -19937,7 +19924,6 @@ int DoBubble(DSWActor* actor)
|
||||||
void SpriteQueueDelete(DSWActor* actor)
|
void SpriteQueueDelete(DSWActor* actor)
|
||||||
{
|
{
|
||||||
size_t i;
|
size_t i;
|
||||||
int SpriteNum = actor->GetSpriteIndex();
|
|
||||||
|
|
||||||
for (i = 0; i < MAX_STAR_QUEUE; i++)
|
for (i = 0; i < MAX_STAR_QUEUE; i++)
|
||||||
if (StarQueue[i] == actor)
|
if (StarQueue[i] == actor)
|
||||||
|
|
Loading…
Reference in a new issue