mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-11-17 10:11:12 +00:00
Bumpy
This commit is contained in:
parent
5233c442fb
commit
4be15a9020
5 changed files with 65 additions and 6 deletions
|
@ -6395,6 +6395,10 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
|
||||||
"S_SHADOW",
|
"S_SHADOW",
|
||||||
"S_WHITESHADOW",
|
"S_WHITESHADOW",
|
||||||
|
|
||||||
|
"S_BUMP1",
|
||||||
|
"S_BUMP2",
|
||||||
|
"S_BUMP3",
|
||||||
|
|
||||||
#ifdef SEENAMES
|
#ifdef SEENAMES
|
||||||
"S_NAMECHECK",
|
"S_NAMECHECK",
|
||||||
#endif
|
#endif
|
||||||
|
@ -6958,6 +6962,8 @@ static const char *const MOBJTYPE_LIST[] = { // array length left dynamic for s
|
||||||
"MT_WAYPOINT",
|
"MT_WAYPOINT",
|
||||||
"MT_SHADOW",
|
"MT_SHADOW",
|
||||||
|
|
||||||
|
"MT_BUMP",
|
||||||
|
|
||||||
#ifdef SEENAMES
|
#ifdef SEENAMES
|
||||||
"MT_NAMECHECK",
|
"MT_NAMECHECK",
|
||||||
#endif
|
#endif
|
||||||
|
|
32
src/info.c
32
src/info.c
|
@ -58,7 +58,7 @@ char sprnames[NUMSPRITES + 1][5] =
|
||||||
"SPRG","BSPR","RNDM","RPOP","KFRE","DRIF","DSMO","FITM","DFAK","BANA",
|
"SPRG","BSPR","RNDM","RPOP","KFRE","DRIF","DSMO","FITM","DFAK","BANA",
|
||||||
"DBAN","GSHE","GSTR","DGSH","RSHE","RSTR","DRSH","BOMB","BLIG","LIGH",
|
"DBAN","GSHE","GSTR","DGSH","RSHE","RSTR","DRSH","BOMB","BLIG","LIGH",
|
||||||
"SINK","SITR","LAKI","POKE","AUDI","DECO","DOOD","SNES","GBAS","SPRS",
|
"SINK","SITR","LAKI","POKE","AUDI","DECO","DOOD","SNES","GBAS","SPRS",
|
||||||
"BUZB","CHOM","SACO","CRAB", "SHAD"
|
"BUZB","CHOM","SACO","CRAB", "SHAD", "BUMP"
|
||||||
};
|
};
|
||||||
|
|
||||||
// Doesn't work with g++, needs actionf_p1 (don't modify this comment)
|
// Doesn't work with g++, needs actionf_p1 (don't modify this comment)
|
||||||
|
@ -2851,6 +2851,10 @@ state_t states[NUMSTATES] =
|
||||||
{SPR_SHAD, FF_TRANS50, -1, {NULL}, 0, 0, S_NULL}, // S_SHADOW
|
{SPR_SHAD, FF_TRANS50, -1, {NULL}, 0, 0, S_NULL}, // S_SHADOW
|
||||||
{SPR_SHAD, FF_FULLBRIGHT|FF_TRANS50|1, -1, {NULL}, 0, 0, S_NULL}, // S_WHITESHADOW
|
{SPR_SHAD, FF_FULLBRIGHT|FF_TRANS50|1, -1, {NULL}, 0, 0, S_NULL}, // S_WHITESHADOW
|
||||||
|
|
||||||
|
{SPR_BUMP, 0, 5, {NULL}, 0, 0, S_BUMP2}, // S_BUMP1
|
||||||
|
{SPR_BUMP, 1, 5, {NULL}, 0, 0, S_BUMP3}, // S_BUMP2
|
||||||
|
{SPR_BUMP, 2, 5, {NULL}, 0, 0, S_NULL}, // S_BUMP3
|
||||||
|
|
||||||
#ifdef SEENAMES
|
#ifdef SEENAMES
|
||||||
{SPR_NULL, 0, 1, {NULL}, 0, 0, S_NULL}, // S_NAMECHECK
|
{SPR_NULL, 0, 1, {NULL}, 0, 0, S_NULL}, // S_NAMECHECK
|
||||||
#endif
|
#endif
|
||||||
|
@ -16510,6 +16514,32 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
||||||
S_NULL // raisestate
|
S_NULL // raisestate
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{ // MT_BUMP
|
||||||
|
-1, // doomednum
|
||||||
|
S_BUMP1, // 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
|
||||||
|
32*FRACUNIT, // radius
|
||||||
|
64*FRACUNIT, // height
|
||||||
|
0, // display offset
|
||||||
|
100, // mass
|
||||||
|
0, // damage
|
||||||
|
sfx_None, // activesound
|
||||||
|
MF_NOGRAVITY|MF_SCENERY|MF_NOCLIP|MF_NOCLIPHEIGHT, // flags
|
||||||
|
S_NULL // raisestate
|
||||||
|
},
|
||||||
// ============================================================================================================================//
|
// ============================================================================================================================//
|
||||||
|
|
||||||
#ifdef SEENAMES
|
#ifdef SEENAMES
|
||||||
|
|
|
@ -617,6 +617,8 @@ typedef enum sprite
|
||||||
SPR_CRAB, // Crystal Abyss mobs
|
SPR_CRAB, // Crystal Abyss mobs
|
||||||
SPR_SHAD, // TD shadows
|
SPR_SHAD, // TD shadows
|
||||||
|
|
||||||
|
SPR_BUMP, // Player/shell bump
|
||||||
|
|
||||||
SPR_FIRSTFREESLOT,
|
SPR_FIRSTFREESLOT,
|
||||||
SPR_LASTFREESLOT = SPR_FIRSTFREESLOT + NUMSPRITEFREESLOTS - 1,
|
SPR_LASTFREESLOT = SPR_FIRSTFREESLOT + NUMSPRITEFREESLOTS - 1,
|
||||||
NUMSPRITES
|
NUMSPRITES
|
||||||
|
@ -3364,6 +3366,10 @@ typedef enum state
|
||||||
S_SHADOW,
|
S_SHADOW,
|
||||||
S_WHITESHADOW,
|
S_WHITESHADOW,
|
||||||
|
|
||||||
|
S_BUMP1,
|
||||||
|
S_BUMP2,
|
||||||
|
S_BUMP3,
|
||||||
|
|
||||||
#ifdef SEENAMES
|
#ifdef SEENAMES
|
||||||
S_NAMECHECK,
|
S_NAMECHECK,
|
||||||
#endif
|
#endif
|
||||||
|
@ -4001,6 +4007,8 @@ typedef enum mobj_type
|
||||||
MT_MOSSYTREE,
|
MT_MOSSYTREE,
|
||||||
MT_SHADOW,
|
MT_SHADOW,
|
||||||
|
|
||||||
|
MT_BUMP,
|
||||||
|
|
||||||
#ifdef SEENAMES
|
#ifdef SEENAMES
|
||||||
MT_NAMECHECK,
|
MT_NAMECHECK,
|
||||||
#endif
|
#endif
|
||||||
|
|
12
src/k_kart.c
12
src/k_kart.c
|
@ -1048,8 +1048,8 @@ boolean K_IsTouching(mobj_t *mobj1, mobj_t *mobj2)
|
||||||
|
|
||||||
void K_SwapMomentum(mobj_t *mobj1, mobj_t *mobj2, boolean bounce)
|
void K_SwapMomentum(mobj_t *mobj1, mobj_t *mobj2, boolean bounce)
|
||||||
{
|
{
|
||||||
fixed_t newx;
|
fixed_t newx, newy;
|
||||||
fixed_t newy;
|
mobj_t *fx;
|
||||||
|
|
||||||
if (mobj1 == NULL || mobj2 == NULL)
|
if (mobj1 == NULL || mobj2 == NULL)
|
||||||
return;
|
return;
|
||||||
|
@ -1064,6 +1064,14 @@ void K_SwapMomentum(mobj_t *mobj1, mobj_t *mobj2, boolean bounce)
|
||||||
S_StartSound(mobj1, cv_collidesoundnum.value);
|
S_StartSound(mobj1, cv_collidesoundnum.value);
|
||||||
//S_StartSound(mobj2, cv_collidesoundnum.value);
|
//S_StartSound(mobj2, cv_collidesoundnum.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fx = P_SpawnMobj((mobj1->x + mobj2->x)/2, (mobj1->y + mobj2->y)/2, (mobj1->z + mobj2->z)/2, MT_BUMP);
|
||||||
|
if (mobj1->eflags & MFE_VERTICALFLIP)
|
||||||
|
fx->eflags |= MFE_VERTICALFLIP;
|
||||||
|
else
|
||||||
|
fx->eflags &= ~MFE_VERTICALFLIP;
|
||||||
|
fx->scale = mobj1->scale;
|
||||||
|
|
||||||
if (deltaV1 < (cv_collideminimum.value * FRACUNIT / 2))
|
if (deltaV1 < (cv_collideminimum.value * FRACUNIT / 2))
|
||||||
{
|
{
|
||||||
fixed_t a = 0;
|
fixed_t a = 0;
|
||||||
|
|
|
@ -1737,6 +1737,13 @@ void P_XYMovement(mobj_t *mo)
|
||||||
//{ SRB2kart - Green Shell, Fireball
|
//{ SRB2kart - Green Shell, Fireball
|
||||||
if (mo->type == MT_GREENITEM)
|
if (mo->type == MT_GREENITEM)
|
||||||
{
|
{
|
||||||
|
mobj_t *fx;
|
||||||
|
fx = P_SpawnMobj(mo->x, mo->y, mo->z, MT_BUMP);
|
||||||
|
if (mo->eflags & MFE_VERTICALFLIP)
|
||||||
|
fx->eflags |= MFE_VERTICALFLIP;
|
||||||
|
else
|
||||||
|
fx->eflags &= ~MFE_VERTICALFLIP;
|
||||||
|
fx->scale = mo->scale;
|
||||||
if (mo->health > 1)
|
if (mo->health > 1)
|
||||||
{
|
{
|
||||||
S_StartSound(mo, mo->info->attacksound);
|
S_StartSound(mo, mo->info->attacksound);
|
||||||
|
|
Loading…
Reference in a new issue