mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Merge branch 'rvz-hardcode' of https://git.magicalgirl.moe/STJr/SRB2Internal into rvz-hardcode
This commit is contained in:
commit
c2b98b0e27
10 changed files with 110 additions and 43 deletions
|
|
@ -6598,6 +6598,9 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
|
||||||
"S_SPLISH8",
|
"S_SPLISH8",
|
||||||
"S_SPLISH9",
|
"S_SPLISH9",
|
||||||
|
|
||||||
|
// Lava splish
|
||||||
|
"S_LAVASPLISH",
|
||||||
|
|
||||||
// added water splash
|
// added water splash
|
||||||
"S_SPLASH1",
|
"S_SPLASH1",
|
||||||
"S_SPLASH2",
|
"S_SPLASH2",
|
||||||
|
|
@ -7769,6 +7772,7 @@ static const char *const MOBJTYPE_LIST[] = { // array length left dynamic for s
|
||||||
"MT_RAIN", // Rain
|
"MT_RAIN", // Rain
|
||||||
"MT_SNOWFLAKE", // Snowflake
|
"MT_SNOWFLAKE", // Snowflake
|
||||||
"MT_SPLISH", // Water splish!
|
"MT_SPLISH", // Water splish!
|
||||||
|
"MT_LAVASPLISH", // Lava splish!
|
||||||
"MT_SMOKE",
|
"MT_SMOKE",
|
||||||
"MT_SMALLBUBBLE", // small bubble
|
"MT_SMALLBUBBLE", // small bubble
|
||||||
"MT_MEDIUMBUBBLE", // medium bubble
|
"MT_MEDIUMBUBBLE", // medium bubble
|
||||||
|
|
|
||||||
|
|
@ -477,6 +477,7 @@ light_t *t_lspr[NUMSPRITES] =
|
||||||
&lspr[NOLIGHT], // SPR_RAIN
|
&lspr[NOLIGHT], // SPR_RAIN
|
||||||
&lspr[NOLIGHT], // SPR_SNO1
|
&lspr[NOLIGHT], // SPR_SNO1
|
||||||
&lspr[NOLIGHT], // SPR_SPLH
|
&lspr[NOLIGHT], // SPR_SPLH
|
||||||
|
&lspr[NOLIGHT], // SPR_LSPL
|
||||||
&lspr[NOLIGHT], // SPR_SPLA
|
&lspr[NOLIGHT], // SPR_SPLA
|
||||||
&lspr[NOLIGHT], // SPR_SMOK
|
&lspr[NOLIGHT], // SPR_SMOK
|
||||||
&lspr[NOLIGHT], // SPR_BUBL
|
&lspr[NOLIGHT], // SPR_BUBL
|
||||||
|
|
|
||||||
33
src/info.c
33
src/info.c
|
|
@ -372,6 +372,7 @@ char sprnames[NUMSPRITES + 1][5] =
|
||||||
"RAIN", // Rain
|
"RAIN", // Rain
|
||||||
"SNO1", // Snowflake
|
"SNO1", // Snowflake
|
||||||
"SPLH", // Water Splish
|
"SPLH", // Water Splish
|
||||||
|
"LSPL", // Lava Splish
|
||||||
"SPLA", // Water Splash
|
"SPLA", // Water Splash
|
||||||
"SMOK",
|
"SMOK",
|
||||||
"BUBL", // Bubble
|
"BUBL", // Bubble
|
||||||
|
|
@ -3233,6 +3234,9 @@ state_t states[NUMSTATES] =
|
||||||
{SPR_SPLH, FF_TRANS50|7, 2, {NULL}, 0, 0, S_SPLISH9}, // S_SPLISH8
|
{SPR_SPLH, FF_TRANS50|7, 2, {NULL}, 0, 0, S_SPLISH9}, // S_SPLISH8
|
||||||
{SPR_SPLH, FF_TRANS50|8, 2, {NULL}, 0, 0, S_NULL}, // S_SPLISH9
|
{SPR_SPLH, FF_TRANS50|8, 2, {NULL}, 0, 0, S_NULL}, // S_SPLISH9
|
||||||
|
|
||||||
|
// Lava splish
|
||||||
|
{SPR_LSPL, FF_ANIMATE, 16, {NULL}, 7, 2, S_NULL}, // S_LAVASPLISH
|
||||||
|
|
||||||
// Water Splash
|
// Water Splash
|
||||||
{SPR_SPLA, FF_TRANS50 , 3, {NULL}, 0, 0, S_SPLASH2}, // S_SPLASH1
|
{SPR_SPLA, FF_TRANS50 , 3, {NULL}, 0, 0, S_SPLASH2}, // S_SPLASH1
|
||||||
{SPR_SPLA, FF_TRANS70|1, 3, {NULL}, 0, 0, S_SPLASH3}, // S_SPLASH2
|
{SPR_SPLA, FF_TRANS70|1, 3, {NULL}, 0, 0, S_SPLASH3}, // S_SPLASH2
|
||||||
|
|
@ -12761,7 +12765,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
||||||
0, // speed
|
0, // speed
|
||||||
30*FRACUNIT, // radius
|
30*FRACUNIT, // radius
|
||||||
32*FRACUNIT, // height
|
32*FRACUNIT, // height
|
||||||
0, // display offset
|
1, // display offset
|
||||||
100, // mass
|
100, // mass
|
||||||
0, // damage
|
0, // damage
|
||||||
sfx_None, // activesound
|
sfx_None, // activesound
|
||||||
|
|
@ -16823,6 +16827,33 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
||||||
S_NULL // raisestate
|
S_NULL // raisestate
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{ // MT_LAVASPLISH
|
||||||
|
-1, // doomednum
|
||||||
|
S_LAVASPLISH, // 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
|
||||||
|
6*FRACUNIT, // radius
|
||||||
|
1*FRACUNIT, // height
|
||||||
|
0, // display offset
|
||||||
|
100, // mass
|
||||||
|
1, // damage
|
||||||
|
sfx_None, // activesound
|
||||||
|
MF_NOBLOCKMAP|MF_NOCLIP|MF_NOGRAVITY|MF_SCENERY, // flags
|
||||||
|
S_NULL // raisestate
|
||||||
|
},
|
||||||
|
|
||||||
{ // MT_SMOKE
|
{ // MT_SMOKE
|
||||||
-1, // doomednum
|
-1, // doomednum
|
||||||
S_SMOKE1, // spawnstate
|
S_SMOKE1, // spawnstate
|
||||||
|
|
|
||||||
|
|
@ -626,6 +626,7 @@ typedef enum sprite
|
||||||
SPR_RAIN, // Rain
|
SPR_RAIN, // Rain
|
||||||
SPR_SNO1, // Snowflake
|
SPR_SNO1, // Snowflake
|
||||||
SPR_SPLH, // Water Splish
|
SPR_SPLH, // Water Splish
|
||||||
|
SPR_LSPL, // Lava Splish
|
||||||
SPR_SPLA, // Water Splash
|
SPR_SPLA, // Water Splash
|
||||||
SPR_SMOK,
|
SPR_SMOK,
|
||||||
SPR_BUBL, // Bubble
|
SPR_BUBL, // Bubble
|
||||||
|
|
@ -3353,6 +3354,9 @@ typedef enum state
|
||||||
S_SPLISH8,
|
S_SPLISH8,
|
||||||
S_SPLISH9,
|
S_SPLISH9,
|
||||||
|
|
||||||
|
// Lava Splish
|
||||||
|
S_LAVASPLISH,
|
||||||
|
|
||||||
// added water splash
|
// added water splash
|
||||||
S_SPLASH1,
|
S_SPLASH1,
|
||||||
S_SPLASH2,
|
S_SPLASH2,
|
||||||
|
|
@ -4546,6 +4550,7 @@ typedef enum mobj_type
|
||||||
MT_RAIN, // Rain
|
MT_RAIN, // Rain
|
||||||
MT_SNOWFLAKE, // Snowflake
|
MT_SNOWFLAKE, // Snowflake
|
||||||
MT_SPLISH, // Water splish!
|
MT_SPLISH, // Water splish!
|
||||||
|
MT_LAVASPLISH, // Lava splish!
|
||||||
MT_SMOKE,
|
MT_SMOKE,
|
||||||
MT_SMALLBUBBLE, // small bubble
|
MT_SMALLBUBBLE, // small bubble
|
||||||
MT_MEDIUMBUBBLE, // medium bubble
|
MT_MEDIUMBUBBLE, // medium bubble
|
||||||
|
|
|
||||||
|
|
@ -12042,7 +12042,7 @@ void A_MineExplode(mobj_t *actor)
|
||||||
#undef dist
|
#undef dist
|
||||||
|
|
||||||
if (actor->watertop != INT32_MAX)
|
if (actor->watertop != INT32_MAX)
|
||||||
P_SpawnMobj(actor->x, actor->y, actor->watertop, MT_SPLISH);
|
P_SpawnMobj(actor->x, actor->y, actor->watertop, (actor->eflags & MFE_TOUCHLAVA) ? MT_LAVASPLISH : MT_SPLISH);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -13820,7 +13820,8 @@ void A_FallingLavaCheck(mobj_t *actor)
|
||||||
{
|
{
|
||||||
actor->flags = MF_NOGRAVITY|MF_NOCLIPTHING;
|
actor->flags = MF_NOGRAVITY|MF_NOCLIPTHING;
|
||||||
actor->momz = 0;
|
actor->momz = 0;
|
||||||
actor->z = actor->watertop;
|
if (actor->eflags & MFE_TOUCHWATER)
|
||||||
|
actor->z = (actor->eflags & MFE_VERTICALFLIP) ? actor->waterbottom : actor->watertop;
|
||||||
P_SetMobjState(actor, actor->info->deathstate);
|
P_SetMobjState(actor, actor->info->deathstate);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1778,6 +1778,7 @@ static mobj_t *SearchMarioNode(msecnode_t *node)
|
||||||
case MT_RAIN:
|
case MT_RAIN:
|
||||||
case MT_SNOWFLAKE:
|
case MT_SNOWFLAKE:
|
||||||
case MT_SPLISH:
|
case MT_SPLISH:
|
||||||
|
case MT_LAVASPLISH:
|
||||||
case MT_SMOKE:
|
case MT_SMOKE:
|
||||||
case MT_SMALLBUBBLE:
|
case MT_SMALLBUBBLE:
|
||||||
case MT_MEDIUMBUBBLE:
|
case MT_MEDIUMBUBBLE:
|
||||||
|
|
|
||||||
|
|
@ -888,6 +888,15 @@ static boolean PIT_CheckThing(mobj_t *thing)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (tmthing->type == MT_LAVAFALL_LAVA && (thing->type == MT_RING || thing->type == MT_REDTEAMRING || thing->type == MT_BLUETEAMRING || thing->type == MT_FLINGRING))
|
||||||
|
{
|
||||||
|
//height check
|
||||||
|
if (tmthing->z > thing->z + thing->height || thing->z > tmthing->z + tmthing->height || !(thing->health))
|
||||||
|
return true;
|
||||||
|
|
||||||
|
P_KillMobj(thing, tmthing, tmthing, DMG_FIRE);
|
||||||
|
}
|
||||||
|
|
||||||
if (tmthing->type == MT_MINECART)
|
if (tmthing->type == MT_MINECART)
|
||||||
{
|
{
|
||||||
//height check
|
//height check
|
||||||
|
|
|
||||||
70
src/p_mobj.c
70
src/p_mobj.c
|
|
@ -3318,7 +3318,7 @@ void P_MobjCheckWater(mobj_t *mobj)
|
||||||
mobj->watertop = mobj->waterbottom = mobj->z - 1000*FRACUNIT;
|
mobj->watertop = mobj->waterbottom = mobj->z - 1000*FRACUNIT;
|
||||||
|
|
||||||
// Reset water state.
|
// Reset water state.
|
||||||
mobj->eflags &= ~(MFE_UNDERWATER|MFE_TOUCHWATER|MFE_GOOWATER);
|
mobj->eflags &= ~(MFE_UNDERWATER|MFE_TOUCHWATER|MFE_GOOWATER|MFE_TOUCHLAVA);
|
||||||
|
|
||||||
for (rover = sector->ffloors; rover; rover = rover->next)
|
for (rover = sector->ffloors; rover; rover = rover->next)
|
||||||
{
|
{
|
||||||
|
|
@ -3359,16 +3359,18 @@ void P_MobjCheckWater(mobj_t *mobj)
|
||||||
// Just touching the water?
|
// Just touching the water?
|
||||||
if (((mobj->eflags & MFE_VERTICALFLIP) && thingtop - height < bottomheight)
|
if (((mobj->eflags & MFE_VERTICALFLIP) && thingtop - height < bottomheight)
|
||||||
|| (!(mobj->eflags & MFE_VERTICALFLIP) && mobj->z + height > topheight))
|
|| (!(mobj->eflags & MFE_VERTICALFLIP) && mobj->z + height > topheight))
|
||||||
{
|
|
||||||
mobj->eflags |= MFE_TOUCHWATER;
|
mobj->eflags |= MFE_TOUCHWATER;
|
||||||
if (rover->flags & FF_GOOWATER && !(mobj->flags & MF_NOGRAVITY))
|
|
||||||
mobj->eflags |= MFE_GOOWATER;
|
|
||||||
}
|
|
||||||
// Actually in the water?
|
// Actually in the water?
|
||||||
if (((mobj->eflags & MFE_VERTICALFLIP) && thingtop - (height>>1) > bottomheight)
|
if (((mobj->eflags & MFE_VERTICALFLIP) && thingtop - (height>>1) > bottomheight)
|
||||||
|| (!(mobj->eflags & MFE_VERTICALFLIP) && mobj->z + (height>>1) < topheight))
|
|| (!(mobj->eflags & MFE_VERTICALFLIP) && mobj->z + (height>>1) < topheight))
|
||||||
{
|
|
||||||
mobj->eflags |= MFE_UNDERWATER;
|
mobj->eflags |= MFE_UNDERWATER;
|
||||||
|
|
||||||
|
if (mobj->eflags & (MFE_TOUCHWATER|MFE_UNDERWATER))
|
||||||
|
{
|
||||||
|
if (GETSECSPECIAL(rover->master->frontsector->special, 1) == 3)
|
||||||
|
mobj->eflags |= MFE_TOUCHLAVA;
|
||||||
|
|
||||||
if (rover->flags & FF_GOOWATER && !(mobj->flags & MF_NOGRAVITY))
|
if (rover->flags & FF_GOOWATER && !(mobj->flags & MF_NOGRAVITY))
|
||||||
mobj->eflags |= MFE_GOOWATER;
|
mobj->eflags |= MFE_GOOWATER;
|
||||||
}
|
}
|
||||||
|
|
@ -3446,14 +3448,15 @@ void P_MobjCheckWater(mobj_t *mobj)
|
||||||
{
|
{
|
||||||
// Spawn a splash
|
// Spawn a splash
|
||||||
mobj_t *splish;
|
mobj_t *splish;
|
||||||
|
mobjtype_t splishtype = (mobj->eflags & MFE_TOUCHLAVA) ? MT_LAVASPLISH : MT_SPLISH;
|
||||||
if (mobj->eflags & MFE_VERTICALFLIP)
|
if (mobj->eflags & MFE_VERTICALFLIP)
|
||||||
{
|
{
|
||||||
splish = P_SpawnMobj(mobj->x, mobj->y, mobj->waterbottom-FixedMul(mobjinfo[MT_SPLISH].height, mobj->scale), MT_SPLISH);
|
splish = P_SpawnMobj(mobj->x, mobj->y, mobj->waterbottom-FixedMul(mobjinfo[splishtype].height, mobj->scale), splishtype);
|
||||||
splish->flags2 |= MF2_OBJECTFLIP;
|
splish->flags2 |= MF2_OBJECTFLIP;
|
||||||
splish->eflags |= MFE_VERTICALFLIP;
|
splish->eflags |= MFE_VERTICALFLIP;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
splish = P_SpawnMobj(mobj->x, mobj->y, mobj->watertop, MT_SPLISH);
|
splish = P_SpawnMobj(mobj->x, mobj->y, mobj->watertop, splishtype);
|
||||||
splish->destscale = mobj->scale;
|
splish->destscale = mobj->scale;
|
||||||
P_SetScale(splish, mobj->scale);
|
P_SetScale(splish, mobj->scale);
|
||||||
}
|
}
|
||||||
|
|
@ -3481,14 +3484,15 @@ void P_MobjCheckWater(mobj_t *mobj)
|
||||||
{
|
{
|
||||||
// Spawn a splash
|
// Spawn a splash
|
||||||
mobj_t *splish;
|
mobj_t *splish;
|
||||||
|
mobjtype_t splishtype = (mobj->eflags & MFE_TOUCHLAVA) ? MT_LAVASPLISH : MT_SPLISH;
|
||||||
if (mobj->eflags & MFE_VERTICALFLIP)
|
if (mobj->eflags & MFE_VERTICALFLIP)
|
||||||
{
|
{
|
||||||
splish = P_SpawnMobj(mobj->x, mobj->y, mobj->waterbottom-FixedMul(mobjinfo[MT_SPLISH].height, mobj->scale), MT_SPLISH);
|
splish = P_SpawnMobj(mobj->x, mobj->y, mobj->waterbottom-FixedMul(mobjinfo[splishtype].height, mobj->scale), splishtype);
|
||||||
splish->flags2 |= MF2_OBJECTFLIP;
|
splish->flags2 |= MF2_OBJECTFLIP;
|
||||||
splish->eflags |= MFE_VERTICALFLIP;
|
splish->eflags |= MFE_VERTICALFLIP;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
splish = P_SpawnMobj(mobj->x, mobj->y, mobj->watertop, MT_SPLISH);
|
splish = P_SpawnMobj(mobj->x, mobj->y, mobj->watertop, splishtype);
|
||||||
splish->destscale = mobj->scale;
|
splish->destscale = mobj->scale;
|
||||||
P_SetScale(splish, mobj->scale);
|
P_SetScale(splish, mobj->scale);
|
||||||
}
|
}
|
||||||
|
|
@ -3504,6 +3508,8 @@ void P_MobjCheckWater(mobj_t *mobj)
|
||||||
|
|
||||||
if (mobj->eflags & MFE_GOOWATER || wasingoo)
|
if (mobj->eflags & MFE_GOOWATER || wasingoo)
|
||||||
S_StartSound(mobj, sfx_ghit);
|
S_StartSound(mobj, sfx_ghit);
|
||||||
|
else if (mobj->eflags & MFE_TOUCHLAVA)
|
||||||
|
S_StartSound(mobj, sfx_splash);
|
||||||
else
|
else
|
||||||
S_StartSound(mobj, sfx_splish); // And make a sound!
|
S_StartSound(mobj, sfx_splish); // And make a sound!
|
||||||
|
|
||||||
|
|
@ -8828,13 +8834,13 @@ void P_MobjThinker(mobj_t *mobj)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MT_RING:
|
case MT_RING:
|
||||||
case MT_COIN:
|
|
||||||
case MT_REDTEAMRING:
|
case MT_REDTEAMRING:
|
||||||
case MT_BLUETEAMRING:
|
case MT_BLUETEAMRING:
|
||||||
P_KillRingsInLava(mobj);
|
P_KillRingsInLava(mobj);
|
||||||
if (P_MobjWasRemoved(mobj))
|
if (P_MobjWasRemoved(mobj))
|
||||||
return;
|
return;
|
||||||
/* FALLTHRU */
|
/* FALLTHRU */
|
||||||
|
case MT_COIN:
|
||||||
case MT_BLUESPHERE:
|
case MT_BLUESPHERE:
|
||||||
case MT_BOMBSPHERE:
|
case MT_BOMBSPHERE:
|
||||||
case MT_NIGHTSCHIP:
|
case MT_NIGHTSCHIP:
|
||||||
|
|
@ -8848,11 +8854,11 @@ void P_MobjThinker(mobj_t *mobj)
|
||||||
return;
|
return;
|
||||||
// Flung items
|
// Flung items
|
||||||
case MT_FLINGRING:
|
case MT_FLINGRING:
|
||||||
case MT_FLINGCOIN:
|
|
||||||
P_KillRingsInLava(mobj);
|
P_KillRingsInLava(mobj);
|
||||||
if (P_MobjWasRemoved(mobj))
|
if (P_MobjWasRemoved(mobj))
|
||||||
return;
|
return;
|
||||||
/* FALLTHRU */
|
/* FALLTHRU */
|
||||||
|
case MT_FLINGCOIN:
|
||||||
case MT_FLINGBLUESPHERE:
|
case MT_FLINGBLUESPHERE:
|
||||||
case MT_FLINGNIGHTSCHIP:
|
case MT_FLINGNIGHTSCHIP:
|
||||||
if (mobj->flags2 & MF2_NIGHTSPULL)
|
if (mobj->flags2 & MF2_NIGHTSPULL)
|
||||||
|
|
@ -9090,13 +9096,11 @@ void P_MobjThinker(mobj_t *mobj)
|
||||||
|
|
||||||
if (hdist < 1000*FRACUNIT)
|
if (hdist < 1000*FRACUNIT)
|
||||||
{
|
{
|
||||||
fixed_t dist = P_AproxDistance(hdist, mobj->target->z - mobj->z);
|
//Aim for player z position. If too close to floor/ceiling, aim just above/below them.
|
||||||
|
fixed_t destz = min(max(mobj->target->z, mobj->target->floorz + 70*FRACUNIT), mobj->target->ceilingz - 80*FRACUNIT - mobj->height);
|
||||||
|
fixed_t dist = P_AproxDistance(hdist, destz - mobj->z);
|
||||||
P_InstaThrust(mobj, R_PointToAngle2(mobj->x, mobj->y, mobj->target->x, mobj->target->y), 2*FRACUNIT);
|
P_InstaThrust(mobj, R_PointToAngle2(mobj->x, mobj->y, mobj->target->x, mobj->target->y), 2*FRACUNIT);
|
||||||
//aim for player z position; if too close to floor, aim just above them
|
mobj->momz = FixedMul(FixedDiv(destz - mobj->z, dist), 2*FRACUNIT);
|
||||||
if (mobj->z - mobj->floorz >= 80*FRACUNIT)
|
|
||||||
mobj->momz = FixedMul(FixedDiv(mobj->target->z - mobj->z, dist), 2*FRACUNIT);
|
|
||||||
else
|
|
||||||
mobj->momz = FixedMul(FixedDiv((mobj->target->z + 70*FRACUNIT) - mobj->z, dist), 2*FRACUNIT);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -9149,7 +9153,7 @@ void P_MobjThinker(mobj_t *mobj)
|
||||||
}
|
}
|
||||||
|
|
||||||
vdist = mobj->z - mobj->target->z - mobj->target->height;
|
vdist = mobj->z - mobj->target->z - mobj->target->height;
|
||||||
if (vdist <= 0)
|
if (P_MobjFlip(mobj)*vdist <= 0)
|
||||||
{
|
{
|
||||||
P_SetTarget(&mobj->target, NULL);
|
P_SetTarget(&mobj->target, NULL);
|
||||||
break;
|
break;
|
||||||
|
|
@ -10045,19 +10049,6 @@ mobj_t *P_SpawnMobj(fixed_t x, fixed_t y, fixed_t z, mobjtype_t type)
|
||||||
P_SetTarget(&mobj->tracer, P_SpawnMobjFromMobj(mobj, 0, 0, 0, MT_MINECARTENDSOLID));
|
P_SetTarget(&mobj->tracer, P_SpawnMobjFromMobj(mobj, 0, 0, 0, MT_MINECARTENDSOLID));
|
||||||
mobj->tracer->angle = mobj->angle + ANGLE_90;
|
mobj->tracer->angle = mobj->angle + ANGLE_90;
|
||||||
break;
|
break;
|
||||||
case MT_BIGFERN:
|
|
||||||
{
|
|
||||||
UINT8 i;
|
|
||||||
for (i = 0; i < 8; i++)
|
|
||||||
{
|
|
||||||
UINT8 j = (i + 2) % 8;
|
|
||||||
fixed_t xoffs = (j % 4) ? FRACUNIT : 0;
|
|
||||||
fixed_t yoffs = (i % 4) ? FRACUNIT : 0;
|
|
||||||
mobj_t *leaf = P_SpawnMobjFromMobj(mobj, (j > 3) ? -xoffs : xoffs, (i > 3) ? -yoffs : yoffs, 0, MT_BIGFERNLEAF);
|
|
||||||
leaf->angle = (angle_t)i * ANGLE_45;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case MT_TORCHFLOWER:
|
case MT_TORCHFLOWER:
|
||||||
{
|
{
|
||||||
mobj_t *fire = P_SpawnMobjFromMobj(mobj, 0, 0, 46*FRACUNIT, MT_FLAME);
|
mobj_t *fire = P_SpawnMobjFromMobj(mobj, 0, 0, 46*FRACUNIT, MT_FLAME);
|
||||||
|
|
@ -12097,6 +12088,21 @@ ML_EFFECT5 : Don't stop thinking when too far away
|
||||||
S_StartSound(mobj, sfx_s3kd3l);
|
S_StartSound(mobj, sfx_s3kd3l);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case MT_BIGFERN:
|
||||||
|
{
|
||||||
|
angle_t angle = FixedAngle(mthing->angle << FRACBITS);
|
||||||
|
UINT8 i;
|
||||||
|
for (i = 0; i < 8; i++)
|
||||||
|
{
|
||||||
|
angle_t fa = (angle >> ANGLETOFINESHIFT) & FINEMASK;
|
||||||
|
fixed_t xoffs = FINECOSINE(fa);
|
||||||
|
fixed_t yoffs = FINESINE(fa);
|
||||||
|
mobj_t *leaf = P_SpawnMobjFromMobj(mobj, xoffs, yoffs, 0, MT_BIGFERNLEAF);
|
||||||
|
leaf->angle = angle;
|
||||||
|
angle += ANGLE_45;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
10
src/p_mobj.h
10
src/p_mobj.h
|
|
@ -233,15 +233,17 @@ typedef enum
|
||||||
MFE_VERTICALFLIP = 1<<5,
|
MFE_VERTICALFLIP = 1<<5,
|
||||||
// Goo water
|
// Goo water
|
||||||
MFE_GOOWATER = 1<<6,
|
MFE_GOOWATER = 1<<6,
|
||||||
|
// The mobj is touching a lava block
|
||||||
|
MFE_TOUCHLAVA = 1<<7,
|
||||||
// Mobj was already pushed this tic
|
// Mobj was already pushed this tic
|
||||||
MFE_PUSHED = 1<<7,
|
MFE_PUSHED = 1<<8,
|
||||||
// Mobj was already sprung this tic
|
// Mobj was already sprung this tic
|
||||||
MFE_SPRUNG = 1<<8,
|
MFE_SPRUNG = 1<<9,
|
||||||
// Platform movement
|
// Platform movement
|
||||||
MFE_APPLYPMOMZ = 1<<9,
|
MFE_APPLYPMOMZ = 1<<10,
|
||||||
// Compute and trigger on mobj angle relative to tracer
|
// Compute and trigger on mobj angle relative to tracer
|
||||||
// See Linedef Exec 457 (Track mobj angle to point)
|
// See Linedef Exec 457 (Track mobj angle to point)
|
||||||
MFE_TRACERANGLE = 1<<10,
|
MFE_TRACERANGLE = 1<<11,
|
||||||
// free: to and including 1<<15
|
// free: to and including 1<<15
|
||||||
} mobjeflag_t;
|
} mobjeflag_t;
|
||||||
|
|
||||||
|
|
|
||||||
15
src/p_user.c
15
src/p_user.c
|
|
@ -7150,10 +7150,13 @@ static void P_NiGHTSMovement(player_t *player)
|
||||||
&& player->mo->z + player->mo->height - P_GetPlayerHeight(player) <= player->mo->waterbottom && player->mo->z + player->mo->height >= player->mo->waterbottom))
|
&& player->mo->z + player->mo->height - P_GetPlayerHeight(player) <= player->mo->waterbottom && player->mo->z + player->mo->height >= player->mo->waterbottom))
|
||||||
&& player->speed > 9000 && leveltime % (TICRATE/7) == 0 && !player->spectator)
|
&& player->speed > 9000 && leveltime % (TICRATE/7) == 0 && !player->spectator)
|
||||||
{
|
{
|
||||||
|
mobjtype_t splishtype = (player->mo->eflags & MFE_TOUCHLAVA) ? MT_LAVASPLISH : MT_SPLISH;
|
||||||
mobj_t *water = P_SpawnMobj(player->mo->x, player->mo->y,
|
mobj_t *water = P_SpawnMobj(player->mo->x, player->mo->y,
|
||||||
((player->mo->eflags & MFE_VERTICALFLIP) ? player->mo->waterbottom - FixedMul(mobjinfo[MT_SPLISH].height, player->mo->scale) : player->mo->watertop), MT_SPLISH);
|
((player->mo->eflags & MFE_VERTICALFLIP) ? player->mo->waterbottom - FixedMul(mobjinfo[splishtype].height, player->mo->scale) : player->mo->watertop), splishtype);
|
||||||
if (player->mo->eflags & MFE_GOOWATER)
|
if (player->mo->eflags & MFE_GOOWATER)
|
||||||
S_StartSound(water, sfx_ghit);
|
S_StartSound(water, sfx_ghit);
|
||||||
|
else if (player->mo->eflags & MFE_TOUCHLAVA)
|
||||||
|
S_StartSound(water, sfx_splash);
|
||||||
else
|
else
|
||||||
S_StartSound(water, sfx_wslap);
|
S_StartSound(water, sfx_wslap);
|
||||||
if (player->mo->eflags & MFE_VERTICALFLIP)
|
if (player->mo->eflags & MFE_VERTICALFLIP)
|
||||||
|
|
@ -7915,10 +7918,13 @@ static void P_MovePlayer(player_t *player)
|
||||||
&& (player->speed > runspd || (player->pflags & PF_STARTDASH))
|
&& (player->speed > runspd || (player->pflags & PF_STARTDASH))
|
||||||
&& leveltime % (TICRATE/7) == 0 && player->mo->momz == 0 && !(player->pflags & PF_SLIDING) && !player->spectator)
|
&& leveltime % (TICRATE/7) == 0 && player->mo->momz == 0 && !(player->pflags & PF_SLIDING) && !player->spectator)
|
||||||
{
|
{
|
||||||
|
mobjtype_t splishtype = (player->mo->eflags & MFE_TOUCHLAVA) ? MT_LAVASPLISH : MT_SPLISH;
|
||||||
mobj_t *water = P_SpawnMobj(player->mo->x - P_ReturnThrustX(NULL, player->mo->angle, player->mo->radius), player->mo->y - P_ReturnThrustY(NULL, player->mo->angle, player->mo->radius),
|
mobj_t *water = P_SpawnMobj(player->mo->x - P_ReturnThrustX(NULL, player->mo->angle, player->mo->radius), player->mo->y - P_ReturnThrustY(NULL, player->mo->angle, player->mo->radius),
|
||||||
((player->mo->eflags & MFE_VERTICALFLIP) ? player->mo->waterbottom - FixedMul(mobjinfo[MT_SPLISH].height, player->mo->scale) : player->mo->watertop), MT_SPLISH);
|
((player->mo->eflags & MFE_VERTICALFLIP) ? player->mo->waterbottom - FixedMul(mobjinfo[splishtype].height, player->mo->scale) : player->mo->watertop), splishtype);
|
||||||
if (player->mo->eflags & MFE_GOOWATER)
|
if (player->mo->eflags & MFE_GOOWATER)
|
||||||
S_StartSound(water, sfx_ghit);
|
S_StartSound(water, sfx_ghit);
|
||||||
|
else if (player->mo->eflags & MFE_TOUCHLAVA)
|
||||||
|
S_StartSound(water, sfx_splash);
|
||||||
else
|
else
|
||||||
S_StartSound(water, sfx_wslap);
|
S_StartSound(water, sfx_wslap);
|
||||||
if (player->mo->eflags & MFE_VERTICALFLIP)
|
if (player->mo->eflags & MFE_VERTICALFLIP)
|
||||||
|
|
@ -11173,6 +11179,7 @@ void P_PlayerThink(player_t *player)
|
||||||
/* FALLTHRU */
|
/* FALLTHRU */
|
||||||
case CR_MINECART:
|
case CR_MINECART:
|
||||||
case CR_GENERIC:
|
case CR_GENERIC:
|
||||||
|
case CR_PTERABYTE:
|
||||||
player->drawangle = player->mo->tracer->angle;
|
player->drawangle = player->mo->tracer->angle;
|
||||||
break;
|
break;
|
||||||
case CR_ROLLOUT:
|
case CR_ROLLOUT:
|
||||||
|
|
@ -11964,8 +11971,8 @@ void P_PlayerAfterThink(player_t *player)
|
||||||
if (P_AproxDistance(player->mo->x - ptera->x, player->mo->y - ptera->y) > player->mo->radius)
|
if (P_AproxDistance(player->mo->x - ptera->x, player->mo->y - ptera->y) > player->mo->radius)
|
||||||
goto dropoff;
|
goto dropoff;
|
||||||
|
|
||||||
if (player->mo->state-states != S_PLAY_RIDE)
|
if (player->mo->state-states != S_PLAY_FALL)
|
||||||
P_SetPlayerMobjState(player->mo, S_PLAY_RIDE);
|
P_SetPlayerMobjState(player->mo, S_PLAY_FALL);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
dropoff:
|
dropoff:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue