Address review

(for anything code I did, anyway)
This commit is contained in:
TehRealSalt 2018-09-20 17:11:11 -04:00
parent f425ba4423
commit e441b2bce4
6 changed files with 21 additions and 30 deletions

View file

@ -63,9 +63,6 @@ CV_PossibleValue_t CV_Unsigned[] = {{0, "MIN"}, {999999999, "MAX"}, {0, NULL}};
CV_PossibleValue_t CV_Natural[] = {{1, "MIN"}, {999999999, "MAX"}, {0, NULL}}; CV_PossibleValue_t CV_Natural[] = {{1, "MIN"}, {999999999, "MAX"}, {0, NULL}};
//SRB2kart //SRB2kart
/*CV_PossibleValue_t karthud_cons_t[] = {
{0, "Off"}, {1, "Default"}, {2, "SMK"}, {3, "MK64"},
{0, NULL}};*/
CV_PossibleValue_t kartspeed_cons_t[] = { CV_PossibleValue_t kartspeed_cons_t[] = {
{0, "Easy"}, {1, "Normal"}, {2, "Hard"}, {0, "Easy"}, {1, "Normal"}, {2, "Hard"},
{0, NULL}}; {0, NULL}};

View file

@ -127,7 +127,6 @@ extern CV_PossibleValue_t CV_Unsigned[];
extern CV_PossibleValue_t CV_Natural[]; extern CV_PossibleValue_t CV_Natural[];
// SRB2kart // SRB2kart
//extern CV_PossibleValue_t karthud_cons_t[];
extern CV_PossibleValue_t kartspeed_cons_t[]; extern CV_PossibleValue_t kartspeed_cons_t[];
// register a variable for use at the console // register a variable for use at the console

View file

