mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-05-10 19:01:50 +00:00
Merge branch 'public_next' of http://git.magicalgirl.moe/STJr/SRB2Internal
This commit is contained in:
commit
317161221d
16 changed files with 79 additions and 170 deletions
|
|
@ -23,7 +23,7 @@ addons:
|
||||||
- p7zip-full
|
- p7zip-full
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
- mkdir $HOME/srb2_cache
|
- mkdir -p $HOME/srb2_cache
|
||||||
- wget --verbose --server-response -c http://rosenthalcastle.org/srb2/SRB2-v2114-assets.7z -O $HOME/srb2_cache/SRB2-v2114-assets.7z
|
- wget --verbose --server-response -c http://rosenthalcastle.org/srb2/SRB2-v2114-assets.7z -O $HOME/srb2_cache/SRB2-v2114-assets.7z
|
||||||
- 7z x $HOME/srb2_cache/SRB2-v2114-assets.7z -oassets
|
- 7z x $HOME/srb2_cache/SRB2-v2114-assets.7z -oassets
|
||||||
- mkdir build
|
- mkdir build
|
||||||
|
|
|
||||||
|
|
@ -6227,9 +6227,7 @@ static const char *const MOBJTYPE_LIST[] = { // array length left dynamic for s
|
||||||
// Collectible Items
|
// Collectible Items
|
||||||
"MT_RING",
|
"MT_RING",
|
||||||
"MT_FLINGRING", // Lost ring
|
"MT_FLINGRING", // Lost ring
|
||||||
#ifdef BLUE_SPHERES
|
|
||||||
"MT_BLUEBALL", // Blue sphere replacement for special stages
|
"MT_BLUEBALL", // Blue sphere replacement for special stages
|
||||||
#endif
|
|
||||||
"MT_REDTEAMRING", //Rings collectable by red team.
|
"MT_REDTEAMRING", //Rings collectable by red team.
|
||||||
"MT_BLUETEAMRING", //Rings collectable by blue team.
|
"MT_BLUETEAMRING", //Rings collectable by blue team.
|
||||||
"MT_EMMY", // emerald token for special stage
|
"MT_EMMY", // emerald token for special stage
|
||||||
|
|
@ -6682,6 +6680,7 @@ static const char *const MOBJFLAG2_LIST[] = {
|
||||||
"EXPLOSION", // Thrown ring has explosive properties
|
"EXPLOSION", // Thrown ring has explosive properties
|
||||||
"SCATTER", // Thrown ring has scatter properties
|
"SCATTER", // Thrown ring has scatter properties
|
||||||
"BEYONDTHEGRAVE",// Source of this missile has died and has since respawned.
|
"BEYONDTHEGRAVE",// Source of this missile has died and has since respawned.
|
||||||
|
"PUSHED", // Mobj was already pushed this tic
|
||||||
"SLIDEPUSH", // MF_PUSHABLE that pushes continuously.
|
"SLIDEPUSH", // MF_PUSHABLE that pushes continuously.
|
||||||
"CLASSICPUSH", // Drops straight down when object has negative Z.
|
"CLASSICPUSH", // Drops straight down when object has negative Z.
|
||||||
"STANDONME", // While not pushable, stand on me anyway.
|
"STANDONME", // While not pushable, stand on me anyway.
|
||||||
|
|
@ -6710,7 +6709,6 @@ static const char *const MOBJEFLAG_LIST[] = {
|
||||||
"JUSTSTEPPEDDOWN", // used for ramp sectors
|
"JUSTSTEPPEDDOWN", // used for ramp sectors
|
||||||
"VERTICALFLIP", // Vertically flip sprite/allow upside-down physics
|
"VERTICALFLIP", // Vertically flip sprite/allow upside-down physics
|
||||||
"GOOWATER", // Goo water
|
"GOOWATER", // Goo water
|
||||||
"PUSHED", // Mobj was already pushed this tic
|
|
||||||
"SPRUNG", // Mobj was already sprung this tic
|
"SPRUNG", // Mobj was already sprung this tic
|
||||||
"APPLYPMOMZ", // Platform movement
|
"APPLYPMOMZ", // Platform movement
|
||||||
NULL
|
NULL
|
||||||
|
|
|
||||||
|
|
@ -431,9 +431,6 @@ extern const char *compdate, *comptime, *comprevision, *compbranch;
|
||||||
/// \note obsoleted by cv_maxportals
|
/// \note obsoleted by cv_maxportals
|
||||||
//#define PORTAL_LIMIT 8
|
//#define PORTAL_LIMIT 8
|
||||||
|
|
||||||
/// Fun experimental slope stuff!
|
|
||||||
//#define SLOPENESS
|
|
||||||
|
|
||||||
/// Kalaron/Eternity Engine slope code (SRB2CB ported)
|
/// Kalaron/Eternity Engine slope code (SRB2CB ported)
|
||||||
#define ESLOPE
|
#define ESLOPE
|
||||||
|
|
||||||
|
|
@ -453,10 +450,6 @@ extern const char *compdate, *comptime, *comprevision, *compbranch;
|
||||||
/// Polyobject fake flat code
|
/// Polyobject fake flat code
|
||||||
#define POLYOBJECTS_PLANES
|
#define POLYOBJECTS_PLANES
|
||||||
|
|
||||||
/// Blue spheres for future use.
|
|
||||||
/// \todo Remove this define.
|
|
||||||
#define BLUE_SPHERES // Blue spheres for future use.
|
|
||||||
|
|
||||||
/// Improved way of dealing with ping values and a ping limit.
|
/// Improved way of dealing with ping values and a ping limit.
|
||||||
#define NEWPING
|
#define NEWPING
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -36,9 +36,7 @@ typedef struct
|
||||||
{
|
{
|
||||||
float x;
|
float x;
|
||||||
float y;
|
float y;
|
||||||
//#ifdef SLOPENESS
|
|
||||||
float z;
|
float z;
|
||||||
//#endif
|
|
||||||
} polyvertex_t;
|
} polyvertex_t;
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
|
|
|
||||||
|
|
@ -539,6 +539,8 @@ static void HWR_RenderPlane(sector_t *sector, extrasubsector_t *xsub, fixed_t fi
|
||||||
static FOutVector *planeVerts = NULL;
|
static FOutVector *planeVerts = NULL;
|
||||||
static UINT16 numAllocedPlaneVerts = 0;
|
static UINT16 numAllocedPlaneVerts = 0;
|
||||||
|
|
||||||
|
(void)sector;
|
||||||
|
|
||||||
// no convex poly were generated for this subsector
|
// no convex poly were generated for this subsector
|
||||||
if (!xsub->planepoly)
|
if (!xsub->planepoly)
|
||||||
return;
|
return;
|
||||||
|
|
@ -678,25 +680,6 @@ static void HWR_RenderPlane(sector_t *sector, extrasubsector_t *xsub, fixed_t fi
|
||||||
v3d->x = pv->x;
|
v3d->x = pv->x;
|
||||||
v3d->y = height;
|
v3d->y = height;
|
||||||
v3d->z = pv->y;
|
v3d->z = pv->y;
|
||||||
#ifdef SLOPENESS
|
|
||||||
if (sector && sector->special == 65535)
|
|
||||||
{
|
|
||||||
size_t q;
|
|
||||||
for (q = 0; q < sector->linecount; q++)
|
|
||||||
{
|
|
||||||
if (v3d->x == sector->lines[q]->v1->x>>FRACBITS)
|
|
||||||
{
|
|
||||||
if (v3d->z == sector->lines[q]->v1->y>>FRACBITS)
|
|
||||||
{
|
|
||||||
v3d->y += sector->lines[q]->v1->z>>FRACBITS;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
(void)sector;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// only useful for flat coloured triangles
|
// only useful for flat coloured triangles
|
||||||
|
|
|
||||||
|
|
@ -4612,7 +4612,6 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
||||||
S_NULL // raisestate
|
S_NULL // raisestate
|
||||||
},
|
},
|
||||||
|
|
||||||
#ifdef BLUE_SPHERES
|
|
||||||
{ // MT_BLUEBALL
|
{ // MT_BLUEBALL
|
||||||
-1, // doomednum
|
-1, // doomednum
|
||||||
S_BLUEBALL, // spawnstate
|
S_BLUEBALL, // spawnstate
|
||||||
|
|
@ -4639,7 +4638,6 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
||||||
MF_SLIDEME|MF_SPECIAL|MF_NOGRAVITY|MF_NOCLIPHEIGHT, // flags
|
MF_SLIDEME|MF_SPECIAL|MF_NOGRAVITY|MF_NOCLIPHEIGHT, // flags
|
||||||
S_NULL // raisestate
|
S_NULL // raisestate
|
||||||
},
|
},
|
||||||
#endif
|
|
||||||
|
|
||||||
{ // MT_REDTEAMRING
|
{ // MT_REDTEAMRING
|
||||||
308, // doomednum
|
308, // doomednum
|
||||||
|
|
|
||||||
|
|
@ -3096,9 +3096,7 @@ typedef enum mobj_type
|
||||||
// Collectible Items
|
// Collectible Items
|
||||||
MT_RING,
|
MT_RING,
|
||||||
MT_FLINGRING, // Lost ring
|
MT_FLINGRING, // Lost ring
|
||||||
#ifdef BLUE_SPHERES
|
|
||||||
MT_BLUEBALL, // Blue sphere replacement for special stages
|
MT_BLUEBALL, // Blue sphere replacement for special stages
|
||||||
#endif
|
|
||||||
MT_REDTEAMRING, //Rings collectable by red team.
|
MT_REDTEAMRING, //Rings collectable by red team.
|
||||||
MT_BLUETEAMRING, //Rings collectable by blue team.
|
MT_BLUETEAMRING, //Rings collectable by blue team.
|
||||||
MT_EMMY, // emerald token for special stage
|
MT_EMMY, // emerald token for special stage
|
||||||
|
|
|
||||||
|
|
@ -85,6 +85,14 @@ static int lib_print(lua_State *L)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int lib_evalMath(lua_State *L)
|
||||||
|
{
|
||||||
|
const char *word = luaL_checkstring(L, 1);
|
||||||
|
LUA_Deprecated(L, "EvalMath(string)", "_G[string]");
|
||||||
|
lua_pushinteger(L, LUA_EvalMath(word));
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
// M_RANDOM
|
// M_RANDOM
|
||||||
//////////////
|
//////////////
|
||||||
|
|
||||||
|
|
@ -1903,6 +1911,7 @@ static int lib_gTicsToMilliseconds(lua_State *L)
|
||||||
|
|
||||||
static luaL_Reg lib[] = {
|
static luaL_Reg lib[] = {
|
||||||
{"print", lib_print},
|
{"print", lib_print},
|
||||||
|
{"EvalMath", lib_evalMath},
|
||||||
|
|
||||||
// m_random
|
// m_random
|
||||||
{"P_Random",lib_pRandom},
|
{"P_Random",lib_pRandom},
|
||||||
|
|
|
||||||
|
|
@ -70,4 +70,15 @@ void COM_Lua_f(void);
|
||||||
|
|
||||||
#define LUA_ErrInvalid(L, type) luaL_error(L, "accessed " type " doesn't exist anymore, please check 'valid' before using " type ".");
|
#define LUA_ErrInvalid(L, type) luaL_error(L, "accessed " type " doesn't exist anymore, please check 'valid' before using " type ".");
|
||||||
|
|
||||||
|
// Deprecation warnings
|
||||||
|
// Shows once upon use. Then doesn't show again.
|
||||||
|
#define LUA_Deprecated(L,this_func,use_instead)\
|
||||||
|
{\
|
||||||
|
static UINT8 seen = 0;\
|
||||||
|
if (!seen) {\
|
||||||
|
seen = 1;\
|
||||||
|
CONS_Alert(CONS_WARNING,"\"%s\" is deprecated and will be removed.\nUse \"%s\" instead.\n", this_func, use_instead);\
|
||||||
|
}\
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -1971,71 +1971,51 @@ void T_NoEnemiesSector(levelspecthink_t *nobaddies)
|
||||||
{
|
{
|
||||||
size_t i;
|
size_t i;
|
||||||
fixed_t upperbound, lowerbound;
|
fixed_t upperbound, lowerbound;
|
||||||
sector_t *sec = NULL;
|
INT32 s;
|
||||||
sector_t *targetsec = NULL;
|
sector_t *checksector;
|
||||||
INT32 secnum = -1;
|
|
||||||
msecnode_t *node;
|
msecnode_t *node;
|
||||||
mobj_t *thing;
|
mobj_t *thing;
|
||||||
boolean FOFsector = false;
|
boolean exists = false;
|
||||||
|
|
||||||
while ((secnum = P_FindSectorFromLineTag(nobaddies->sourceline, secnum)) >= 0)
|
for (i = 0; i < nobaddies->sector->linecount; i++)
|
||||||
{
|
{
|
||||||
sec = §ors[secnum];
|
if (nobaddies->sector->lines[i]->special == 223)
|
||||||
|
|
||||||
FOFsector = false;
|
|
||||||
|
|
||||||
// Check the lines of this sector, to see if it is a FOF control sector.
|
|
||||||
for (i = 0; i < sec->linecount; i++)
|
|
||||||
{
|
{
|
||||||
INT32 targetsecnum = -1;
|
|
||||||
|
|
||||||
if (sec->lines[i]->special < 100 || sec->lines[i]->special >= 300)
|
upperbound = nobaddies->sector->ceilingheight;
|
||||||
continue;
|
lowerbound = nobaddies->sector->floorheight;
|
||||||
|
|
||||||
FOFsector = true;
|
for (s = -1; (s = P_FindSectorFromLineTag(nobaddies->sector->lines[i], s)) >= 0 ;)
|
||||||
|
|
||||||
while ((targetsecnum = P_FindSectorFromLineTag(sec->lines[i], targetsecnum)) >= 0)
|
|
||||||
{
|
{
|
||||||
targetsec = §ors[targetsecnum];
|
checksector = §ors[s];
|
||||||
|
|
||||||
upperbound = targetsec->ceilingheight;
|
node = checksector->touching_thinglist; // things touching this sector
|
||||||
lowerbound = targetsec->floorheight;
|
|
||||||
node = targetsec->touching_thinglist; // things touching this sector
|
|
||||||
while (node)
|
while (node)
|
||||||
{
|
{
|
||||||
thing = node->m_thing;
|
thing = node->m_thing;
|
||||||
|
|
||||||
if ((thing->flags & (MF_ENEMY|MF_BOSS)) && thing->health > 0
|
if ((thing->flags & (MF_ENEMY|MF_BOSS)) && thing->health > 0
|
||||||
&& thing->z < upperbound && thing->z+thing->height > lowerbound)
|
&& thing->z < upperbound && thing->z+thing->height > lowerbound)
|
||||||
return;
|
{
|
||||||
|
exists = true;
|
||||||
|
goto foundenemy;
|
||||||
|
}
|
||||||
|
|
||||||
node = node->m_snext;
|
node = node->m_snext;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!FOFsector)
|
|
||||||
{
|
|
||||||
upperbound = sec->ceilingheight;
|
|
||||||
lowerbound = sec->floorheight;
|
|
||||||
node = sec->touching_thinglist; // things touching this sector
|
|
||||||
while (node)
|
|
||||||
{
|
|
||||||
thing = node->m_thing;
|
|
||||||
|
|
||||||
if ((thing->flags & (MF_ENEMY|MF_BOSS)) && thing->health > 0
|
|
||||||
&& thing->z < upperbound && thing->z+thing->height > lowerbound)
|
|
||||||
return;
|
|
||||||
|
|
||||||
node = node->m_snext;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
foundenemy:
|
||||||
|
if (exists)
|
||||||
|
return;
|
||||||
|
|
||||||
CONS_Debug(DBG_GAMELOGIC, "Running no-more-enemies exec with tag of %d\n", nobaddies->sourceline->tag);
|
s = P_AproxDistance(nobaddies->sourceline->dx, nobaddies->sourceline->dy)>>FRACBITS;
|
||||||
|
|
||||||
// No enemies found, run the linedef exec and terminate this thinker
|
CONS_Debug(DBG_GAMELOGIC, "Running no-more-enemies exec with tag of %d\n", s);
|
||||||
P_RunTriggerLinedef(nobaddies->sourceline, NULL, NULL);
|
|
||||||
|
// Otherwise, run the linedef exec and terminate this thinker
|
||||||
|
P_LinedefExecute((INT16)s, NULL, NULL);
|
||||||
P_RemoveThinker(&nobaddies->thinker);
|
P_RemoveThinker(&nobaddies->thinker);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -405,7 +405,6 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
||||||
if ((maptol & TOL_NIGHTS) && special->type != MT_FLINGCOIN)
|
if ((maptol & TOL_NIGHTS) && special->type != MT_FLINGCOIN)
|
||||||
P_DoNightsScore(player);
|
P_DoNightsScore(player);
|
||||||
break;
|
break;
|
||||||
#ifdef BLUE_SPHERES
|
|
||||||
case MT_BLUEBALL:
|
case MT_BLUEBALL:
|
||||||
if (!(P_CanPickupItem(player, false)))
|
if (!(P_CanPickupItem(player, false)))
|
||||||
return;
|
return;
|
||||||
|
|
@ -422,7 +421,6 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
||||||
if (maptol & TOL_NIGHTS)
|
if (maptol & TOL_NIGHTS)
|
||||||
P_DoNightsScore(player);
|
P_DoNightsScore(player);
|
||||||
break;
|
break;
|
||||||
#endif
|
|
||||||
case MT_AUTOPICKUP:
|
case MT_AUTOPICKUP:
|
||||||
case MT_BOUNCEPICKUP:
|
case MT_BOUNCEPICKUP:
|
||||||
case MT_SCATTERPICKUP:
|
case MT_SCATTERPICKUP:
|
||||||
|
|
@ -766,10 +764,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
||||||
}
|
}
|
||||||
|
|
||||||
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
|
||||||
#ifdef BLUE_SPHERES
|
|| mo2->type == MT_BLUEBALL))
|
||||||
|| mo2->type == MT_BLUEBALL
|
|
||||||
#endif
|
|
||||||
))
|
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// Yay! The thing's in reach! Pull it in!
|
// Yay! The thing's in reach! Pull it in!
|
||||||
|
|
|
||||||
21
src/p_mobj.c
21
src/p_mobj.c
|
|
@ -2363,9 +2363,7 @@ static boolean P_ZMovement(mobj_t *mo)
|
||||||
|
|
||||||
case MT_RING: // Ignore still rings
|
case MT_RING: // Ignore still rings
|
||||||
case MT_COIN:
|
case MT_COIN:
|
||||||
#ifdef BLUE_SPHERES
|
|
||||||
case MT_BLUEBALL:
|
case MT_BLUEBALL:
|
||||||
#endif
|
|
||||||
case MT_REDTEAMRING:
|
case MT_REDTEAMRING:
|
||||||
case MT_BLUETEAMRING:
|
case MT_BLUETEAMRING:
|
||||||
case MT_FLINGRING:
|
case MT_FLINGRING:
|
||||||
|
|
@ -6258,7 +6256,8 @@ void P_MobjThinker(mobj_t *mobj)
|
||||||
if (mobj->tracer && P_MobjWasRemoved(mobj->tracer))
|
if (mobj->tracer && P_MobjWasRemoved(mobj->tracer))
|
||||||
P_SetTarget(&mobj->tracer, NULL);
|
P_SetTarget(&mobj->tracer, NULL);
|
||||||
|
|
||||||
mobj->eflags &= ~(MFE_PUSHED|MFE_SPRUNG);
|
mobj->flags2 &= ~MF2_PUSHED;
|
||||||
|
mobj->eflags &= ~MFE_SPRUNG;
|
||||||
|
|
||||||
tmfloorthing = tmhitthing = NULL;
|
tmfloorthing = tmhitthing = NULL;
|
||||||
|
|
||||||
|
|
@ -6653,14 +6652,12 @@ void P_MobjThinker(mobj_t *mobj)
|
||||||
else if (mobj->health <= 0) // Dead things think differently than the living.
|
else if (mobj->health <= 0) // Dead things think differently than the living.
|
||||||
switch (mobj->type)
|
switch (mobj->type)
|
||||||
{
|
{
|
||||||
#ifdef BLUE_SPHERES
|
|
||||||
case MT_BLUEBALL:
|
case MT_BLUEBALL:
|
||||||
if ((mobj->tics>>2)+1 > 0 && (mobj->tics>>2)+1 <= tr_trans60) // tr_trans50 through tr_trans90, shifting once every second frame
|
if ((mobj->tics>>2)+1 > 0 && (mobj->tics>>2)+1 <= tr_trans60) // tr_trans50 through tr_trans90, shifting once every second frame
|
||||||
mobj->frame = (NUMTRANSMAPS-((mobj->tics>>2)+1))<<FF_TRANSSHIFT;
|
mobj->frame = (NUMTRANSMAPS-((mobj->tics>>2)+1))<<FF_TRANSSHIFT;
|
||||||
else // tr_trans60 otherwise
|
else // tr_trans60 otherwise
|
||||||
mobj->frame = tr_trans60<<FF_TRANSSHIFT;
|
mobj->frame = tr_trans60<<FF_TRANSSHIFT;
|
||||||
break;
|
break;
|
||||||
#endif
|
|
||||||
case MT_EGGCAPSULE:
|
case MT_EGGCAPSULE:
|
||||||
if (mobj->z <= mobj->floorz)
|
if (mobj->z <= mobj->floorz)
|
||||||
{
|
{
|
||||||
|
|
@ -7118,9 +7115,7 @@ void P_MobjThinker(mobj_t *mobj)
|
||||||
break;
|
break;
|
||||||
case MT_RING:
|
case MT_RING:
|
||||||
case MT_COIN:
|
case MT_COIN:
|
||||||
#ifdef BLUE_SPHERES
|
|
||||||
case MT_BLUEBALL:
|
case MT_BLUEBALL:
|
||||||
#endif
|
|
||||||
case MT_REDTEAMRING:
|
case MT_REDTEAMRING:
|
||||||
case MT_BLUETEAMRING:
|
case MT_BLUETEAMRING:
|
||||||
// No need to check water. Who cares?
|
// No need to check water. Who cares?
|
||||||
|
|
@ -7886,9 +7881,7 @@ mobj_t *P_SpawnMobj(fixed_t x, fixed_t y, fixed_t z, mobjtype_t type)
|
||||||
break;
|
break;
|
||||||
case MT_RING:
|
case MT_RING:
|
||||||
case MT_COIN:
|
case MT_COIN:
|
||||||
#ifdef BLUE_SPHERES
|
|
||||||
case MT_BLUEBALL:
|
case MT_BLUEBALL:
|
||||||
#endif
|
|
||||||
nummaprings++;
|
nummaprings++;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|
@ -8014,9 +8007,7 @@ 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
|
||||||
#ifdef BLUE_SPHERES
|
|
||||||
|| mobj->type == MT_BLUEBALL
|
|| mobj->type == MT_BLUEBALL
|
||||||
#endif
|
|
||||||
|| mobj->type == MT_REDTEAMRING
|
|| mobj->type == MT_REDTEAMRING
|
||||||
|| mobj->type == MT_BLUETEAMRING
|
|| mobj->type == MT_BLUETEAMRING
|
||||||
|| P_WeaponOrPanel(mobj->type))
|
|| P_WeaponOrPanel(mobj->type))
|
||||||
|
|
@ -9802,11 +9793,9 @@ void P_SpawnHoopsAndRings(mapthing_t *mthing)
|
||||||
ringthing = (gametype == GT_CTF) ? MT_BLUETEAMRING : MT_RING;
|
ringthing = (gametype == GT_CTF) ? MT_BLUETEAMRING : MT_RING;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
#ifdef BLUE_SPHERES
|
|
||||||
// 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)
|
||||||
ringthing = MT_BLUEBALL;
|
ringthing = MT_BLUEBALL;
|
||||||
#endif
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -9871,11 +9860,9 @@ void P_SpawnHoopsAndRings(mapthing_t *mthing)
|
||||||
if (ultimatemode && !(G_IsSpecialStage(gamemap) || maptol & TOL_NIGHTS))
|
if (ultimatemode && !(G_IsSpecialStage(gamemap) || maptol & TOL_NIGHTS))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
#ifdef BLUE_SPHERES
|
|
||||||
// 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)
|
||||||
ringthing = MT_BLUEBALL;
|
ringthing = MT_BLUEBALL;
|
||||||
#endif
|
|
||||||
|
|
||||||
for (r = 1; r <= 5; r++)
|
for (r = 1; r <= 5; r++)
|
||||||
{
|
{
|
||||||
|
|
@ -9926,11 +9913,9 @@ void P_SpawnHoopsAndRings(mapthing_t *mthing)
|
||||||
if (ultimatemode && !(G_IsSpecialStage(gamemap) || maptol & TOL_NIGHTS))
|
if (ultimatemode && !(G_IsSpecialStage(gamemap) || maptol & TOL_NIGHTS))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
#ifdef BLUE_SPHERES
|
|
||||||
// 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)
|
||||||
ringthing = MT_BLUEBALL;
|
ringthing = MT_BLUEBALL;
|
||||||
#endif
|
|
||||||
|
|
||||||
angle >>= ANGLETOFINESHIFT;
|
angle >>= ANGLETOFINESHIFT;
|
||||||
|
|
||||||
|
|
@ -10023,11 +10008,9 @@ void P_SpawnHoopsAndRings(mapthing_t *mthing)
|
||||||
if (ultimatemode && !(G_IsSpecialStage(gamemap) || (maptol & TOL_NIGHTS)))
|
if (ultimatemode && !(G_IsSpecialStage(gamemap) || (maptol & TOL_NIGHTS)))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
#ifdef BLUE_SPHERES
|
|
||||||
// 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)
|
||||||
itemToSpawn = MT_BLUEBALL;
|
itemToSpawn = MT_BLUEBALL;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fa = i*FINEANGLES/numitems;
|
fa = i*FINEANGLES/numitems;
|
||||||
|
|
|
||||||
38
src/p_mobj.h
38
src/p_mobj.h
|
|
@ -175,23 +175,24 @@ typedef enum
|
||||||
MF2_EXPLOSION = 1<<7, // Thrown ring has explosive properties
|
MF2_EXPLOSION = 1<<7, // Thrown ring has explosive properties
|
||||||
MF2_SCATTER = 1<<8, // Thrown ring has scatter properties
|
MF2_SCATTER = 1<<8, // Thrown ring has scatter properties
|
||||||
MF2_BEYONDTHEGRAVE = 1<<9, // Source of this missile has died and has since respawned.
|
MF2_BEYONDTHEGRAVE = 1<<9, // Source of this missile has died and has since respawned.
|
||||||
MF2_SLIDEPUSH = 1<<10, // MF_PUSHABLE that pushes continuously.
|
MF2_PUSHED = 1<<10, // Mobj was already pushed this tic
|
||||||
MF2_CLASSICPUSH = 1<<11, // Drops straight down when object has negative Z.
|
MF2_SLIDEPUSH = 1<<11, // MF_PUSHABLE that pushes continuously.
|
||||||
MF2_STANDONME = 1<<12, // While not pushable, stand on me anyway.
|
MF2_CLASSICPUSH = 1<<12, // Drops straight down when object has negative Z.
|
||||||
MF2_INFLOAT = 1<<13, // Floating to a height for a move, don't auto float to target's height.
|
MF2_STANDONME = 1<<13, // While not pushable, stand on me anyway.
|
||||||
MF2_DEBRIS = 1<<14, // Splash ring from explosion ring
|
MF2_INFLOAT = 1<<14, // Floating to a height for a move, don't auto float to target's height.
|
||||||
MF2_NIGHTSPULL = 1<<15, // Attracted from a paraloop
|
MF2_DEBRIS = 1<<15, // Splash ring from explosion ring
|
||||||
MF2_JUSTATTACKED = 1<<16, // can be pushed by other moving mobjs
|
MF2_NIGHTSPULL = 1<<16, // Attracted from a paraloop
|
||||||
MF2_FIRING = 1<<17, // turret fire
|
MF2_JUSTATTACKED = 1<<17, // can be pushed by other moving mobjs
|
||||||
MF2_SUPERFIRE = 1<<18, // Firing something with Super Sonic-stopping properties. Or, if mobj has MF_MISSILE, this is the actual fire from it.
|
MF2_FIRING = 1<<18, // turret fire
|
||||||
MF2_SHADOW = 1<<19, // Fuzzy draw, makes targeting harder.
|
MF2_SUPERFIRE = 1<<19, // Firing something with Super Sonic-stopping properties. Or, if mobj has MF_MISSILE, this is the actual fire from it.
|
||||||
MF2_STRONGBOX = 1<<20, // Flag used for "strong" random monitors.
|
MF2_SHADOW = 1<<20, // Fuzzy draw, makes targeting harder.
|
||||||
MF2_OBJECTFLIP = 1<<21, // Flag for objects that always have flipped gravity.
|
MF2_STRONGBOX = 1<<21, // Flag used for "strong" random monitors.
|
||||||
MF2_SKULLFLY = 1<<22, // Special handling: skull in flight.
|
MF2_OBJECTFLIP = 1<<22, // Flag for objects that always have flipped gravity.
|
||||||
MF2_FRET = 1<<23, // Flashing from a previous hit
|
MF2_SKULLFLY = 1<<23, // Special handling: skull in flight.
|
||||||
MF2_BOSSNOTRAP = 1<<24, // No Egg Trap after boss
|
MF2_FRET = 1<<24, // Flashing from a previous hit
|
||||||
MF2_BOSSFLEE = 1<<25, // Boss is fleeing!
|
MF2_BOSSNOTRAP = 1<<25, // No Egg Trap after boss
|
||||||
MF2_BOSSDEAD = 1<<26, // Boss is dead! (Not necessarily fleeing, if a fleeing point doesn't exist.)
|
MF2_BOSSFLEE = 1<<26, // Boss is fleeing!
|
||||||
|
MF2_BOSSDEAD = 1<<27, // Boss is dead! (Not necessarily fleeing, if a fleeing point doesn't exist.)
|
||||||
// free: to and including 1<<31
|
// free: to and including 1<<31
|
||||||
} mobjflag2_t;
|
} mobjflag2_t;
|
||||||
|
|
||||||
|
|
@ -231,8 +232,7 @@ typedef enum
|
||||||
MFE_VERTICALFLIP = 1<<5,
|
MFE_VERTICALFLIP = 1<<5,
|
||||||
// Goo water
|
// Goo water
|
||||||
MFE_GOOWATER = 1<<6,
|
MFE_GOOWATER = 1<<6,
|
||||||
// Mobj was already pushed this tic
|
// free: to and including 1<<7
|
||||||
MFE_PUSHED = 1<<7,
|
|
||||||
// Mobj was already sprung this tic
|
// Mobj was already sprung this tic
|
||||||
MFE_SPRUNG = 1<<8,
|
MFE_SPRUNG = 1<<8,
|
||||||
// Platform movement
|
// Platform movement
|
||||||
|
|
|
||||||
44
src/p_spec.c
44
src/p_spec.c
|
|
@ -1891,7 +1891,6 @@ boolean P_RunTriggerLinedef(line_t *triggerline, mobj_t *actor, sector_t *caller
|
||||||
|| specialtype == 304 // Ring count - Once
|
|| specialtype == 304 // Ring count - Once
|
||||||
|| specialtype == 307 // Character ability - Once
|
|| specialtype == 307 // Character ability - Once
|
||||||
|| specialtype == 308 // Race only - Once
|
|| specialtype == 308 // Race only - Once
|
||||||
|| specialtype == 313 // No More Enemies - Once
|
|
||||||
|| specialtype == 315 // No of pushables - Once
|
|| specialtype == 315 // No of pushables - Once
|
||||||
|| specialtype == 318 // Unlockable trigger - Once
|
|| specialtype == 318 // Unlockable trigger - Once
|
||||||
|| specialtype == 320 // Unlockable - Once
|
|| specialtype == 320 // Unlockable - Once
|
||||||
|
|
@ -6029,31 +6028,6 @@ void P_SpawnSpecials(INT32 fromnetsave)
|
||||||
P_AddRaiseThinker(lines[i].frontsector, &lines[i]);
|
P_AddRaiseThinker(lines[i].frontsector, &lines[i]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#ifdef SLOPENESS
|
|
||||||
case 999:
|
|
||||||
sec = sides[*lines[i].sidenum].sector-sectors;
|
|
||||||
for (s = -1; (s = P_FindSectorFromLineTag(lines + i, s)) >= 0 ;)
|
|
||||||
{
|
|
||||||
size_t counting;
|
|
||||||
|
|
||||||
sectors[s].floorangle = ANGLE_45;
|
|
||||||
for (counting = 0; counting < sectors[s].linecount/2; counting++)
|
|
||||||
{
|
|
||||||
sectors[s].lines[counting]->v1->z = sectors[sec].floorheight;
|
|
||||||
CONS_Debug(DBG_GAMELOGIC, "Set it to %d\n", sectors[s].lines[counting]->v1->z>>FRACBITS);
|
|
||||||
}
|
|
||||||
|
|
||||||
for (counting = sectors[s].linecount/2; counting < sectors[s].linecount; counting++)
|
|
||||||
{
|
|
||||||
sectors[s].lines[counting]->v1->z = sectors[sec].ceilingheight;
|
|
||||||
CONS_Debug(DBG_GAMELOGIC, "Set it to %d\n", sectors[s].lines[counting]->v1->z>>FRACBITS);
|
|
||||||
}
|
|
||||||
sectors[s].special = 65535;
|
|
||||||
CONS_Debug(DBG_GAMELOGIC, "Found & Set slope!\n");
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
case 200: // Double light effect
|
case 200: // Double light effect
|
||||||
P_AddFakeFloorsByLine(i, FF_EXISTS|FF_CUTSPRITES|FF_DOUBLESHADOW, secthinkers);
|
P_AddFakeFloorsByLine(i, FF_EXISTS|FF_CUTSPRITES|FF_DOUBLESHADOW, secthinkers);
|
||||||
break;
|
break;
|
||||||
|
|
@ -6468,7 +6442,7 @@ static void P_DoScrollMove(mobj_t *thing, fixed_t dx, fixed_t dy, INT32 exclusiv
|
||||||
thing->momy += dy;
|
thing->momy += dy;
|
||||||
|
|
||||||
if (exclusive)
|
if (exclusive)
|
||||||
thing->eflags |= MFE_PUSHED;
|
thing->flags2 |= MF2_PUSHED;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Processes an active scroller.
|
/** Processes an active scroller.
|
||||||
|
|
@ -6572,7 +6546,7 @@ void T_Scroll(scroll_t *s)
|
||||||
{
|
{
|
||||||
thing = node->m_thing;
|
thing = node->m_thing;
|
||||||
|
|
||||||
if (thing->eflags & MFE_PUSHED) // Already pushed this tic by an exclusive pusher.
|
if (thing->flags2 & MF2_PUSHED) // Already pushed this tic by an exclusive pusher.
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
height = P_GetSpecialBottomZ(thing, sec, psec);
|
height = P_GetSpecialBottomZ(thing, sec, psec);
|
||||||
|
|
@ -6594,7 +6568,7 @@ void T_Scroll(scroll_t *s)
|
||||||
{
|
{
|
||||||
thing = node->m_thing;
|
thing = node->m_thing;
|
||||||
|
|
||||||
if (thing->eflags & MFE_PUSHED)
|
if (thing->flags2 & MF2_PUSHED)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
height = P_GetSpecialBottomZ(thing, sec, sec);
|
height = P_GetSpecialBottomZ(thing, sec, sec);
|
||||||
|
|
@ -6635,7 +6609,7 @@ void T_Scroll(scroll_t *s)
|
||||||
{
|
{
|
||||||
thing = node->m_thing;
|
thing = node->m_thing;
|
||||||
|
|
||||||
if (thing->eflags & MFE_PUSHED)
|
if (thing->flags2 & MF2_PUSHED)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
height = P_GetSpecialTopZ(thing, sec, psec);
|
height = P_GetSpecialTopZ(thing, sec, psec);
|
||||||
|
|
@ -6657,7 +6631,7 @@ void T_Scroll(scroll_t *s)
|
||||||
{
|
{
|
||||||
thing = node->m_thing;
|
thing = node->m_thing;
|
||||||
|
|
||||||
if (thing->eflags & MFE_PUSHED)
|
if (thing->flags2 & MF2_PUSHED)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
height = P_GetSpecialTopZ(thing, sec, sec);
|
height = P_GetSpecialTopZ(thing, sec, sec);
|
||||||
|
|
@ -7140,7 +7114,7 @@ static pusher_t *tmpusher; // pusher structure for blockmap searches
|
||||||
*/
|
*/
|
||||||
static inline boolean PIT_PushThing(mobj_t *thing)
|
static inline boolean PIT_PushThing(mobj_t *thing)
|
||||||
{
|
{
|
||||||
if (thing->eflags & MFE_PUSHED)
|
if (thing->flags2 & MF2_PUSHED)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (thing->player && thing->player->pflags & PF_ROPEHANG)
|
if (thing->player && thing->player->pflags & PF_ROPEHANG)
|
||||||
|
|
@ -7270,7 +7244,7 @@ static inline boolean PIT_PushThing(mobj_t *thing)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tmpusher->exclusive)
|
if (tmpusher->exclusive)
|
||||||
thing->eflags |= MFE_PUSHED;
|
thing->flags2 |= MF2_PUSHED;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
@ -7373,7 +7347,7 @@ void T_Pusher(pusher_t *p)
|
||||||
|| thing->type == MT_BIGTUMBLEWEED))
|
|| thing->type == MT_BIGTUMBLEWEED))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (thing->eflags & MFE_PUSHED)
|
if (thing->flags2 & MF2_PUSHED)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (thing->player && thing->player->pflags & PF_ROPEHANG)
|
if (thing->player && thing->player->pflags & PF_ROPEHANG)
|
||||||
|
|
@ -7540,7 +7514,7 @@ void T_Pusher(pusher_t *p)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (p->exclusive)
|
if (p->exclusive)
|
||||||
thing->eflags |= MFE_PUSHED;
|
thing->flags2 |= MF2_PUSHED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8884,10 +8884,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
|
||||||
#ifdef BLUE_SPHERES
|
|| mo2->type == MT_BLUEBALL))
|
||||||
|| mo2->type == MT_BLUEBALL
|
|
||||||
#endif
|
|
||||||
))
|
|
||||||
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))
|
||||||
|
|
|
||||||
|
|
@ -369,14 +369,6 @@ typedef struct sector_s
|
||||||
double lineoutLength;
|
double lineoutLength;
|
||||||
#endif // ----- end special tricks -----
|
#endif // ----- end special tricks -----
|
||||||
|
|
||||||
// ZDoom C++ to Legacy C conversion (for slopes)
|
|
||||||
// store floor and ceiling planes instead of heights
|
|
||||||
//secplane_t floorplane, ceilingplane;
|
|
||||||
#ifdef SLOPENESS
|
|
||||||
//fixed_t floortexz, ceilingtexz; // [RH] used for wall texture mapping
|
|
||||||
angle_t floorangle;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// This points to the master's floorheight, so it can be changed in realtime!
|
// This points to the master's floorheight, so it can be changed in realtime!
|
||||||
fixed_t *gravity; // per-sector gravity
|
fixed_t *gravity; // per-sector gravity
|
||||||
boolean verticalflip; // If gravity < 0, then allow flipped physics
|
boolean verticalflip; // If gravity < 0, then allow flipped physics
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue