mirror of
https://github.com/DrBeef/Raze.git
synced 2025-02-22 19:51:16 +00:00
- SpawnRadiationCloud
This commit is contained in:
parent
5aaa0ce971
commit
93fde48abb
2 changed files with 14 additions and 18 deletions
|
@ -931,7 +931,7 @@ int DoChemBomb(DSWActor* actor)
|
||||||
PlaySound(DIGI_CHEMGAS, sp, v3df_dontpan | v3df_doppler);
|
PlaySound(DIGI_CHEMGAS, sp, v3df_dontpan | v3df_doppler);
|
||||||
Set3DSoundOwner(actor->GetSpriteIndex());
|
Set3DSoundOwner(actor->GetSpriteIndex());
|
||||||
}
|
}
|
||||||
SpawnRadiationCloud(actor->GetSpriteIndex());
|
SpawnRadiationCloud(actor);
|
||||||
u->xchange = u->ychange = 0;
|
u->xchange = u->ychange = 0;
|
||||||
u->WaitTics -= (MISSILEMOVETICS * 2);
|
u->WaitTics -= (MISSILEMOVETICS * 2);
|
||||||
if (u->WaitTics <= 0)
|
if (u->WaitTics <= 0)
|
||||||
|
@ -979,7 +979,7 @@ int DoChemBomb(DSWActor* actor)
|
||||||
PlaySound(DIGI_CHEMGAS, sp, v3df_dontpan | v3df_doppler);
|
PlaySound(DIGI_CHEMGAS, sp, v3df_dontpan | v3df_doppler);
|
||||||
Set3DSoundOwner(actor->GetSpriteIndex());
|
Set3DSoundOwner(actor->GetSpriteIndex());
|
||||||
}
|
}
|
||||||
SpawnRadiationCloud(actor->GetSpriteIndex());
|
SpawnRadiationCloud(actor);
|
||||||
u->xchange = u->ychange = 0;
|
u->xchange = u->ychange = 0;
|
||||||
u->WaitTics -= (MISSILEMOVETICS * 2);
|
u->WaitTics -= (MISSILEMOVETICS * 2);
|
||||||
if (u->WaitTics <= 0)
|
if (u->WaitTics <= 0)
|
||||||
|
@ -1216,13 +1216,11 @@ int DoCaltrops(DSWActor* actor)
|
||||||
// Deadly green gas clouds
|
// Deadly green gas clouds
|
||||||
//
|
//
|
||||||
/////////////////////////////
|
/////////////////////////////
|
||||||
int
|
|
||||||
SpawnRadiationCloud(short SpriteNum)
|
|
||||||
{
|
|
||||||
SPRITEp sp = &sprite[SpriteNum], np;
|
|
||||||
USERp u = User[SpriteNum].Data(), nu;
|
|
||||||
short New;
|
|
||||||
|
|
||||||
|
int SpawnRadiationCloud(DSWActor* actor)
|
||||||
|
{
|
||||||
|
SPRITEp sp = &actor->s(), np;
|
||||||
|
USERp u = actor->u(), nu;
|
||||||
|
|
||||||
if (!MoveSkip4)
|
if (!MoveSkip4)
|
||||||
return false;
|
return false;
|
||||||
|
@ -1247,13 +1245,13 @@ SpawnRadiationCloud(short SpriteNum)
|
||||||
if (TEST(u->Flags, SPR_UNDERWATER))
|
if (TEST(u->Flags, SPR_UNDERWATER))
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
New = SpawnSprite(STAT_MISSILE, RADIATION_CLOUD, s_RadiationCloud, sp->sectnum,
|
auto actorNew = SpawnActor(STAT_MISSILE, RADIATION_CLOUD, s_RadiationCloud, 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();
|
||||||
|
|
||||||
SetOwner(sp->owner, New);
|
SetOwner(GetOwner(actor), actorNew);
|
||||||
nu->WaitTics = 1 * 120;
|
nu->WaitTics = 1 * 120;
|
||||||
np->shade = -40;
|
np->shade = -40;
|
||||||
np->xrepeat = 32;
|
np->xrepeat = 32;
|
||||||
|
@ -1294,12 +1292,10 @@ SpawnRadiationCloud(short SpriteNum)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int DoRadiationCloud(DSWActor* actor)
|
||||||
DoRadiationCloud(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;
|
||||||
|
|
||||||
|
@ -1308,7 +1304,7 @@ DoRadiationCloud(DSWActor* actor)
|
||||||
|
|
||||||
if (u->ID)
|
if (u->ID)
|
||||||
{
|
{
|
||||||
DoFlamesDamageTest(SpriteNum);
|
DoFlamesDamageTest(actor->GetSpriteIndex());
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -78,7 +78,7 @@ int SpawnSwordSparks(PLAYERp pp, short hit_sect, short hit_wall, int hit_x, int
|
||||||
int SpawnBubble(short SpriteNum);
|
int SpawnBubble(short SpriteNum);
|
||||||
int SpawnFireballExp(int16_t Weapon);
|
int SpawnFireballExp(int16_t Weapon);
|
||||||
void SpawnFireballFlames(int16_t SpriteNum,int16_t enemy);
|
void SpawnFireballFlames(int16_t SpriteNum,int16_t enemy);
|
||||||
int SpawnRadiationCloud(short SpriteNum);
|
int SpawnRadiationCloud(DSWActor* actor);
|
||||||
int SpawnGrenadeExp(int16_t Weapon);
|
int SpawnGrenadeExp(int16_t Weapon);
|
||||||
int SpawnSectorExp(int16_t Weapon);
|
int SpawnSectorExp(int16_t Weapon);
|
||||||
int DoShrapVelocity(int16_t SpriteNum);
|
int DoShrapVelocity(int16_t SpriteNum);
|
||||||
|
|
Loading…
Reference in a new issue