mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-02-20 10:53:27 +00:00
* Make busting a FOF through any in-game means (or not providing a target sector to EV_CrumbleChain) bust all FOFs with the same control sector.
* Make CA2_GUNSLINGER not get overridden by being in quicksand.
This commit is contained in:
parent
438c4d1d51
commit
385d34e67e
4 changed files with 39 additions and 19 deletions
|
@ -2051,8 +2051,8 @@ static int lib_evCrumbleChain(lua_State *L)
|
|||
ffloor_t *rover = *((ffloor_t **)luaL_checkudata(L, 2, META_FFLOOR));
|
||||
NOHUD
|
||||
INLEVEL
|
||||
if (!sec)
|
||||
return LUA_ErrInvalid(L, "sector_t");
|
||||
/*if (!sec)
|
||||
return LUA_ErrInvalid(L, "sector_t");*/
|
||||
if (!rover)
|
||||
return LUA_ErrInvalid(L, "ffloor_t");
|
||||
EV_CrumbleChain(sec, rover);
|
||||
|
|
|
@ -3029,20 +3029,40 @@ INT32 EV_DoElevator(line_t *line, elevator_e elevtype, boolean customspeed)
|
|||
|
||||
void EV_CrumbleChain(sector_t *sec, ffloor_t *rover)
|
||||
{
|
||||
size_t i;
|
||||
size_t leftmostvertex = 0, rightmostvertex = 0;
|
||||
size_t topmostvertex = 0, bottommostvertex = 0;
|
||||
fixed_t leftx, rightx;
|
||||
fixed_t topy, bottomy;
|
||||
fixed_t topz, bottomz;
|
||||
fixed_t widthfactor = FRACUNIT, heightfactor = FRACUNIT;
|
||||
fixed_t a, b, c;
|
||||
mobjtype_t type = MT_ROCKCRUMBLE1;
|
||||
fixed_t spacing = (32<<FRACBITS);
|
||||
tic_t lifetime = 3*TICRATE;
|
||||
INT16 flags = 0;
|
||||
size_t i, leftmostvertex, rightmostvertex, topmostvertex, bottommostvertex;
|
||||
fixed_t leftx, rightx, topy, bottomy, topz, bottomz, widthfactor, heightfactor, a, b, c, spacing;
|
||||
mobjtype_t type;
|
||||
tic_t lifetime;
|
||||
INT16 flags;
|
||||
|
||||
#define controlsec rover->master->frontsector
|
||||
sector_t *controlsec = rover->master->frontsector;
|
||||
|
||||
if (sec == NULL)
|
||||
{
|
||||
if (controlsec->numattached)
|
||||
{
|
||||
for (i = 0; i < controlsec->numattached; i++)
|
||||
{
|
||||
sec = §ors[controlsec->attached[i]];
|
||||
if (!sec->ffloors)
|
||||
continue;
|
||||
|
||||
for (rover = sec->ffloors; rover; rover = rover->next)
|
||||
{
|
||||
if (rover->master->frontsector == controlsec)
|
||||
EV_CrumbleChain(sec, rover);
|
||||
}
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
leftmostvertex = rightmostvertex = topmostvertex = bottommostvertex = 0;
|
||||
widthfactor = heightfactor = FRACUNIT;
|
||||
spacing = (32<<FRACBITS);
|
||||
type = MT_ROCKCRUMBLE1;
|
||||
lifetime = 3*TICRATE;
|
||||
flags = 0;
|
||||
|
||||
if (controlsec->tag != 0)
|
||||
{
|
||||
|
|
|
@ -1784,7 +1784,7 @@ static void P_PushableCheckBustables(mobj_t *mo)
|
|||
continue;
|
||||
}
|
||||
|
||||
EV_CrumbleChain(node->m_sector, rover);
|
||||
EV_CrumbleChain(NULL, rover); // node->m_sector
|
||||
|
||||
// Run a linedef executor??
|
||||
if (rover->master->flags & ML_EFFECT5)
|
||||
|
@ -3129,7 +3129,7 @@ nightsdone:
|
|||
{
|
||||
// DO THE MARIO!
|
||||
if (rover->flags & FF_SHATTERBOTTOM) // Brick block!
|
||||
EV_CrumbleChain(node->m_sector, rover);
|
||||
EV_CrumbleChain(NULL, rover); // node->m_sector
|
||||
else // Question block!
|
||||
EV_MarioBlock(rover, node->m_sector, mo);
|
||||
}
|
||||
|
|
|
@ -2033,7 +2033,7 @@ boolean P_PlayerHitFloor(player_t *player, boolean dorollstuff)
|
|||
player->skidtime = TICRATE;
|
||||
player->mo->tics = -1;
|
||||
}
|
||||
else if (player->charability2 == CA2_MELEE && (player->panim == PA_ABILITY2 && player->mo->state-states != S_PLAY_MELEE_LANDING))
|
||||
else if (player->charability2 == CA2_MELEE && player->panim == PA_ABILITY2 && player->mo->state-states != S_PLAY_MELEE_LANDING)
|
||||
{
|
||||
mobjtype_t type = player->revitem;
|
||||
P_SetPlayerMobjState(player->mo, S_PLAY_MELEE_LANDING);
|
||||
|
@ -2324,7 +2324,7 @@ static void P_CheckBustableBlocks(player_t *player)
|
|||
//if (metalrecording)
|
||||
// G_RecordBustup(rover);
|
||||
|
||||
EV_CrumbleChain(node->m_sector, rover);
|
||||
EV_CrumbleChain(NULL, rover); // node->m_sector
|
||||
|
||||
// Run a linedef executor??
|
||||
if (rover->master->flags & ML_EFFECT5)
|
||||
|
|
Loading…
Reference in a new issue