mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-02-17 19:11:30 +00:00
Rename K_SpawnBrolyKi to Obj_SpawnBrolyKi, move to objects/broly.c, spawn MT_BROLY
This commit is contained in:
parent
c32134849f
commit
7f569fe168
10 changed files with 78 additions and 36 deletions
|
|
@ -5627,6 +5627,8 @@ const char *const MOBJTYPE_LIST[] = { // array length left dynamic for sanity t
|
|||
"MT_PAPERITEMSPOT",
|
||||
|
||||
"MT_BEAMPOINT",
|
||||
|
||||
"MT_BROLY",
|
||||
};
|
||||
|
||||
const char *const MOBJFLAG_LIST[] = {
|
||||
|
|
|
|||
27
src/info.c
27
src/info.c
|
|
@ -29030,6 +29030,33 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
MF_NOBLOCKMAP|MF_NOSECTOR|MF_NOCLIPTHING|MF_NOGRAVITY|MF_DONTENCOREMAP, // flags
|
||||
S_NULL // raisestate
|
||||
},
|
||||
|
||||
{ // MT_BROLY
|
||||
-1, // doomednum
|
||||
S_BROLY1, // spawnstate
|
||||
1000, // spawnhealth
|
||||
S_NULL, // seestate
|
||||
sfx_None, // seesound
|
||||
8, // reactiontime
|
||||
sfx_None, // attacksound
|
||||
S_NULL, // painstate
|
||||
0, // painchance
|
||||
sfx_None, // painsound
|
||||
S_NULL, // meleestate
|
||||
S_NULL, // missilestate
|
||||
S_NULL, // deathstate
|
||||
S_NULL, // xdeathstate
|
||||
sfx_None, // deathsound
|
||||
0, // speed
|
||||
0, // radius
|
||||
0, // height
|
||||
0, // display offset
|
||||
100, // mass
|
||||
1, // damage
|
||||
sfx_None, // activesound
|
||||
MF_NOBLOCKMAP|MF_NOCLIP|MF_NOCLIPTHING|MF_NOCLIPHEIGHT|MF_NOGRAVITY|MF_SCENERY|MF_DONTENCOREMAP, // flags
|
||||
S_NULL // raisestate
|
||||
},
|
||||
};
|
||||
|
||||
skincolor_t skincolors[MAXSKINCOLORS] = {
|
||||
|
|
|
|||
|
|
@ -6682,6 +6682,8 @@ typedef enum mobj_type
|
|||
|
||||
MT_BEAMPOINT,
|
||||
|
||||
MT_BROLY,
|
||||
|
||||
MT_FIRSTFREESLOT,
|
||||
MT_LASTFREESLOT = MT_FIRSTFREESLOT + NUMMOBJFREESLOTS - 1,
|
||||
NUMMOBJTYPES
|
||||
|
|
|
|||
|
|
@ -319,7 +319,7 @@ tic_t K_MineExplodeAttack(mobj_t *actor, fixed_t size, boolean spin)
|
|||
|
||||
if (!spin)
|
||||
{
|
||||
K_SpawnBrolyKi(actor, minehitlag);
|
||||
Obj_SpawnBrolyKi(actor, minehitlag);
|
||||
|
||||
return minehitlag;
|
||||
}
|
||||
|
|
|
|||
33
src/k_kart.c
33
src/k_kart.c
|
|
@ -5210,39 +5210,6 @@ void K_SpawnMineExplosion(mobj_t *source, UINT8 color, tic_t delay)
|
|||
}
|
||||
}
|
||||
|
||||
void K_SpawnBrolyKi(mobj_t *source, tic_t duration)
|
||||
{
|
||||
mobj_t *x;
|
||||
|
||||
if (duration == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
x = P_SpawnMobjFromMobj(source, 0, 0, 0, MT_THOK);
|
||||
|
||||
// Shrink into center of source object.
|
||||
x->z = (source->z + source->height / 2);
|
||||
x->height = 0;
|
||||
|
||||
P_SetMobjState(x, S_BROLY1);
|
||||
x->colorized = true;
|
||||
x->color = source->color;
|
||||
x->hitlag = 0; // do not copy source hitlag
|
||||
|
||||
P_SetScale(x, 64 * mapobjectscale);
|
||||
x->scalespeed = x->scale / duration;
|
||||
|
||||
// The last tic doesn't actually get rendered so in order
|
||||
// to show scale = destscale, add one buffer tic.
|
||||
x->tics = (duration + 1);
|
||||
x->destscale = 1; // 0 also doesn't work
|
||||
|
||||
K_ReduceVFX(x, NULL);
|
||||
|
||||
S_StartSound(x, sfx_cdfm74);
|
||||
}
|
||||
|
||||
#undef MINEQUAKEDIST
|
||||
|
||||
fixed_t K_ItemScaleForPlayer(player_t *player)
|
||||
|
|
|
|||
|
|
@ -107,7 +107,6 @@ void K_DestroyBumpers(player_t *player, UINT8 amount);
|
|||
void K_TakeBumpersFromPlayer(player_t *player, player_t *victim, UINT8 amount);
|
||||
void K_MineFlashScreen(mobj_t *source);
|
||||
void K_SpawnMineExplosion(mobj_t *source, UINT8 color, tic_t delay);
|
||||
void K_SpawnBrolyKi(mobj_t *source, tic_t duration);
|
||||
void K_RunFinishLineBeam(void);
|
||||
UINT16 K_DriftSparkColor(player_t *player, INT32 charge);
|
||||
void K_SpawnBoostTrail(player_t *player);
|
||||
|
|
|
|||
|
|
@ -54,4 +54,7 @@ void Obj_DuelBombReverse(mobj_t *bomb);
|
|||
void Obj_DuelBombTouch(mobj_t *bomb, mobj_t *toucher);
|
||||
void Obj_DuelBombInit(mobj_t *bomb);
|
||||
|
||||
/* Broly Ki */
|
||||
mobj_t *Obj_SpawnBrolyKi(mobj_t *source, tic_t duration);
|
||||
|
||||
#endif/*k_objects_H*/
|
||||
|
|
|
|||
|
|
@ -7,3 +7,4 @@ manta-ring.c
|
|||
orbinaut.c
|
||||
jawz.c
|
||||
duel-bomb.c
|
||||
broly.c
|
||||
|
|
|
|||
41
src/objects/broly.c
Normal file
41
src/objects/broly.c
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
#include "../doomdef.h"
|
||||
#include "../info.h"
|
||||
#include "../k_kart.h"
|
||||
#include "../k_objects.h"
|
||||
#include "../p_local.h"
|
||||
#include "../s_sound.h"
|
||||
|
||||
mobj_t *
|
||||
Obj_SpawnBrolyKi
|
||||
( mobj_t * source,
|
||||
tic_t duration)
|
||||
{
|
||||
mobj_t *x = P_SpawnMobjFromMobj(
|
||||
source, 0, 0, 0, MT_BROLY);
|
||||
|
||||
if (duration == 0)
|
||||
{
|
||||
return x;
|
||||
}
|
||||
|
||||
// Shrink into center of source object.
|
||||
x->z = (source->z + source->height / 2);
|
||||
|
||||
x->colorized = true;
|
||||
x->color = source->color;
|
||||
x->hitlag = 0; // do not copy source hitlag
|
||||
|
||||
P_SetScale(x, 64 * mapobjectscale);
|
||||
x->scalespeed = x->scale / duration;
|
||||
|
||||
// The last tic doesn't actually get rendered so in order
|
||||
// to show scale = destscale, add one buffer tic.
|
||||
x->tics = (duration + 1);
|
||||
x->destscale = 1; // 0 also doesn't work
|
||||
|
||||
K_ReduceVFX(x, NULL);
|
||||
|
||||
S_StartSound(x, sfx_cdfm74);
|
||||
|
||||
return x;
|
||||
}
|
||||
|
|
@ -13186,7 +13186,7 @@ void A_LandMineExplode(mobj_t *actor)
|
|||
expl->momz = ((i+1)*actor->scale*5/2)*P_MobjFlip(expl);
|
||||
}
|
||||
|
||||
K_SpawnBrolyKi(actor, delay);
|
||||
Obj_SpawnBrolyKi(actor, delay);
|
||||
}
|
||||
|
||||
void A_BallhogExplode(mobj_t *actor)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue