Merge branch 'gitpls' into Saturn-Testing

This commit is contained in:
Alug committed 2025-03-15 16:27:00 +01:00
commit 473c70fd70
10 files changed
+99 -19

No files matched your search

+1 -1
View File
@@ -108,7 +108,7 @@ UINT32 playerpingtable[MAXPLAYERS]; //table of player latency values.
static tic_t reference_lag;
static UINT8 spike_time;
tic_t lowest_lag;
tic_t simulated_lag; // just for ping readout without netticbuffer added
tic_t simulated_lag;
boolean server_lagless;
static void Lagless_OnChange(void)
+2
View File
@@ -553,6 +553,8 @@ typedef struct player_s
tic_t driftsparkGrowTimer;
fixed_t spinoutrot; // When a player spins out, this value increments modulus 360.
fixed_t fovadd; // adjust FOV for hw rendering
} player_t;
+1
View File
@@ -180,6 +180,7 @@ extern consvar_t cv_sliptideroll;
extern consvar_t cv_slamsound;
extern consvar_t cv_sloperolldist;
extern consvar_t cv_sparkroll;
extern consvar_t cv_spinoutroll;
extern consvar_t cv_cechotoggle;
+39 -10
View File
@@ -140,6 +140,7 @@ static CV_PossibleValue_t sloperoll_cons_t[] = {{0, "Off"}, {1, "Players"}, {2,
consvar_t cv_sloperoll = {"sloperoll", "Off", CV_SAVE|CV_CALL, sloperoll_cons_t, PDistort_menu_Onchange, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_sparkroll = {"sparkroll", "Off", CV_SAVE|CV_CALL, CV_OnOff, PDistort_menu_Onchange, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_sliptideroll = {"sliptideroll", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_spinoutroll = {"spinoutroll", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
//hardcode saltyhop mhhm
static void saltyhop_onchange(void);
@@ -8826,7 +8827,9 @@ static void K_DrawKartPositionNum(INT32 num)
}
if (splitscreen || cv_smallposnum.value || wheeloffs)
{
scale /= 2;
}
W = FixedMul(W<<FRACBITS, scale)>>FRACBITS;
@@ -8915,7 +8918,9 @@ static void K_DrawKartPositionNum(INT32 num)
}
}
else
{
localpatch = kp_positionnum[num % 10][0];
}
V_DrawFixedPatch((fx<<FRACBITS) + ((overtake && flipdraw) ? (SHORT(localpatch->width)*scale/2) : 0), (fy<<FRACBITS) + ((overtake && flipvdraw) ? (SHORT(localpatch->height)*scale/2) : 0), scale, V_HUDTRANSHALF|fflags, localpatch, NULL);
// ^ if we overtake as p1 or p3 in splitscren, we shift it so that it doesn't go off screen.
@@ -10108,18 +10113,27 @@ static void K_drawKartMinimapHead(mobj_t *mo, INT32 x, INT32 y, INT32 flags)
// The number being divided by is for how fast it moves.
// The higher the number, the slower it moves.
// am xpos & ypos are the icon's starting position. Withouht
// am xpos & ypos are the icon's starting position. Without
// it, they wouldn't 'spawn' on the top-right side of the HUD.
UINT8 skin = 0;
boolean skinlocal = mo->skinlocal;
UINT8 skinnum = 0;
const boolean skinlocal = mo->skinlocal;
const skin_t *skin = (skin_t*)(mo->localskin ? mo->localskin : mo->skin);
fixed_t amnumxpos, amnumypos;
INT32 amxpos, amypos, wntdamxpos, wntdamypos;
fixed_t scale = FRACUNIT;
patch_t *minimaphead = NULL;
#ifdef ROTSPRITE
angle_t rollangle = 0;
INT32 rot = 0;
#endif
if (mo->skin)
skin = ((skin_t*)(mo->localskin ? mo->localskin : mo->skin))-(skinlocal ? localskins : skins);
skinnum = (skin-(skinlocal ? localskins : skins));
minimaphead = (skinlocal ? localfacemmapprefix : facemmapprefix)[skinnum];
amnumxpos = (FixedMul(lerp(mo->old_x, mo->x), minimapinfo.zoom) - minimapinfo.offs_x);
amnumypos = -(FixedMul(lerp(mo->old_y, mo->y), minimapinfo.zoom) - minimapinfo.offs_y);
@@ -10127,8 +10141,8 @@ static void K_drawKartMinimapHead(mobj_t *mo, INT32 x, INT32 y, INT32 flags)
if (encoremode)
amnumxpos = -amnumxpos;
amxpos = amnumxpos + ((x + (SHORT(minimapinfo.minimap_pic->width)-SHORT((skinlocal ? localfacemmapprefix : facemmapprefix)[skin]->width)) / 2)<<FRACBITS);
amypos = amnumypos + ((y + (SHORT(minimapinfo.minimap_pic->height)-SHORT((skinlocal ? localfacemmapprefix : facemmapprefix)[skin]->height)) / 2)<<FRACBITS);
amxpos = amnumxpos + ((x + (SHORT(minimapinfo.minimap_pic->width)-SHORT(minimaphead->width)) / 2)<<FRACBITS);
amypos = amnumypos + ((y + (SHORT(minimapinfo.minimap_pic->height)-SHORT(minimaphead->height)) / 2)<<FRACBITS);
if (cv_showminimapnames.value && mo->player && !(modeattacking || gamestate == GS_TIMEATTACK))
{
@@ -10141,22 +10155,37 @@ static void K_drawKartMinimapHead(mobj_t *mo, INT32 x, INT32 y, INT32 flags)
if (cv_minihead.value)
{
amxpos += (SHORT((skinlocal ? localfacemmapprefix : facemmapprefix)[skin]->width) / 4)<<FRACBITS;
amypos += (SHORT((skinlocal ? localfacemmapprefix : facemmapprefix)[skin]->height) / 4)<<FRACBITS;
amxpos += (SHORT(minimaphead->width) / 4)<<FRACBITS;
amypos += (SHORT(minimaphead->height) / 4)<<FRACBITS;
scale /= 2;
}
#ifdef ROTSPRITE
if (cv_spinoutroll.value && mo->player)
{
// Rotate counterclockwise.
rollangle = FixedAngle(mo->player->spinoutrot * -1);
rot = R_GetRollAngle(rollangle);
if (rot)
{
minimaphead = W_CachePatchNameRotated(skin->facemmap, rot, PU_STATIC);
}
}
#endif
if (!mo->color) // 'default' color
V_DrawSciencePatch(amxpos, amypos, flags, ((skinlocal) ? localfacemmapprefix : facemmapprefix)[skin], scale);
V_DrawSciencePatch(amxpos, amypos, flags, minimaphead, scale);
else
{
UINT8 *colormap;
if (mo->colorized)
colormap = R_GetTranslationColormap(TC_RAINBOW, mo->color, GTC_CACHE);
else
colormap = R_GetLocalTranslationColormap(mo->skin, mo->localskin, mo->color, GTC_CACHE, skinlocal);
V_DrawFixedPatch(amxpos, amypos, scale, flags, ((skinlocal) ? localfacemmapprefix : facemmapprefix)[skin], colormap);
V_DrawFixedPatch(amxpos, amypos, scale, flags, minimaphead, colormap);
if (mo->player
&& ((G_RaceGametype() && mo->player->kartstuff[k_position] == spbplace)
+8 -5
View File
@@ -2363,15 +2363,16 @@ static menuitem_t OP_SaturnHudMenu[] =
{IT_STRING | IT_CVAR, NULL, "Show Names on Minimap", &cv_showminimapnames, 135},
{IT_STRING | IT_CVAR, NULL, "Small Minimap Players", &cv_minihead, 140},
{IT_STRING | IT_CVAR, NULL, "Spin Minimap Icons", &cv_spinoutroll, 150},
{IT_STRING | IT_CVAR, NULL, "Beta Intermissionscreen", &cv_betainterscreen, 150},
{IT_STRING | IT_CVAR, NULL, "Beta Intermissionscreen", &cv_betainterscreen, 160},
{IT_STRING | IT_CVAR, NULL, "Show Director Prompt", &cv_showdirectorhud, 160},
{IT_STRING | IT_CVAR, NULL, "Show Director Prompt", &cv_showdirectorhud, 170},
{IT_STRING | IT_SUBMENU, NULL, "Nametags...", &OP_NametagDef, 170},
{IT_STRING | IT_SUBMENU, NULL, "Driftgauge...", &OP_DriftGaugeDef, 175},
{IT_STRING | IT_SUBMENU, NULL, "Nametags...", &OP_NametagDef, 180},
{IT_STRING | IT_SUBMENU, NULL, "Driftgauge...", &OP_DriftGaugeDef, 185},
{IT_SUBMENU|IT_STRING, NULL, "Hud Offsets...", &OP_HudOffsetDef, 185},
{IT_SUBMENU|IT_STRING, NULL, "Hud Offsets...", &OP_HudOffsetDef, 195},
};
static const char* OP_SaturnHudTooltips[] =
@@ -2395,6 +2396,7 @@ static const char* OP_SaturnHudTooltips[] =
"Show the big Cecho Messages.",
"Show player names on the minimap.",
"Minimize the player icons on the minimap.",
"Erratically rotate player icons during spinouts.",
"Make the Intermission screen look like in beta versions of Kart!\nEither with background or just the rest.",
"Show the Director Toggle prompt when spectating.",
"Nametag Options.",
@@ -2423,6 +2425,7 @@ enum
sh_cechotogle,
sh_mapname,
sh_smallmap,
sh_iconspinout,
sh_betainter,
sh_directorhud,
sh_nametagmen,
+2
View File
@@ -10733,6 +10733,8 @@ void P_SpawnPlayer(INT32 playernum)
p->hitemtimer = 0;
p->hitemvictim = 255;
p->spinoutrot = 0;
if (G_BattleGametype()) // SRB2kart
{
mobj_t *overheadarrow = P_SpawnMobj(mobj->x, mobj->y, mobj->z + P_GetPlayerHeight(p)+16*FRACUNIT, MT_PLAYERARROW);
+8
View File
@@ -2264,13 +2264,21 @@ static void P_LevelInitStuff(boolean reloadinggamestate)
players[i].realtime = racecountdown = exitcountdown = 0;
<<<<<<< HEAD
<<<<<<< HEAD
for (INT32 j = 0; j < LAP__MAX; j++)
{
players[i].laptime[j] = 0;
}
players[i].driftsparkGrowTimer = 0;
=======
// Neptune
players[i].spinoutrot = 0;
>>>>>>> 052dcb263 (Add a cvar for minimap icon spinouts)
=======
>>>>>>> 432dcd3a3 (Refactor to prevent desynchs)
players[i].gotcontinue = false;
players[i].xtralife = players[i].deadtimer = players[i].numboxes = players[i].totalring = players[i].laps = 0;
+28
View File
@@ -4430,6 +4430,9 @@ DoABarrelRoll (player_t *player)
player->tilt = slope;
}
#define SPINOUTROTSPEED (24 * FRACUNIT)
#define MAXSPINROT (360 * FRACUNIT)
//
// P_PlayerThink
//
@@ -4573,6 +4576,31 @@ void P_PlayerThink(player_t *player)
}
}
if (player->kartstuff[k_spinouttimer] && (player->spinoutrot == 0))
{
player->spinoutrot = SPINOUTROTSPEED;
}
// MKWii-styled icon spinouts: do a full 360 rotation before stopping.
if (player->spinoutrot && (player->spinoutrot < MAXSPINROT))
{
if ((player->spinoutrot + SPINOUTROTSPEED) >= MAXSPINROT)
{
if (player->kartstuff[k_spinouttimer])
{
player->spinoutrot = (player->spinoutrot + SPINOUTROTSPEED) % MAXSPINROT;
}
else
{
player->spinoutrot = 0;
}
}
else
{
player->spinoutrot += SPINOUTROTSPEED;
}
}
// If it is set, start subtracting
// Don't allow it to go back to 0
if (player->exiting > 1 && (player->exiting < raceexittime+2 || !G_RaceGametype())) // SRB2kart - "&& player->exiting > 1"
+1
View File
@@ -1566,6 +1566,7 @@ void R_RegisterEngineStuff(void)
CV_RegisterVar(&cv_sliptideroll);
CV_RegisterVar(&cv_sloperolldist);
CV_RegisterVar(&cv_sparkroll);
CV_RegisterVar(&cv_spinoutroll);
CV_RegisterVar(&cv_showhud);
CV_RegisterVar(&cv_translucenthud);
+9 -3
View File
@@ -1125,12 +1125,15 @@ lumpnum_t W_CheckNumForName(const char *name)
break; //found it
}
if (check == INT16_MAX) return LUMPERROR;
if (check == INT16_MAX)
{
return LUMPERROR;
}
else
{
// Update the cache.
lumpnumcacheindex = (lumpnumcacheindex + 1) & (LUMPNUMCACHESIZE - 1);
memset(lumpnumcache[lumpnumcacheindex].lumpname, '\0', 32);
memset(lumpnumcache[lumpnumcacheindex].lumpname, '\0', LUMPNUMCACHENAME);
strncpy(lumpnumcache[lumpnumcacheindex].lumpname, name, 8);
lumpnumcache[lumpnumcacheindex].lumpnum = (i<<16)+check;
@@ -1174,7 +1177,10 @@ lumpnum_t W_CheckNumForLongName(const char *name)
}
}
if (check == INT16_MAX) return LUMPERROR;
if (check == INT16_MAX)
{
return LUMPERROR;
}
else
{
if (strlen(name) < 32)