@ -344,7 +344,6 @@ consvar_t cv_tripleorbinaut = {"tripleorbinaut", "On", CV_NETVAR|CV_CHEAT, C
consvar_t cv_quadorbinaut = {"quadorbinaut", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL}; consvar_t cv_quadorbinaut = {"quadorbinaut", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_dualjawz = {"dualjawz", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL}; consvar_t cv_dualjawz = {"dualjawz", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
//consvar_t cv_karthud = {"karthud", "Default", CV_SAVE|CV_CALL, karthud_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
static CV_PossibleValue_t kartminimap_cons_t[] = {{0, "MIN"}, {10, "MAX"}, {0, NULL}}; static CV_PossibleValue_t kartminimap_cons_t[] = {{0, "MIN"}, {10, "MAX"}, {0, NULL}};
consvar_t cv_kartminimap = {"kartminimap", "4", CV_SAVE, kartminimap_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; consvar_t cv_kartminimap = {"kartminimap", "4", CV_SAVE, kartminimap_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_kartcheck = {"kartcheck", "Yes", CV_SAVE, CV_YesNo, NULL, 0, NULL, NULL, 0, 0, NULL}; consvar_t cv_kartcheck = {"kartcheck", "Yes", CV_SAVE, CV_YesNo, NULL, 0, NULL, NULL, 0, 0, NULL};

View file

@ -117,7 +117,6 @@ extern consvar_t cv_thundershield, cv_hyudoro, cv_pogospring, cv_kitchensink;
extern consvar_t cv_triplesneaker, cv_triplebanana, cv_decabanana; extern consvar_t cv_triplesneaker, cv_triplebanana, cv_decabanana;
extern consvar_t cv_tripleorbinaut, cv_quadorbinaut, cv_dualjawz; extern consvar_t cv_tripleorbinaut, cv_quadorbinaut, cv_dualjawz;
//extern consvar_t cv_karthud;
extern consvar_t cv_kartminimap; extern consvar_t cv_kartminimap;
extern consvar_t cv_kartcheck; extern consvar_t cv_kartcheck;
extern consvar_t cv_kartinvinsfx; extern consvar_t cv_kartinvinsfx;

View file

@ -1247,8 +1247,19 @@ static void K_UpdateOffroad(player_t *player)
player->kartstuff[k_offroad] = 0; player->kartstuff[k_offroad] = 0;
} }
// These have to go earlier than its sisters because of K_RespawnChecker...
static void K_MatchGenericExtraFlags(mobj_t *mo, mobj_t *master)
{
// flipping
mo->eflags = (mo->eflags & ~MFE_VERTICALFLIP)|(master->eflags & MFE_VERTICALFLIP);
// visibility (usually for hyudoro)
mo->flags2 = (mo->flags2 & ~MF2_DONTDRAW)|(master->flags2 & MF2_DONTDRAW);
mo->eflags = (mo->eflags & ~MFE_DRAWONLYFORP1)|(master->eflags & MFE_DRAWONLYFORP1);
mo->eflags = (mo->eflags & ~MFE_DRAWONLYFORP2)|(master->eflags & MFE_DRAWONLYFORP2);
mo->eflags = (mo->eflags & ~MFE_DRAWONLYFORP3)|(master->eflags & MFE_DRAWONLYFORP3);
mo->eflags = (mo->eflags & ~MFE_DRAWONLYFORP4)|(master->eflags & MFE_DRAWONLYFORP4);
}
// This has to go earlier than its sisters because of K_RespawnChecker...
static void K_SpawnDashDustRelease(player_t *player) static void K_SpawnDashDustRelease(player_t *player)
{ {
fixed_t newx; fixed_t newx;
@ -1287,12 +1298,7 @@ static void K_SpawnDashDustRelease(player_t *player)
dust->momy = 3*player->mo->momy/5; dust->momy = 3*player->mo->momy/5;
//dust->momz = 3*player->mo->momz/5; //dust->momz = 3*player->mo->momz/5;
dust->flags2 = (dust->flags2 & ~MF2_DONTDRAW)|(player->mo->flags2 & MF2_DONTDRAW); K_MatchGenericExtraFlags(dust, player->mo);
dust->eflags = (dust->eflags & ~MFE_VERTICALFLIP)|(player->mo->eflags & MFE_VERTICALFLIP);
dust->eflags = (dust->eflags & ~MFE_DRAWONLYFORP1)|(player->mo->eflags & MFE_DRAWONLYFORP1);
dust->eflags = (dust->eflags & ~MFE_DRAWONLYFORP2)|(player->mo->eflags & MFE_DRAWONLYFORP2);
dust->eflags = (dust->eflags & ~MFE_DRAWONLYFORP3)|(player->mo->eflags & MFE_DRAWONLYFORP3);
dust->eflags = (dust->eflags & ~MFE_DRAWONLYFORP4)|(player->mo->eflags & MFE_DRAWONLYFORP4);
} }
} }
@ -1543,7 +1549,7 @@ void K_MomentumToFacing(player_t *player)
player->mo->momy = FixedMul(player->mo->momy - player->cmomy, player->mo->friction) + player->cmomy; player->mo->momy = FixedMul(player->mo->momy - player->cmomy, player->mo->friction) + player->cmomy;
} }
// if speed is true it gets the speed boost power, otherwise it gets the acceleration // sets k_boostpower, k_speedboost, and k_accelboost to whatever we need it to be
static void K_GetKartBoostPower(player_t *player) static void K_GetKartBoostPower(player_t *player)
{ {
fixed_t boostpower = FRACUNIT; fixed_t boostpower = FRACUNIT;
@ -2367,12 +2373,7 @@ static void K_SpawnDriftSparks(player_t *player)
P_SetMobjState(spark, S_DRIFTSPARK_A1); P_SetMobjState(spark, S_DRIFTSPARK_A1);
} }
spark->flags2 = (spark->flags2 & ~MF2_DONTDRAW)|(player->mo->flags2 & MF2_DONTDRAW); K_MatchGenericExtraFlags(spark, player->mo);
spark->eflags = (spark->eflags & ~MFE_VERTICALFLIP)|(player->mo->eflags & MFE_VERTICALFLIP);
spark->eflags = (spark->eflags & ~MFE_DRAWONLYFORP1)|(player->mo->eflags & MFE_DRAWONLYFORP1);
spark->eflags = (spark->eflags & ~MFE_DRAWONLYFORP2)|(player->mo->eflags & MFE_DRAWONLYFORP2);
spark->eflags = (spark->eflags & ~MFE_DRAWONLYFORP3)|(player->mo->eflags & MFE_DRAWONLYFORP3);
spark->eflags = (spark->eflags & ~MFE_DRAWONLYFORP4)|(player->mo->eflags & MFE_DRAWONLYFORP4);
} }
} }
@ -2423,7 +2424,7 @@ void K_SpawnBoostTrail(player_t *player)
flame->fuse = TICRATE*2; flame->fuse = TICRATE*2;
flame->destscale = player->mo->scale; flame->destscale = player->mo->scale;
P_SetScale(flame, player->mo->scale); P_SetScale(flame, player->mo->scale);
flame->eflags = (flame->eflags & ~MFE_VERTICALFLIP)|(player->mo->eflags & MFE_VERTICALFLIP); flame->eflags = (flame->eflags & ~MFE_VERTICALFLIP)|(player->mo->eflags & MFE_VERTICALFLIP); // not K_MatchGenericExtraFlags so that a stolen sneaker can be seen
flame->momx = 8; flame->momx = 8;
P_XYMovement(flame); P_XYMovement(flame);
@ -2463,7 +2464,7 @@ void K_SpawnSparkleTrail(mobj_t *mo)
P_SetTarget(&sparkle->target, mo); P_SetTarget(&sparkle->target, mo);
sparkle->destscale = mo->destscale; sparkle->destscale = mo->destscale;
P_SetScale(sparkle, mo->scale); P_SetScale(sparkle, mo->scale);
sparkle->eflags = (sparkle->eflags & ~MFE_VERTICALFLIP)|(mo->eflags & MFE_VERTICALFLIP); sparkle->eflags = (sparkle->eflags & ~MFE_VERTICALFLIP)|(mo->eflags & MFE_VERTICALFLIP); // not K_MatchGenericExtraFlags so that a stolen invincibility can be seen
sparkle->color = mo->color; sparkle->color = mo->color;
//sparkle->colorized = mo->colorized; //sparkle->colorized = mo->colorized;
} }
@ -2484,7 +2485,7 @@ void K_SpawnWipeoutTrail(mobj_t *mo, boolean translucent)
dust->angle = R_PointToAngle2(0,0,mo->momx,mo->momy); dust->angle = R_PointToAngle2(0,0,mo->momx,mo->momy);
dust->destscale = mo->scale; dust->destscale = mo->scale;
P_SetScale(dust, mo->scale); P_SetScale(dust, mo->scale);
dust->eflags = (dust->eflags & ~MFE_VERTICALFLIP)|(mo->eflags & MFE_VERTICALFLIP); dust->eflags = (dust->eflags & ~MFE_VERTICALFLIP)|(mo->eflags & MFE_VERTICALFLIP); // not K_MatchGenericExtraFlags because hyudoro shouldn't be able to wipeout
if (translucent) if (translucent)
dust->flags2 |= MF2_SHADOW; dust->flags2 |= MF2_SHADOW;
@ -4624,9 +4625,6 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
} }
} }
/*if (player->kartstuff[k_growshrinktimer] > 1)
player->powers[pw_flashing] = 2;*/
// Friction // Friction
if (player->speed > 0 && cmd->forwardmove == 0 && player->mo->friction == 59392) if (player->speed > 0 && cmd->forwardmove == 0 && player->mo->friction == 59392)
player->mo->friction += 4608; player->mo->friction += 4608;

View file

@ -8172,10 +8172,7 @@ void A_JawzChase(mobj_t *actor)
if (actor->tracer) if (actor->tracer)
{ {
if (!actor->tracer->health) if (actor->tracer->health)
P_SetTarget(&actor->tracer, NULL);
if (actor->tracer && actor->tracer->health)
{ {
mobj_t *ret; mobj_t *ret;
@ -8187,6 +8184,8 @@ void A_JawzChase(mobj_t *actor)
P_Thrust(actor, R_PointToAngle2(actor->x, actor->y, actor->tracer->x, actor->tracer->y), actor->info->speed); P_Thrust(actor, R_PointToAngle2(actor->x, actor->y, actor->tracer->x, actor->tracer->y), actor->info->speed);
return; return;
} }
else
P_SetTarget(&actor->tracer, NULL);
} }
if (actor->extravalue1) // Disable looking by setting this if (actor->extravalue1) // Disable looking by setting this