Add Obj_SpawnCustomBrolyKi

This commit is contained in:
James R 2024-03-30 22:33:43 -07:00
parent 193c85a418
commit 3c1e13084b
2 changed files with 14 additions and 3 deletions

View file

@ -83,6 +83,7 @@ void Obj_DuelBombInit(mobj_t *bomb);
/* Broly Ki */
mobj_t *Obj_SpawnBrolyKi(mobj_t *source, tic_t duration);
mobj_t *Obj_SpawnCustomBrolyKi(mobj_t *source, tic_t duration, fixed_t start, fixed_t end);
boolean Obj_BrolyKiThink(mobj_t *ki);
/* Special Stage UFO */

View file

@ -16,11 +16,13 @@
using namespace srb2::objects;
mobj_t *
Obj_SpawnBrolyKi
Obj_SpawnCustomBrolyKi
( mobj_t * source,
tic_t duration)
tic_t duration,
fixed_t start,
fixed_t end)
{
Broly* x = Broly::spawn<Broly>(static_cast<Mobj*>(source), duration, {64 * mapobjectscale, 0});
Broly* x = Broly::spawn<Broly>(static_cast<Mobj*>(source), duration, {start, end});
if (!x)
{
@ -36,6 +38,14 @@ Obj_SpawnBrolyKi
return x;
}
mobj_t *
Obj_SpawnBrolyKi
( mobj_t * source,
tic_t duration)
{
return Obj_SpawnCustomBrolyKi(source, duration, 64 * mapobjectscale, 0);
}
boolean
Obj_BrolyKiThink (mobj_t *x)
{