mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-01-29 12:40:40 +00:00
Final v1.0.2 commit (probably)
- Update chars.kart hash, AGAIN! - Fix spectators being visible on minimap when F12ing people - Optimize how splitscreen players are drawn on top of the minimap - Remove duplicated cvar registrations - Move cv_resynchattempts and cv_netticbuffer from D_ClientServerInit to D_RegisterServerCommands and D_RegisterClientCommands respectively, so they can save to config properly - Increase "Frequent" gametype switch frequency even more - "SRB2" version dehacked warning ignores srb2.srb
This commit is contained in:
parent
d389cececa
commit
4c8737da08
10 changed files with 41 additions and 52 deletions
|
@ -36,7 +36,7 @@
|
|||
/* Manually defined asset hashes for non-CMake builds
|
||||
* Last updated 2015 / 05 / 03 - SRB2 v2.1.15 - srb2.srb
|
||||
* Last updated 2018 / 12 / 23 - SRB2 v2.1.22 - patch.dta
|
||||
* Last updated 2019 / 01 / 16 - Kart v1.0.2 - Main assets
|
||||
* Last updated 2019 / 01 / 18 - Kart v1.0.2 - Main assets
|
||||
* Last updated 2019 / 01 / 15 - Kart v1.0.2 - patch.kart
|
||||
*/
|
||||
|
||||
|
@ -49,7 +49,7 @@
|
|||
// SRB2Kart-specific hashes
|
||||
#define ASSET_HASH_GFX_KART "99c39f223d84ebc78e67ab68f3bead95"
|
||||
#define ASSET_HASH_TEXTURES_KART "ec8e9b7535cf585afe72ef277b08f490"
|
||||
#define ASSET_HASH_CHARS_KART "a83ccd0fa172b1c01216560633bd0d6b"
|
||||
#define ASSET_HASH_CHARS_KART "e2c428347dde52858a3dacd29fc5b964"
|
||||
#define ASSET_HASH_MAPS_KART "1335cd064656aedca359cfbb5233ac4a"
|
||||
#ifdef USE_PATCH_KART
|
||||
#define ASSET_HASH_PATCH_KART "899aee1b63e731b7e2098406c85608b4"
|
||||
|
|
|
@ -3079,12 +3079,10 @@ void D_ClientServerInit(void)
|
|||
RegisterNetXCmd(XD_REMOVEPLAYER, Got_RemovePlayer);
|
||||
#ifndef NONET
|
||||
CV_RegisterVar(&cv_allownewplayer);
|
||||
CV_RegisterVar(&cv_netticbuffer);
|
||||
#ifdef VANILLAJOINNEXTROUND
|
||||
CV_RegisterVar(&cv_joinnextround);
|
||||
#endif
|
||||
CV_RegisterVar(&cv_showjoinaddress);
|
||||
CV_RegisterVar(&cv_resynchattempts);
|
||||
CV_RegisterVar(&cv_blamecfail);
|
||||
#ifdef DUMPCONSISTENCY
|
||||
CV_RegisterVar(&cv_dumpconsistency);
|
||||
|
|
|
@ -524,7 +524,7 @@ extern consvar_t
|
|||
#ifdef VANILLAJOINNEXTROUND
|
||||
cv_joinnextround,
|
||||
#endif
|
||||
cv_allownewplayer, cv_maxplayers, cv_resynchattempts, cv_blamecfail, cv_maxsend, cv_noticedownload, cv_downloadspeed;
|
||||
cv_netticbuffer, cv_allownewplayer, cv_maxplayers, cv_resynchattempts, cv_blamecfail, cv_maxsend, cv_noticedownload, cv_downloadspeed;
|
||||
|
||||
// Used in d_net, the only dependence
|
||||
tic_t ExpandTics(INT32 low);
|
||||
|
|
|
@ -647,6 +647,7 @@ void D_RegisterServerCommands(void)
|
|||
|
||||
// d_clisrv
|
||||
CV_RegisterVar(&cv_maxplayers);
|
||||
CV_RegisterVar(&cv_resynchattempts);
|
||||
CV_RegisterVar(&cv_maxsend);
|
||||
CV_RegisterVar(&cv_noticedownload);
|
||||
CV_RegisterVar(&cv_downloadspeed);
|
||||
|
@ -762,6 +763,7 @@ void D_RegisterClientCommands(void)
|
|||
#endif
|
||||
CV_RegisterVar(&cv_rollingdemos);
|
||||
CV_RegisterVar(&cv_netstat);
|
||||
CV_RegisterVar(&cv_netticbuffer);
|
||||
|
||||
#ifdef NETGAME_DEVMODE
|
||||
CV_RegisterVar(&cv_fishcake);
|
||||
|
@ -840,14 +842,6 @@ void D_RegisterClientCommands(void)
|
|||
CV_RegisterVar(&cv_addons_search_type);
|
||||
CV_RegisterVar(&cv_addons_search_case);
|
||||
|
||||
// filesrch.c
|
||||
CV_RegisterVar(&cv_addons_option);
|
||||
CV_RegisterVar(&cv_addons_folder);
|
||||
CV_RegisterVar(&cv_addons_md5);
|
||||
CV_RegisterVar(&cv_addons_showall);
|
||||
CV_RegisterVar(&cv_addons_search_type);
|
||||
CV_RegisterVar(&cv_addons_search_case);
|
||||
|
||||
// WARNING: the order is important when initialising mouse2
|
||||
// we need the mouse2port
|
||||
CV_RegisterVar(&cv_mouse2port);
|
||||
|
|
|
@ -33,6 +33,8 @@ extern consvar_t cv_skin3;
|
|||
extern consvar_t cv_playername4;
|
||||
extern consvar_t cv_playercolor4;
|
||||
extern consvar_t cv_skin4;
|
||||
// preferred number of players
|
||||
extern consvar_t cv_splitplayers;
|
||||
|
||||
#ifdef SEENAMES
|
||||
extern consvar_t cv_seenames, cv_allowseenames;
|
||||
|
|
|
@ -3707,7 +3707,8 @@ static void DEH_LoadDehackedFile(MYFILE *f, UINT16 wad)
|
|||
}
|
||||
else if (fastcmp(word, "SRB2"))
|
||||
{
|
||||
deh_warning("Patch is only compatible with base SRB2.");
|
||||
if (mainwads) // srb2.srb triggers this warning otherwise
|
||||
deh_warning("Patch is only compatible with base SRB2.");
|
||||
}
|
||||
// Clear all data in certain locations (mostly for unlocks)
|
||||
// Unless you REALLY want to piss people off,
|
||||
|
|
|
@ -3179,7 +3179,7 @@ INT16 G_SometimesGetDifferentGametype(void)
|
|||
default:
|
||||
// fallthrough - happens when clearing buffer, but needs a reasonable countdown if cvar is modified
|
||||
case 2: // frequent
|
||||
randmapbuffer[NUMMAPS] = 3; // ...every 1/2th-ish cup?
|
||||
randmapbuffer[NUMMAPS] = 2; // ...every 1/2th-ish cup?
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -66,7 +66,6 @@ extern consvar_t cv_turnaxis2,cv_moveaxis2,cv_brakeaxis2,cv_aimaxis2,cv_lookaxis
|
|||
extern consvar_t cv_turnaxis3,cv_moveaxis3,cv_brakeaxis3,cv_aimaxis3,cv_lookaxis3,cv_fireaxis3,cv_driftaxis3;
|
||||
extern consvar_t cv_turnaxis4,cv_moveaxis4,cv_brakeaxis4,cv_aimaxis4,cv_lookaxis4,cv_fireaxis4,cv_driftaxis4;
|
||||
extern consvar_t cv_ghost_besttime, cv_ghost_bestlap, cv_ghost_last, cv_ghost_guest, cv_ghost_staff;
|
||||
extern consvar_t cv_splitplayers;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
|
|
66
src/k_kart.c
66
src/k_kart.c
|
@ -7571,7 +7571,8 @@ static void K_drawKartMinimap(void)
|
|||
INT32 i = 0;
|
||||
INT32 x, y;
|
||||
INT32 minimaptrans, splitflags = (splitscreen == 3 ? 0 : V_SNAPTORIGHT); // flags should only be 0 when it's centered (4p split)
|
||||
boolean dop1later = false;
|
||||
SINT8 localplayers[4];
|
||||
SINT8 numlocalplayers = 0;
|
||||
|
||||
// Draw the HUD only when playing in a level.
|
||||
// hu_stuff needs this, unlike st_stuff.
|
||||
|
@ -7623,6 +7624,10 @@ static void K_drawKartMinimap(void)
|
|||
x -= SHORT(AutomapPic->leftoffset);
|
||||
y -= SHORT(AutomapPic->topoffset);
|
||||
|
||||
// initialize
|
||||
for (i = 0; i < 4; i++)
|
||||
localplayers[i] = -1;
|
||||
|
||||
// Player's tiny icons on the Automap. (drawn opposite direction so player 1 is drawn last in splitscreen)
|
||||
if (ghosts)
|
||||
{
|
||||
|
@ -7632,9 +7637,12 @@ static void K_drawKartMinimap(void)
|
|||
K_drawKartMinimapHead(g->mo, x, y, splitflags, AutomapPic);
|
||||
g = g->next;
|
||||
}
|
||||
|
||||
if (!stplyr->mo || stplyr->spectator) // do we need the latter..?
|
||||
return;
|
||||
dop1later = true;
|
||||
|
||||
localplayers[numlocalplayers] = stplyr-players;
|
||||
numlocalplayers++;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -7645,53 +7653,41 @@ static void K_drawKartMinimap(void)
|
|||
if (!players[i].mo || players[i].spectator)
|
||||
continue;
|
||||
|
||||
if (i == displayplayer || i == secondarydisplayplayer || i == thirddisplayplayer || i == fourthdisplayplayer) // don't draw our local players.
|
||||
if (i != displayplayer || splitscreen)
|
||||
{
|
||||
dop1later = true; // Do displayplayer later
|
||||
continue;
|
||||
if (G_BattleGametype() && players[i].kartstuff[k_bumper] <= 0)
|
||||
continue;
|
||||
|
||||
if (players[i].kartstuff[k_hyudorotimer] > 0)
|
||||
{
|
||||
if (!((players[i].kartstuff[k_hyudorotimer] < 1*TICRATE/2
|
||||
|| players[i].kartstuff[k_hyudorotimer] > hyudorotime-(1*TICRATE/2))
|
||||
&& !(leveltime & 1)))
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (G_BattleGametype() && players[i].kartstuff[k_bumper] <= 0)
|
||||
continue;
|
||||
if (players[i].kartstuff[k_hyudorotimer] > 0)
|
||||
if (i == displayplayer || i == secondarydisplayplayer || i == thirddisplayplayer || i == fourthdisplayplayer)
|
||||
{
|
||||
if (!((players[i].kartstuff[k_hyudorotimer] < 1*TICRATE/2
|
||||
|| players[i].kartstuff[k_hyudorotimer] > hyudorotime-(1*TICRATE/2))
|
||||
&& !(leveltime & 1)))
|
||||
continue;
|
||||
// Draw display players on top of everything else
|
||||
localplayers[numlocalplayers] = i;
|
||||
numlocalplayers++;
|
||||
continue;
|
||||
}
|
||||
|
||||
K_drawKartMinimapHead(players[i].mo, x, y, splitflags, AutomapPic);
|
||||
}
|
||||
}
|
||||
|
||||
if (!dop1later)
|
||||
return; // Don't need this
|
||||
|
||||
// draw our local players here, opaque.
|
||||
splitflags &= ~V_HUDTRANSHALF;
|
||||
splitflags |= V_HUDTRANS;
|
||||
for (i = MAXPLAYERS-1; i >= 0; i--)
|
||||
|
||||
for (i = 0; i < numlocalplayers; i++)
|
||||
{
|
||||
if (!(i == displayplayer || i == secondarydisplayplayer || i == thirddisplayplayer || i == fourthdisplayplayer))
|
||||
continue; // this doesn't interrest us
|
||||
|
||||
if (splitscreen > 1) // this only applies to splitscreen. When we play alone, we should always get drawn reguardless of what we're doing.
|
||||
{
|
||||
if (G_BattleGametype() && players[i].kartstuff[k_bumper] <= 0)
|
||||
continue;
|
||||
if (players[i].kartstuff[k_hyudorotimer] > 0)
|
||||
{
|
||||
if (!((players[i].kartstuff[k_hyudorotimer] < 1*TICRATE/2
|
||||
|| players[i].kartstuff[k_hyudorotimer] > hyudorotime-(1*TICRATE/2))
|
||||
&& !(leveltime & 1)))
|
||||
continue;
|
||||
}
|
||||
|
||||
K_drawKartMinimapHead(players[i].mo, x, y, splitflags, AutomapPic);
|
||||
}
|
||||
else
|
||||
K_drawKartMinimapHead(players[i].mo, x, y, splitflags, AutomapPic);
|
||||
if (i == -1)
|
||||
continue; // this doesn't interest us
|
||||
K_drawKartMinimapHead(players[localplayers[i]].mo, x, y, splitflags, AutomapPic);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -3167,7 +3167,6 @@ void M_Init(void)
|
|||
return;
|
||||
|
||||
// Menu hacks
|
||||
CV_RegisterVar(&cv_splitplayers);
|
||||
CV_RegisterVar(&cv_dummymenuplayer);
|
||||
CV_RegisterVar(&cv_dummyteam);
|
||||
CV_RegisterVar(&cv_dummyspectate);
|
||||
|
|
Loading…
Reference in a new issue