Fix the item box related crashes
Removed Magnet item box pulling code. It's a mess, hacky, doesn't really help in races, and breaks things. We will implement something new for it soon.
This commit is contained in:
parent
71c1a5b7e2
commit
07c7bc05c5
|
@ -7115,7 +7115,6 @@ static const char *const MOBJTYPE_LIST[] = { // array length left dynamic for s
|
||||||
"MT_INVISSPRING",
|
"MT_INVISSPRING",
|
||||||
"MT_BLUEDIAG",
|
"MT_BLUEDIAG",
|
||||||
"MT_RANDOMITEM",
|
"MT_RANDOMITEM",
|
||||||
"MT_FLINGRANDOMITEM",
|
|
||||||
"MT_RANDOMITEMPOP",
|
"MT_RANDOMITEMPOP",
|
||||||
|
|
||||||
"MT_MUSHROOMTRAIL",
|
"MT_MUSHROOMTRAIL",
|
||||||
|
|
37
src/info.c
37
src/info.c
|
@ -14252,7 +14252,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
||||||
1000, // spawnhealth
|
1000, // spawnhealth
|
||||||
S_NULL, // seestate
|
S_NULL, // seestate
|
||||||
sfx_None, // seesound
|
sfx_None, // seesound
|
||||||
MT_FLINGRANDOMITEM, // reactiontime
|
0, // reactiontime
|
||||||
sfx_None, // attacksound
|
sfx_None, // attacksound
|
||||||
S_NULL, // painstate
|
S_NULL, // painstate
|
||||||
0, // painchance
|
0, // painchance
|
||||||
|
@ -14267,48 +14267,21 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
||||||
36*FRACUNIT, // height
|
36*FRACUNIT, // height
|
||||||
0, // display offset
|
0, // display offset
|
||||||
100, // mass
|
100, // mass
|
||||||
0, // damage
|
MT_RANDOMITEMPOP, // damage
|
||||||
sfx_None, // activesound
|
sfx_None, // activesound
|
||||||
MF_SLIDEME|MF_SPECIAL|MF_NOGRAVITY|MF_NOCLIPHEIGHT, // flags
|
MF_SLIDEME|MF_SPECIAL|MF_NOGRAVITY|MF_NOCLIPHEIGHT, // flags
|
||||||
S_NULL // raisestate
|
S_NULL // raisestate
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // MT_FLINGRANDOMITEM
|
|
||||||
-1, // doomednum
|
|
||||||
S_RANDOMITEM1, // spawnstate
|
|
||||||
1000, // spawnhealth
|
|
||||||
S_NULL, // seestate
|
|
||||||
sfx_None, // seesound
|
|
||||||
MT_FLINGRANDOMITEM, // reactiontime
|
|
||||||
sfx_None, // attacksound
|
|
||||||
S_NULL, // painstate
|
|
||||||
MT_RANDOMITEM, // painchance
|
|
||||||
sfx_None, // painsound
|
|
||||||
S_NULL, // meleestate
|
|
||||||
S_NULL, // missilestate
|
|
||||||
S_DEADRANDOMITEM, // deathstate
|
|
||||||
S_NULL, // xdeathstate
|
|
||||||
sfx_pop, // deathsound
|
|
||||||
60*FRACUNIT, // speed
|
|
||||||
31*FRACUNIT, // radius
|
|
||||||
16*FRACUNIT, // height
|
|
||||||
0, // display offset
|
|
||||||
100, // mass
|
|
||||||
0, // damage
|
|
||||||
sfx_None, // activesound
|
|
||||||
MF_SLIDEME|MF_SPECIAL, // flags
|
|
||||||
S_NULL // raisestate
|
|
||||||
},
|
|
||||||
|
|
||||||
{ // MT_RANDOMITEMPOP
|
{ // MT_RANDOMITEMPOP
|
||||||
-1, // doomednum
|
-1, // doomednum
|
||||||
S_SPRK1, // spawnstate
|
S_INVISIBLE, // spawnstate
|
||||||
1, // spawnhealth
|
1, // spawnhealth
|
||||||
S_NULL, // seestate
|
S_NULL, // seestate
|
||||||
sfx_None, // seesound
|
sfx_None, // seesound
|
||||||
0, // reactiontime
|
0, // reactiontime
|
||||||
sfx_None, // attacksound
|
sfx_None, // attacksound
|
||||||
S_SPRK1, // painstate
|
S_NULL, // painstate
|
||||||
0, // painchance
|
0, // painchance
|
||||||
sfx_None, // painsound
|
sfx_None, // painsound
|
||||||
S_NULL, // meleestate
|
S_NULL, // meleestate
|
||||||
|
@ -14320,7 +14293,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
||||||
16*FRACUNIT, // radius
|
16*FRACUNIT, // radius
|
||||||
32*FRACUNIT, // height
|
32*FRACUNIT, // height
|
||||||
0, // display offset
|
0, // display offset
|
||||||
100, // mass
|
MT_SPARK, // mass
|
||||||
0, // damage
|
0, // damage
|
||||||
sfx_None, // activesound
|
sfx_None, // activesound
|
||||||
MF_NOCLIP, // flags
|
MF_NOCLIP, // flags
|
||||||
|
|
|
@ -3964,7 +3964,6 @@ typedef enum mobj_type
|
||||||
MT_INVISSPRING,
|
MT_INVISSPRING,
|
||||||
MT_BLUEDIAG,
|
MT_BLUEDIAG,
|
||||||
MT_RANDOMITEM,
|
MT_RANDOMITEM,
|
||||||
MT_FLINGRANDOMITEM,
|
|
||||||
MT_RANDOMITEMPOP,
|
MT_RANDOMITEMPOP,
|
||||||
|
|
||||||
MT_MUSHROOMTRAIL,
|
MT_MUSHROOMTRAIL,
|
||||||
|
|
|
@ -740,8 +740,7 @@ static boolean P_LookForShield(mobj_t *actor)
|
||||||
(actor->type == MT_BLUETEAMRING && player->ctfteam != 2))
|
(actor->type == MT_BLUETEAMRING && player->ctfteam != 2))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// SRB2kart - magnet item
|
if ((player->powers[pw_shield] & SH_NOSTACK) == SH_ATTRACT
|
||||||
if (player->kartstuff[k_magnettimer] //(player->powers[pw_shield] & SH_NOSTACK) == SH_ATTRACT
|
|
||||||
&& (P_AproxDistance(P_AproxDistance(actor->x-player->mo->x, actor->y-player->mo->y), actor->z-player->mo->z) < FixedMul(RING_DIST/4, player->mo->scale)))
|
&& (P_AproxDistance(P_AproxDistance(actor->x-player->mo->x, actor->y-player->mo->y), actor->z-player->mo->z) < FixedMul(RING_DIST/4, player->mo->scale)))
|
||||||
{
|
{
|
||||||
P_SetTarget(&actor->tracer, player->mo);
|
P_SetTarget(&actor->tracer, player->mo);
|
||||||
|
@ -3613,7 +3612,7 @@ void A_AttractChase(mobj_t *actor)
|
||||||
|
|
||||||
// Turn flingrings back into regular rings if attracted.
|
// Turn flingrings back into regular rings if attracted.
|
||||||
if (actor->tracer && actor->tracer->player
|
if (actor->tracer && actor->tracer->player
|
||||||
&& actor->tracer->player->kartstuff[k_magnettimer] //&& (actor->tracer->player->powers[pw_shield] & SH_NOSTACK) != SH_ATTRACT
|
&& (actor->tracer->player->powers[pw_shield] & SH_NOSTACK) != SH_ATTRACT
|
||||||
&& actor->info->reactiontime && actor->type != (mobjtype_t)actor->info->reactiontime)
|
&& actor->info->reactiontime && actor->type != (mobjtype_t)actor->info->reactiontime)
|
||||||
{
|
{
|
||||||
mobj_t *newring;
|
mobj_t *newring;
|
||||||
|
@ -3627,9 +3626,7 @@ void A_AttractChase(mobj_t *actor)
|
||||||
|
|
||||||
P_LookForShield(actor); // Go find 'em, boy!
|
P_LookForShield(actor); // Go find 'em, boy!
|
||||||
|
|
||||||
if (actor->tracer && actor->tracer->player && actor->tracer->player->kartstuff[k_comebackmode] == 1)
|
if (!actor->tracer
|
||||||
;
|
|
||||||
else if (!actor->tracer
|
|
||||||
|| !actor->tracer->player
|
|| !actor->tracer->player
|
||||||
|| !actor->tracer->health
|
|| !actor->tracer->health
|
||||||
|| !P_CheckSight(actor, actor->tracer)) // You have to be able to SEE it...sorta
|
|| !P_CheckSight(actor, actor->tracer)) // You have to be able to SEE it...sorta
|
||||||
|
@ -8094,6 +8091,7 @@ void A_ToggleFlameJet(mobj_t* actor)
|
||||||
void A_ItemPop(mobj_t *actor)
|
void A_ItemPop(mobj_t *actor)
|
||||||
{
|
{
|
||||||
mobj_t *remains;
|
mobj_t *remains;
|
||||||
|
mobjtype_t explode;
|
||||||
#ifdef HAVE_BLUA
|
#ifdef HAVE_BLUA
|
||||||
if (LUA_CallAction("A_ItemPop", actor))
|
if (LUA_CallAction("A_ItemPop", actor))
|
||||||
return;
|
return;
|
||||||
|
@ -8107,12 +8105,24 @@ void A_ItemPop(mobj_t *actor)
|
||||||
}
|
}
|
||||||
|
|
||||||
// de-solidify
|
// de-solidify
|
||||||
//P_UnsetThingPosition(actor);
|
P_UnsetThingPosition(actor);
|
||||||
//actor->flags &= ~MF_SOLID;
|
actor->flags &= ~MF_SOLID;
|
||||||
//actor->flags |= MF_NOCLIP;
|
actor->flags |= MF_NOCLIP;
|
||||||
//P_SetThingPosition(actor);
|
P_SetThingPosition(actor);
|
||||||
|
|
||||||
remains = P_SpawnMobj(actor->x, actor->y, actor->z, MT_RANDOMITEMPOP);
|
// item explosion
|
||||||
|
explode = mobjinfo[actor->info->damage].mass;
|
||||||
|
remains = P_SpawnMobj(actor->x, actor->y,
|
||||||
|
((actor->eflags & MFE_VERTICALFLIP) ? (actor->z + 3*(actor->height/4) - FixedMul(mobjinfo[explode].height, actor->scale)) : (actor->z + actor->height/4)), explode);
|
||||||
|
if (actor->eflags & MFE_VERTICALFLIP)
|
||||||
|
{
|
||||||
|
remains->eflags |= MFE_VERTICALFLIP;
|
||||||
|
remains->flags2 |= MF2_OBJECTFLIP;
|
||||||
|
}
|
||||||
|
remains->destscale = actor->destscale;
|
||||||
|
P_SetScale(remains, actor->scale);
|
||||||
|
|
||||||
|
remains = P_SpawnMobj(actor->x, actor->y, actor->z, actor->info->damage);
|
||||||
remains->type = actor->type; // Transfer type information
|
remains->type = actor->type; // Transfer type information
|
||||||
P_UnsetThingPosition(remains);
|
P_UnsetThingPosition(remains);
|
||||||
if (sector_list)
|
if (sector_list)
|
||||||
|
@ -8120,25 +8130,21 @@ void A_ItemPop(mobj_t *actor)
|
||||||
P_DelSeclist(sector_list);
|
P_DelSeclist(sector_list);
|
||||||
sector_list = NULL;
|
sector_list = NULL;
|
||||||
}
|
}
|
||||||
remains->flags = actor->flags; // Transfer flags
|
|
||||||
P_SetThingPosition(remains);
|
P_SetThingPosition(remains);
|
||||||
|
remains->destscale = actor->destscale;
|
||||||
|
P_SetScale(remains, actor->scale);
|
||||||
|
remains->flags = actor->flags; // Transfer flags
|
||||||
remains->flags2 = actor->flags2; // Transfer flags2
|
remains->flags2 = actor->flags2; // Transfer flags2
|
||||||
remains->fuse = actor->fuse; // Transfer respawn timer
|
remains->fuse = actor->fuse; // Transfer respawn timer
|
||||||
remains->threshold = 68;
|
remains->threshold = 68;
|
||||||
remains->skin = NULL;
|
remains->skin = NULL;
|
||||||
|
remains->spawnpoint = actor->spawnpoint;
|
||||||
|
|
||||||
actor->flags2 |= MF2_BOSSNOTRAP; // Dummy flag to mark this as an exploded TV until it respawns
|
P_SetTarget(&tmthing, remains);
|
||||||
tmthing = remains;
|
|
||||||
|
|
||||||
if (actor->info->deathsound)
|
if (actor->info->deathsound)
|
||||||
S_StartSound(remains, actor->info->deathsound);
|
S_StartSound(remains, actor->info->deathsound);
|
||||||
|
|
||||||
if (actor->type != MT_RANDOMITEM)
|
|
||||||
{
|
|
||||||
P_RemoveMobj(actor);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
actor->target->player->kartstuff[k_itemroulette] = 1;
|
actor->target->player->kartstuff[k_itemroulette] = 1;
|
||||||
|
|
||||||
remains->flags2 &= ~MF2_AMBUSH;
|
remains->flags2 &= ~MF2_AMBUSH;
|
||||||
|
|
|
@ -1787,7 +1787,7 @@ static mobj_t *SearchMarioNode(msecnode_t *node)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// Ignore popped monitors, too.
|
// Ignore popped monitors, too.
|
||||||
if (node->m_thing->flags & MF_MONITOR
|
if (node->m_thing->flags & MF_MONITOR || node->m_thing->type == MT_RANDOMITEM
|
||||||
&& node->m_thing->threshold == 68)
|
&& node->m_thing->threshold == 68)
|
||||||
continue;
|
continue;
|
||||||
// Okay, we found something valid.
|
// Okay, we found something valid.
|
||||||
|
|
|
@ -161,9 +161,6 @@ boolean P_CanPickupItem(player_t *player, boolean weapon)
|
||||||
if (G_BattleGametype() && player->kartstuff[k_balloon] <= 0) // No balloons in Match
|
if (G_BattleGametype() && player->kartstuff[k_balloon] <= 0) // No balloons in Match
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (player->kartstuff[k_magnettimer]) // You should probably collect stuff when you're attracting it :V
|
|
||||||
return true;
|
|
||||||
|
|
||||||
if (player->kartstuff[k_bootaketimer] || player->kartstuff[k_boostolentimer]
|
if (player->kartstuff[k_bootaketimer] || player->kartstuff[k_boostolentimer]
|
||||||
|| player->kartstuff[k_growshrinktimer] > 1 || player->kartstuff[k_goldshroomtimer]) // Item-specific timer going off
|
|| player->kartstuff[k_growshrinktimer] > 1 || player->kartstuff[k_goldshroomtimer]) // Item-specific timer going off
|
||||||
return false;
|
return false;
|
||||||
|
@ -417,7 +414,6 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
||||||
switch (special->type)
|
switch (special->type)
|
||||||
{
|
{
|
||||||
case MT_RANDOMITEM: // SRB2kart
|
case MT_RANDOMITEM: // SRB2kart
|
||||||
case MT_FLINGRANDOMITEM:
|
|
||||||
if (G_BattleGametype() && player->kartstuff[k_balloon] <= 0)
|
if (G_BattleGametype() && player->kartstuff[k_balloon] <= 0)
|
||||||
{
|
{
|
||||||
if (player->kartstuff[k_comebackmode] == 0 && !player->kartstuff[k_comebacktimer])
|
if (player->kartstuff[k_comebackmode] == 0 && !player->kartstuff[k_comebacktimer])
|
||||||
|
@ -450,7 +446,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
||||||
|
|
||||||
special->momx = special->momy = special->momz = 0;
|
special->momx = special->momy = special->momz = 0;
|
||||||
P_SetTarget(&special->target, toucher);
|
P_SetTarget(&special->target, toucher);
|
||||||
P_SetMobjState(special, special->info->deathstate);
|
P_KillMobj(special, toucher, toucher);
|
||||||
break;
|
break;
|
||||||
// ***************************************** //
|
// ***************************************** //
|
||||||
// Rings, coins, spheres, weapon panels, etc //
|
// Rings, coins, spheres, weapon panels, etc //
|
||||||
|
@ -2128,7 +2124,7 @@ void P_KillMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source)
|
||||||
// if killed by a player
|
// if killed by a player
|
||||||
if (source && source->player)
|
if (source && source->player)
|
||||||
{
|
{
|
||||||
if (target->flags & MF_MONITOR)
|
if (target->flags & MF_MONITOR || target->type == MT_RANDOMITEM)
|
||||||
{
|
{
|
||||||
P_SetTarget(&target->target, source);
|
P_SetTarget(&target->target, source);
|
||||||
source->player->numboxes++;
|
source->player->numboxes++;
|
||||||
|
|
29
src/p_mobj.c
29
src/p_mobj.c
|
@ -1371,7 +1371,6 @@ fixed_t P_GetMobjGravity(mobj_t *mo)
|
||||||
{
|
{
|
||||||
case MT_FLINGRING:
|
case MT_FLINGRING:
|
||||||
case MT_FLINGCOIN:
|
case MT_FLINGCOIN:
|
||||||
case MT_FLINGRANDOMITEM: // SRB2kart
|
|
||||||
case MT_FLINGEMERALD:
|
case MT_FLINGEMERALD:
|
||||||
case MT_BOUNCERING:
|
case MT_BOUNCERING:
|
||||||
case MT_RAILRING:
|
case MT_RAILRING:
|
||||||
|
@ -2357,7 +2356,6 @@ static boolean P_ZMovement(mobj_t *mo)
|
||||||
case MT_BLUETEAMRING:
|
case MT_BLUETEAMRING:
|
||||||
case MT_FLINGRING:
|
case MT_FLINGRING:
|
||||||
case MT_FLINGCOIN:
|
case MT_FLINGCOIN:
|
||||||
case MT_FLINGRANDOMITEM:
|
|
||||||
case MT_FLINGEMERALD:
|
case MT_FLINGEMERALD:
|
||||||
// Remove flinged stuff from death pits.
|
// Remove flinged stuff from death pits.
|
||||||
if (P_CheckDeathPitCollide(mo))
|
if (P_CheckDeathPitCollide(mo))
|
||||||
|
@ -2550,7 +2548,6 @@ static boolean P_ZMovement(mobj_t *mo)
|
||||||
// Flingrings bounce
|
// Flingrings bounce
|
||||||
if (mo->type == MT_FLINGRING
|
if (mo->type == MT_FLINGRING
|
||||||
|| mo->type == MT_FLINGCOIN
|
|| mo->type == MT_FLINGCOIN
|
||||||
|| mo->type == MT_FLINGRANDOMITEM
|
|
||||||
|| P_WeaponOrPanel(mo->type)
|
|| P_WeaponOrPanel(mo->type)
|
||||||
|| mo->type == MT_FLINGEMERALD
|
|| mo->type == MT_FLINGEMERALD
|
||||||
|| mo->type == MT_BIGTUMBLEWEED
|
|| mo->type == MT_BIGTUMBLEWEED
|
||||||
|
@ -5968,9 +5965,6 @@ void P_Attract(mobj_t *source, mobj_t *dest, boolean nightsgrab) // Home in on y
|
||||||
fixed_t ty = dest->y;
|
fixed_t ty = dest->y;
|
||||||
fixed_t tz = dest->z + (dest->height/2); // Aim for center
|
fixed_t tz = dest->z + (dest->height/2); // Aim for center
|
||||||
|
|
||||||
if (source->type == MT_RANDOMITEM || source->type == MT_FLINGRANDOMITEM) // SRB2kart - item boxes are sorta tall
|
|
||||||
tz = dest->z;
|
|
||||||
|
|
||||||
if (!dest || dest->health <= 0 || !dest->player || !source->tracer)
|
if (!dest || dest->health <= 0 || !dest->player || !source->tracer)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -7696,7 +7690,6 @@ void P_MobjThinker(mobj_t *mobj)
|
||||||
case MT_BLUEBALL:
|
case MT_BLUEBALL:
|
||||||
case MT_REDTEAMRING:
|
case MT_REDTEAMRING:
|
||||||
case MT_BLUETEAMRING:
|
case MT_BLUETEAMRING:
|
||||||
case MT_RANDOMITEM:
|
|
||||||
// No need to check water. Who cares?
|
// No need to check water. Who cares?
|
||||||
P_RingThinker(mobj);
|
P_RingThinker(mobj);
|
||||||
if (mobj->flags2 & MF2_NIGHTSPULL)
|
if (mobj->flags2 & MF2_NIGHTSPULL)
|
||||||
|
@ -7707,7 +7700,6 @@ void P_MobjThinker(mobj_t *mobj)
|
||||||
// Flung items
|
// Flung items
|
||||||
case MT_FLINGRING:
|
case MT_FLINGRING:
|
||||||
case MT_FLINGCOIN:
|
case MT_FLINGCOIN:
|
||||||
case MT_FLINGRANDOMITEM:
|
|
||||||
if (mobj->flags2 & MF2_NIGHTSPULL)
|
if (mobj->flags2 & MF2_NIGHTSPULL)
|
||||||
P_NightsItemChase(mobj);
|
P_NightsItemChase(mobj);
|
||||||
else
|
else
|
||||||
|
@ -8239,6 +8231,20 @@ for (i = ((mobj->flags2 & MF2_STRONGBOX) ? strongboxamt : weakboxamt); i; --i) s
|
||||||
}
|
}
|
||||||
P_RemoveMobj(mobj); // make sure they disappear
|
P_RemoveMobj(mobj); // make sure they disappear
|
||||||
return;
|
return;
|
||||||
|
case MT_RANDOMITEM:
|
||||||
|
// Respawn from mapthing if you have one!
|
||||||
|
if (mobj->spawnpoint)
|
||||||
|
{
|
||||||
|
P_SpawnMapThing(mobj->spawnpoint);
|
||||||
|
newmobj = mobj->spawnpoint->mobj; // this is set to the new mobj in P_SpawnMapThing
|
||||||
|
}
|
||||||
|
else
|
||||||
|
newmobj = P_SpawnMobj(mobj->x, mobj->y, mobj->z, mobj->type);
|
||||||
|
|
||||||
|
// Transfer flags2 (strongbox, objectflip)
|
||||||
|
newmobj->flags2 = mobj->flags2;
|
||||||
|
P_RemoveMobj(mobj); // make sure they disappear
|
||||||
|
return;
|
||||||
case MT_METALSONIC_BATTLE:
|
case MT_METALSONIC_BATTLE:
|
||||||
break; // don't remove
|
break; // don't remove
|
||||||
case MT_SPIKE:
|
case MT_SPIKE:
|
||||||
|
@ -8293,7 +8299,6 @@ for (i = ((mobj->flags2 & MF2_STRONGBOX) ? strongboxamt : weakboxamt); i; --i) s
|
||||||
#ifdef ESLOPE // Sliding physics for slidey mobjs!
|
#ifdef ESLOPE // Sliding physics for slidey mobjs!
|
||||||
if (mobj->type == MT_FLINGRING
|
if (mobj->type == MT_FLINGRING
|
||||||
|| mobj->type == MT_FLINGCOIN
|
|| mobj->type == MT_FLINGCOIN
|
||||||
|| mobj->type == MT_FLINGRANDOMITEM
|
|
||||||
|| P_WeaponOrPanel(mobj->type)
|
|| P_WeaponOrPanel(mobj->type)
|
||||||
|| mobj->type == MT_FLINGEMERALD
|
|| mobj->type == MT_FLINGEMERALD
|
||||||
|| mobj->type == MT_BIGTUMBLEWEED
|
|| mobj->type == MT_BIGTUMBLEWEED
|
||||||
|
@ -8985,7 +8990,6 @@ void P_RemoveMobj(mobj_t *mobj)
|
||||||
if (mobj->spawnpoint &&
|
if (mobj->spawnpoint &&
|
||||||
(mobj->type == MT_RING
|
(mobj->type == MT_RING
|
||||||
|| mobj->type == MT_COIN
|
|| mobj->type == MT_COIN
|
||||||
|| mobj->type == MT_RANDOMITEM
|
|
||||||
|| mobj->type == MT_BLUEBALL
|
|| mobj->type == MT_BLUEBALL
|
||||||
|| mobj->type == MT_REDTEAMRING
|
|| mobj->type == MT_REDTEAMRING
|
||||||
|| mobj->type == MT_BLUETEAMRING
|
|| mobj->type == MT_BLUETEAMRING
|
||||||
|
@ -10963,7 +10967,7 @@ void P_SpawnHoopsAndRings(mapthing_t *mthing)
|
||||||
mthing->mobj = mobj;
|
mthing->mobj = mobj;
|
||||||
}
|
}
|
||||||
// All manners of rings and coins
|
// All manners of rings and coins
|
||||||
else if (mthing->type == mobjinfo[MT_RING].doomednum || mthing->type == mobjinfo[MT_COIN].doomednum || mthing->type == mobjinfo[MT_RANDOMITEM].doomednum ||
|
else if (mthing->type == mobjinfo[MT_RING].doomednum || mthing->type == mobjinfo[MT_COIN].doomednum ||
|
||||||
mthing->type == mobjinfo[MT_REDTEAMRING].doomednum || mthing->type == mobjinfo[MT_BLUETEAMRING].doomednum)
|
mthing->type == mobjinfo[MT_REDTEAMRING].doomednum || mthing->type == mobjinfo[MT_BLUETEAMRING].doomednum)
|
||||||
{
|
{
|
||||||
mobjtype_t ringthing = MT_RING;
|
mobjtype_t ringthing = MT_RING;
|
||||||
|
@ -10984,9 +10988,6 @@ void P_SpawnHoopsAndRings(mapthing_t *mthing)
|
||||||
case 309: // No team rings in non-CTF
|
case 309: // No team rings in non-CTF
|
||||||
ringthing = (gametype == GT_CTF) ? MT_BLUETEAMRING : MT_RING;
|
ringthing = (gametype == GT_CTF) ? MT_BLUETEAMRING : MT_RING;
|
||||||
break;
|
break;
|
||||||
case 2000: // SRB2kart
|
|
||||||
ringthing = MT_RANDOMITEM;
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
// Spawn rings as blue spheres in special stages, ala S3+K.
|
// Spawn rings as blue spheres in special stages, ala S3+K.
|
||||||
if (G_IsSpecialStage(gamemap) && useNightsSS)
|
if (G_IsSpecialStage(gamemap) && useNightsSS)
|
||||||
|
|
|
@ -827,7 +827,7 @@ void P_ReloadRings(void)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (!(mo->type == MT_RING || mo->type == MT_NIGHTSWING || mo->type == MT_COIN
|
if (!(mo->type == MT_RING || mo->type == MT_NIGHTSWING || mo->type == MT_COIN
|
||||||
|| mo->type == MT_BLUEBALL || mo->type == MT_RANDOMITEM))
|
|| mo->type == MT_BLUEBALL))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// Don't auto-disintegrate things being pulled to us
|
// Don't auto-disintegrate things being pulled to us
|
||||||
|
|
|
@ -9444,7 +9444,7 @@ void P_PlayerThink(player_t *player)
|
||||||
mo2 = (mobj_t *)th;
|
mo2 = (mobj_t *)th;
|
||||||
|
|
||||||
if (!(mo2->type == MT_NIGHTSWING || mo2->type == MT_RING || mo2->type == MT_COIN
|
if (!(mo2->type == MT_NIGHTSWING || mo2->type == MT_RING || mo2->type == MT_COIN
|
||||||
|| mo2->type == MT_BLUEBALL || mo2->type == MT_RANDOMITEM))
|
|| mo2->type == MT_BLUEBALL))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (P_AproxDistance(P_AproxDistance(mo2->x - x, mo2->y - y), mo2->z - z) > FixedMul(128*FRACUNIT, player->mo->scale))
|
if (P_AproxDistance(P_AproxDistance(mo2->x - x, mo2->y - y), mo2->z - z) > FixedMul(128*FRACUNIT, player->mo->scale))
|
||||||
|
|
Loading…
Reference in a new issue