mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-18 22:51:50 +00:00
- Spawn*flames
This commit is contained in:
parent
e56b055e2e
commit
b863901037
1 changed files with 12 additions and 25 deletions
|
@ -85,7 +85,7 @@ short GenericQueueHead=0;
|
||||||
DSWActor* GenericQueue[MAX_GENERIC_QUEUE];
|
DSWActor* GenericQueue[MAX_GENERIC_QUEUE];
|
||||||
short LoWangsQueueHead=0;
|
short LoWangsQueueHead=0;
|
||||||
DSWActor* LoWangsQueue[MAX_LOWANGS_QUEUE];
|
DSWActor* LoWangsQueue[MAX_LOWANGS_QUEUE];
|
||||||
int SpawnBreakStaticFlames(short);
|
void SpawnBreakStaticFlames(DSWActor* actor);
|
||||||
|
|
||||||
bool GlobalSkipZrange = false;
|
bool GlobalSkipZrange = false;
|
||||||
|
|
||||||
|
@ -4719,7 +4719,7 @@ DoBreakFlames(DSWActor* actor)
|
||||||
|
|
||||||
if (u->WaitTics + MISSILEMOVETICS > 4 * 120)
|
if (u->WaitTics + MISSILEMOVETICS > 4 * 120)
|
||||||
{
|
{
|
||||||
SpawnBreakStaticFlames(SpriteNum);
|
SpawnBreakStaticFlames(actor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -10618,10 +10618,8 @@ int SpawnBreakFlames(DSWActor* actor)
|
||||||
USERp u = actor->u();
|
USERp u = actor->u();
|
||||||
SPRITEp np;
|
SPRITEp np;
|
||||||
USERp nu;
|
USERp nu;
|
||||||
short New;
|
|
||||||
|
|
||||||
New = SpawnSprite(STAT_MISSILE, FIREBALL_FLAMES+1, s_BreakFlames, sp->sectnum, sp->x, sp->y, sp->z, sp->ang, 0);
|
auto actorNew = SpawnActor(STAT_MISSILE, FIREBALL_FLAMES+1, s_BreakFlames, sp->sectnum, sp->x, sp->y, sp->z, sp->ang, 0);
|
||||||
auto actorNew = &swActors[New];
|
|
||||||
np = &actorNew->s();
|
np = &actorNew->s();
|
||||||
nu = actorNew->u();
|
nu = actorNew->u();
|
||||||
|
|
||||||
|
@ -10646,25 +10644,23 @@ int SpawnBreakFlames(DSWActor* actor)
|
||||||
nu->jump_speed = 0;
|
nu->jump_speed = 0;
|
||||||
DoBeginJump(actorNew);
|
DoBeginJump(actorNew);
|
||||||
|
|
||||||
PlaySound(DIGI_FIRE1,np,v3df_dontpan|v3df_doppler);
|
PlaySound(DIGI_FIRE1,actorNew,v3df_dontpan|v3df_doppler);
|
||||||
|
|
||||||
return New;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int
|
void SpawnBreakStaticFlames(DSWActor* actor)
|
||||||
SpawnBreakStaticFlames(int16_t SpriteNum)
|
|
||||||
{
|
{
|
||||||
SPRITEp sp = &sprite[SpriteNum];
|
SPRITEp sp = &actor->s();
|
||||||
USERp u = User[SpriteNum].Data();
|
USERp u = actor->u();
|
||||||
SPRITEp np;
|
SPRITEp np;
|
||||||
USERp nu;
|
USERp nu;
|
||||||
short New;
|
|
||||||
|
|
||||||
New = SpawnSprite(STAT_STATIC_FIRE, FIREBALL_FLAMES, nullptr, sp->sectnum,
|
auto actorNew = SpawnActor(STAT_STATIC_FIRE, FIREBALL_FLAMES, nullptr, sp->sectnum,
|
||||||
sp->x, sp->y, sp->z, sp->ang, 0);
|
sp->x, sp->y, sp->z, sp->ang, 0);
|
||||||
np = &sprite[New];
|
np = &actorNew->s();
|
||||||
nu = User[New].Data();
|
nu = actorNew->u();
|
||||||
|
|
||||||
if (RandomRange(1000) > 500)
|
if (RandomRange(1000) > 500)
|
||||||
np->picnum = 3143;
|
np->picnum = 3143;
|
||||||
|
@ -10673,27 +10669,18 @@ SpawnBreakStaticFlames(int16_t SpriteNum)
|
||||||
|
|
||||||
np->hitag = LUMINOUS; //Always full brightness
|
np->hitag = LUMINOUS; //Always full brightness
|
||||||
|
|
||||||
//np->xrepeat = 64;
|
|
||||||
//np->yrepeat = 64;
|
|
||||||
np->xrepeat = 32;
|
np->xrepeat = 32;
|
||||||
np->yrepeat = 32;
|
np->yrepeat = 32;
|
||||||
//nu->Counter = 48; // max flame size
|
|
||||||
|
|
||||||
|
|
||||||
np->shade = -40;
|
np->shade = -40;
|
||||||
np->pal = nu->spal = u->spal;
|
np->pal = nu->spal = u->spal;
|
||||||
//SET(np->cstat, CSTAT_SPRITE_YCENTER);
|
|
||||||
RESET(np->cstat, CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
|
RESET(np->cstat, CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
|
||||||
|
|
||||||
nu->Radius = 200;
|
nu->Radius = 200;
|
||||||
|
|
||||||
nu->floor_dist = nu->ceiling_dist = 0;
|
nu->floor_dist = nu->ceiling_dist = 0;
|
||||||
|
|
||||||
np->z = getflorzofslope(np->sectnum,np->x,np->y);
|
np->z = getflorzofslope(np->sectnum,np->x,np->y);
|
||||||
|
|
||||||
PlaySound(DIGI_FIRE1,np,v3df_dontpan|v3df_doppler);
|
PlaySound(DIGI_FIRE1,actorNew,v3df_dontpan|v3df_doppler);
|
||||||
|
|
||||||
return New;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue