pw_ingoop is now CR_BRAKGOOP because i can't stop refactoring CAN'T STOP WON'T STOP

This commit is contained in:
toasterbabe 2017-03-15 21:51:35 +00:00
parent b53e69b949
commit 95e4a23a69
6 changed files with 33 additions and 24 deletions

View File

@ -225,6 +225,8 @@ typedef enum
CR_PLAYER,
// NiGHTS mode. Not technically a CARRYING, but doesn't stack with any of the others, so might as well go here.
CR_NIGHTSMODE,
// Old Brak sucks hard, but this gimmick could be used for something better, so we might as well continue supporting it.
CR_BRAKGOOP,
// Specific level gimmicks.
CR_ZOOMTUBE,
CR_ROPEHANG,
@ -264,9 +266,7 @@ typedef enum
pw_nights_helper,
pw_nights_linkfreeze,
//for linedef exec 427
pw_nocontrol,
pw_ingoop, // In goop
pw_nocontrol, //for linedef exec 427
NUMPOWERS
} powertype_t;

View File

@ -7129,8 +7129,7 @@ static const char *const POWERS_LIST[] = {
"NIGHTS_LINKFREEZE",
//for linedef exec 427
"NOCONTROL",
"INGOOP" // In goop
"NOCONTROL"
};
static const char *const HUDITEMS_LIST[] = {
@ -7355,6 +7354,7 @@ struct {
{"CR_GENERIC",CR_GENERIC},
{"CR_PLAYER",CR_PLAYER},
{"CR_NIGHTSMODE",CR_NIGHTSMODE},
{"CR_BRAKGOOP",CR_BRAKGOOP},
{"CR_ZOOMTUBE",CR_ZOOMTUBE},
{"CR_ROPEHANG",CR_ROPEHANG},
{"CR_MACESPIN",CR_MACESPIN},

View File

@ -1355,7 +1355,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
return;
case MT_BLACKEGGMAN_GOOPFIRE:
if (toucher->state != &states[S_PLAY_PAIN] && !player->powers[pw_flashing])
if (!player->powers[pw_flashing])
{
toucher->momx = 0;
toucher->momy = 0;
@ -1363,13 +1363,8 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
if (toucher->momz != 0)
special->momz = toucher->momz;
player->powers[pw_ingoop] = 2;
if (player->powers[pw_carry] == CR_GENERIC)
{
P_SetTarget(&toucher->tracer, NULL);
player->powers[pw_carry] = CR_NONE;
}
player->powers[pw_carry] = CR_BRAKGOOP;
P_SetTarget(&toucher->tracer, special);
P_ResetPlayer(player);
@ -1382,7 +1377,10 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
}
}
else
player->powers[pw_ingoop] = 0;
{
player->powers[pw_carry] = CR_NONE;
P_SetTarget(&toucher->tracer, NULL);
}
return;
case MT_EGGSHIELD:
{

View File

@ -5446,10 +5446,10 @@ static void P_Boss7Thinker(mobj_t *mobj)
if (players[i].mo->health <= 0)
continue;
if (players[i].powers[pw_ingoop])
if (players[i].powers[pw_carry] == CR_BRAKGOOP)
{
closestNum = -1;
closestdist = 16384*FRACUNIT; // Just in case...
closestdist = INT32_MAX; // Just in case...
// Find waypoint he is closest to
for (th = thinkercap.next; th != &thinkercap; th = th->next)

View File

@ -873,7 +873,7 @@ void P_ResetPlayer(player_t *player)
{
player->pflags &= ~(PF_SPINNING|PF_STARTDASH|PF_JUMPED|PF_FORCEJUMPDAMAGE|PF_GLIDING|PF_THOKKED|PF_CANCARRY|PF_SHIELDABILITY|PF_BOUNCING);
if (player->powers[pw_carry] != CR_NIGHTSMODE)
if (!(player->powers[pw_carry] == CR_NIGHTSMODE || player->powers[pw_carry] == CR_BRAKGOOP))
player->powers[pw_carry] = CR_NONE;
player->jumping = 0;
@ -3857,7 +3857,7 @@ static void P_DoSpinAbility(player_t *player, ticcmd_t *cmd)
if (onground && !(player->pflags & PF_USEDOWN) && (player->pflags & PF_STARTDASH) && (player->pflags & PF_SPINNING))
{
player->pflags &= ~PF_STARTDASH;
if (player->powers[pw_ingoop])
if (player->powers[pw_carry] == CR_BRAKGOOP)
player->dashspeed = 0;
if (!((gametype == GT_RACE || gametype == GT_COMPETITION) && leveltime < 4*TICRATE))
@ -6544,7 +6544,7 @@ static void P_MovePlayer(player_t *player)
runspd = FixedMul(runspd, player->mo->movefactor);
// Control relinquishing stuff!
if (player->powers[pw_ingoop])
if (player->powers[pw_carry] == CR_BRAKGOOP)
player->pflags |= PF_FULLSTASIS;
else if (player->pflags & PF_GLIDING && player->skidtime)
player->pflags |= PF_FULLSTASIS;
@ -9398,12 +9398,20 @@ void P_PlayerThink(player_t *player)
if (player->powers[pw_super])
player->powers[pw_super]++;
if (player->powers[pw_ingoop])
if (player->powers[pw_carry] == CR_BRAKGOOP)
{
if (player->mo->state == &states[S_PLAY_STND])
player->mo->tics = 2;
if (!player->powers[pw_flashing])
{
if (player->mo->state != &states[S_PLAY_STND])
P_SetPlayerMobjState(player->mo, S_PLAY_STND);
else
player->mo->tics = 2;
}
else
P_SetTarget(&player->mo->tracer, NULL);
player->powers[pw_ingoop]--;
if (!player->mo->tracer)
player->powers[pw_carry] = CR_NONE;
}
if (player->bumpertime)
@ -9697,6 +9705,9 @@ void P_PlayerAfterThink(player_t *player)
&& !(player->charflags & SF_NOJUMPSPIN))
P_SetPlayerMobjState(player->mo, S_PLAY_JUMP);
/* if (player->powers[pw_carry] == CR_NONE && player->mo->tracer && !player->homing)
P_SetTarget(&player->mo->tracer, NULL);
else */
if (player->powers[pw_carry] == CR_PLAYER && player->mo->tracer)
{
player->mo->height = FixedDiv(P_GetPlayerHeight(player), FixedDiv(14*FRACUNIT,10*FRACUNIT));

View File

@ -587,7 +587,7 @@ static void ST_drawDebugInfo(void)
V_DrawString(304-72, height - 72, (stplyr->pflags & PF_JUMPED) ? V_GREENMAP : V_REDMAP, "JD");
V_DrawString(304-54, height - 72, (stplyr->pflags & PF_SPINNING) ? V_GREENMAP : V_REDMAP, "SP");
V_DrawString(304-36, height - 72, (stplyr->pflags & PF_STARTDASH) ? V_GREENMAP : V_REDMAP, "ST");
V_DrawString(304-18, height - 72, (stplyr->pflags & PF_THOKKED) ? V_GREENMAP : V_REDMAP, "TH");
V_DrawString(304-18, height - 72, (stplyr->pflags & PF_THOKKED) ? V_GREENMAP : V_REDMAP, "TH");
V_DrawString(304, height - 72, (stplyr->pflags & PF_SHIELDABILITY) ? V_GREENMAP : V_REDMAP, "SH");
V_DrawRightAlignedString(320, height - 64, V_MONOSPACE, va("CEILZ: %6d", stplyr->mo->ceilingz>>FRACBITS));