mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-01-17 23:21:05 +00:00
Merge remote-tracking branch 'refs/remotes/origin/master' into sal-misc
This commit is contained in:
commit
11b59348eb
5 changed files with 90 additions and 16 deletions
18
src/k_kart.c
18
src/k_kart.c
|
@ -1342,7 +1342,7 @@ fixed_t K_3dKartMovement(player_t *player, boolean onground, fixed_t forwardmove
|
|||
fixed_t p_speed = K_GetKartSpeed(player, true);
|
||||
fixed_t p_accel = K_GetKartAccel(player);
|
||||
|
||||
if (!onground && !(player->kartstuff[k_feather] & 2)) return 0; // If the player isn't on the ground, there is no change in speed
|
||||
if (!onground) return 0; // If the player isn't on the ground, there is no change in speed
|
||||
|
||||
// ACCELCODE!!!1!11!
|
||||
oldspeed = R_PointToDist2(0, 0, player->rmomx, player->rmomy); // FixedMul(P_AproxDistance(player->rmomx, player->rmomy), player->mo->scale);
|
||||
|
@ -2391,9 +2391,6 @@ INT16 K_GetKartTurnValue(player_t *player, INT16 turnvalue)
|
|||
if (player->spectator)
|
||||
return turnvalue;
|
||||
|
||||
if (player->kartstuff[k_feather] & 2 && !P_IsObjectOnGround(player->mo))
|
||||
adjustangle /= 2;
|
||||
|
||||
if (player->kartstuff[k_drift] != 0 && P_IsObjectOnGround(player->mo))
|
||||
{
|
||||
// If we're drifting we have a completely different turning value
|
||||
|
@ -3319,6 +3316,19 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
|||
|
||||
K_KartDrift(player, onground);
|
||||
|
||||
// Feather strafing
|
||||
if (player->kartstuff[k_feather] & 2)
|
||||
{
|
||||
fixed_t strafe = 0;
|
||||
fixed_t strength = FRACUNIT/32;
|
||||
if (cmd->buttons & BT_DRIFTLEFT)
|
||||
strafe--;
|
||||
if (cmd->buttons & BT_DRIFTRIGHT)
|
||||
strafe++;
|
||||
strength += FixedDiv(player->speed, K_GetKartSpeed(player, true));
|
||||
P_Thrust(player->mo, player->mo->angle-ANGLE_90, strafe*strength);
|
||||
}
|
||||
|
||||
// Quick Turning
|
||||
// You can't turn your kart when you're not moving.
|
||||
// So now it's time to burn some rubber!
|
||||
|
|
|
@ -4159,6 +4159,8 @@ static void M_Options(INT32 choice)
|
|||
|
||||
// if the player is playing _at all_, disable the erase data options
|
||||
OP_DataOptionsMenu[1].status = (Playing()) ? (IT_GRAYEDOUT) : (IT_STRING|IT_SUBMENU);
|
||||
// SRB2Kart: Same with the "Play Credits" option
|
||||
OP_MainMenu[6].status = (Playing()) ? (IT_GRAYEDOUT) : (IT_STRING|IT_CALL);
|
||||
|
||||
OP_MainDef.prevMenu = currentMenu;
|
||||
M_SetupNextMenu(&OP_MainDef);
|
||||
|
|
76
src/r_segs.c
76
src/r_segs.c
|
@ -743,6 +743,12 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor)
|
|||
// Render FOF sides kinda like normal sides, with the frac and step and everything
|
||||
// NOTE: INT64 instead of fixed_t because overflow concerns
|
||||
INT64 top_frac, top_step, bottom_frac, bottom_step;
|
||||
// skew FOF walls with slopes?
|
||||
boolean slopeskew = false;
|
||||
fixed_t ffloortextureslide = 0;
|
||||
INT32 oldx = -1;
|
||||
fixed_t left_top, left_bottom; // needed here for slope skewing
|
||||
pslope_t *skewslope = NULL;
|
||||
#endif
|
||||
|
||||
void (*colfunc_2s) (column_t *);
|
||||
|
@ -966,21 +972,71 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor)
|
|||
mceilingclip = ds->sprtopclip;
|
||||
dc_texheight = textureheight[texnum]>>FRACBITS;
|
||||
|
||||
#ifdef ESLOPE
|
||||
// calculate both left ends
|
||||
if (*pfloor->t_slope)
|
||||
left_top = P_GetZAt(*pfloor->t_slope, ds->leftpos.x, ds->leftpos.y) - viewz;
|
||||
else
|
||||
left_top = *pfloor->topheight - viewz;
|
||||
|
||||
if (*pfloor->b_slope)
|
||||
left_bottom = P_GetZAt(*pfloor->b_slope, ds->leftpos.x, ds->leftpos.y) - viewz;
|
||||
else
|
||||
left_bottom = *pfloor->bottomheight - viewz;
|
||||
skewslope = *pfloor->t_slope; // skew using top slope by default
|
||||
if (newline)
|
||||
{
|
||||
if (newline->flags & ML_DONTPEGTOP)
|
||||
slopeskew = true;
|
||||
}
|
||||
else if (pfloor->master->flags & ML_DONTPEGTOP)
|
||||
slopeskew = true;
|
||||
|
||||
if (slopeskew)
|
||||
dc_texturemid = left_top;
|
||||
else
|
||||
#endif
|
||||
dc_texturemid = *pfloor->topheight - viewz;
|
||||
|
||||
if (newline)
|
||||
{
|
||||
offsetvalue = sides[newline->sidenum[0]].rowoffset;
|
||||
if (newline->flags & ML_DONTPEGBOTTOM)
|
||||
{
|
||||
#ifdef ESLOPE
|
||||
skewslope = *pfloor->b_slope; // skew using bottom slope
|
||||
if (slopeskew)
|
||||
dc_texturemid = left_bottom;
|
||||
else
|
||||
#endif
|
||||
offsetvalue -= *pfloor->topheight - *pfloor->bottomheight;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
offsetvalue = sides[pfloor->master->sidenum[0]].rowoffset;
|
||||
if (curline->linedef->flags & ML_DONTPEGBOTTOM)
|
||||
{
|
||||
#ifdef ESLOPE
|
||||
skewslope = *pfloor->b_slope; // skew using bottom slope
|
||||
if (slopeskew)
|
||||
dc_texturemid = left_bottom;
|
||||
else
|
||||
#endif
|
||||
offsetvalue -= *pfloor->topheight - *pfloor->bottomheight;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef ESLOPE
|
||||
if (slopeskew)
|
||||
{
|
||||
angle_t lineangle = R_PointToAngle2(curline->v1->x, curline->v1->y, curline->v2->x, curline->v2->y);
|
||||
|
||||
if (skewslope)
|
||||
ffloortextureslide = FixedMul(skewslope->zdelta, FINECOSINE((lineangle-skewslope->xydirection)>>ANGLETOFINESHIFT));
|
||||
}
|
||||
#endif
|
||||
|
||||
dc_texturemid += offsetvalue;
|
||||
|
||||
// Texture must be cached before setting colfunc_2s,
|
||||
|
@ -999,23 +1055,18 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor)
|
|||
#ifdef ESLOPE
|
||||
// Set heights according to plane, or slope, whichever
|
||||
{
|
||||
fixed_t left_top, right_top, left_bottom, right_bottom;
|
||||
fixed_t right_top, right_bottom;
|
||||
|
||||
// calculate right ends now
|
||||
if (*pfloor->t_slope)
|
||||
{
|
||||
left_top = P_GetZAt(*pfloor->t_slope, ds->leftpos.x, ds->leftpos.y) - viewz;
|
||||
right_top = P_GetZAt(*pfloor->t_slope, ds->rightpos.x, ds->rightpos.y) - viewz;
|
||||
}
|
||||
else
|
||||
left_top = right_top = *pfloor->topheight - viewz;
|
||||
right_top = *pfloor->topheight - viewz;
|
||||
|
||||
if (*pfloor->b_slope)
|
||||
{
|
||||
left_bottom = P_GetZAt(*pfloor->b_slope, ds->leftpos.x, ds->leftpos.y) - viewz;
|
||||
right_bottom = P_GetZAt(*pfloor->b_slope, ds->rightpos.x, ds->rightpos.y) - viewz;
|
||||
}
|
||||
else
|
||||
left_bottom = right_bottom = *pfloor->bottomheight - viewz;
|
||||
right_bottom = *pfloor->bottomheight - viewz;
|
||||
|
||||
// using INT64 to avoid 32bit overflow
|
||||
top_frac = (INT64)centeryfrac - (((INT64)left_top * ds->scale1) >> FRACBITS);
|
||||
|
@ -1039,6 +1090,13 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor)
|
|||
{
|
||||
if (maskedtexturecol[dc_x] != INT16_MAX)
|
||||
{
|
||||
#ifdef ESLOPE
|
||||
if (ffloortextureslide) { // skew FOF walls
|
||||
if (oldx != -1)
|
||||
dc_texturemid += FixedMul(ffloortextureslide, (maskedtexturecol[oldx]-maskedtexturecol[dc_x])<<FRACBITS);
|
||||
oldx = dc_x;
|
||||
}
|
||||
#endif
|
||||
// SoM: New code does not rely on R_DrawColumnShadowed_8 which
|
||||
// will (hopefully) put less strain on the stack.
|
||||
if (dc_numlights)
|
||||
|
|
|
@ -103,6 +103,10 @@ static inline VOID MakeCodeWritable(VOID)
|
|||
|
||||
\return int
|
||||
*/
|
||||
#if defined (__GNUC__) && (__GNUC__ >= 4)
|
||||
#pragma GCC diagnostic ignored "-Wmissing-noreturn"
|
||||
#endif
|
||||
|
||||
#ifdef FORCESDLMAIN
|
||||
int SDL_main(int argc, char **argv)
|
||||
#else
|
||||
|
|
|
@ -470,9 +470,9 @@ sfxinfo_t S_sfx[NUMSFX] =
|
|||
{"lkt1", true, 192, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
{"lkt2", true, 192, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
{"lkt3", true, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
{"kart1", false, 48, 16, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
{"kart2", false, 48, 16, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
{"kart3", false, 48, 16, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
{"kart1", false, 48, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
{"kart2", false, 48, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
{"kart3", false, 48, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
{"mlap", true, 127, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
{"sboost", true, 90, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
{"mush", false, 90, 0, -1, NULL, 0, -1, -1, LUMPERROR},
|
||||
|
|
Loading…
Reference in a new issue