mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-25 20:01:04 +00:00
Merge branch 'more-fixes-jug' into 'next'
Various gameplay & stability fixes See merge request KartKrew/Kart-Public!256
This commit is contained in:
commit
a0f0b473ab
6 changed files with 44 additions and 41 deletions
|
@ -515,6 +515,10 @@ ifdef ZDEBUG
|
|||
CPPFLAGS+=-DZDEBUG
|
||||
endif
|
||||
|
||||
ifdef DUMPCONSISTENCY
|
||||
CPPFLAGS+=-DDUMPCONSISTENCY
|
||||
endif
|
||||
|
||||
ifdef DEVELOP
|
||||
CPPFLAGS+=-DDEVELOP
|
||||
endif
|
||||
|
|
|
@ -1228,7 +1228,7 @@ static inline void CL_DrawConnectionStatus(void)
|
|||
cltext = M_GetText("Server full, waiting for a slot...");
|
||||
else
|
||||
cltext = M_GetText("Requesting to join...");
|
||||
|
||||
|
||||
break;
|
||||
#ifdef HAVE_CURL
|
||||
case CL_PREPAREHTTPFILES:
|
||||
|
@ -2029,7 +2029,7 @@ void CL_QueryServerList (msg_server_t *server_list)
|
|||
|
||||
static void M_ConfirmConnect(event_t *ev)
|
||||
{
|
||||
#ifndef NONET
|
||||
#ifndef NONET
|
||||
if (ev->type == ev_keydown)
|
||||
{
|
||||
if (ev->data1 == ' ' || ev->data1 == 'y' || ev->data1 == KEY_ENTER || ev->data1 == gamecontrol[gc_accelerate][0] || ev->data1 == gamecontrol[gc_accelerate][1])
|
||||
|
@ -2052,7 +2052,7 @@ static void M_ConfirmConnect(event_t *ev)
|
|||
}
|
||||
else
|
||||
cl_mode = CL_LOADFILES;
|
||||
|
||||
|
||||
M_ClearMenus(true);
|
||||
}
|
||||
else if (ev->data1 == 'n' || ev->data1 == KEY_ESCAPE|| ev->data1 == gamecontrol[gc_brake][0] || ev->data1 == gamecontrol[gc_brake][1])
|
||||
|
@ -2300,7 +2300,7 @@ static boolean CL_ServerConnectionTicker(const char *tmpsave, tic_t *oldtic, tic
|
|||
{
|
||||
boolean waitmore;
|
||||
INT32 i;
|
||||
|
||||
|
||||
#ifdef NONET
|
||||
(void)tmpsave;
|
||||
#endif
|
||||
|
@ -2337,7 +2337,7 @@ static boolean CL_ServerConnectionTicker(const char *tmpsave, tic_t *oldtic, tic
|
|||
{
|
||||
curl_transfers++;
|
||||
}
|
||||
|
||||
|
||||
cl_mode = CL_DOWNLOADHTTPFILES;
|
||||
}
|
||||
break;
|
||||
|
@ -5011,7 +5011,7 @@ FILESTAMP
|
|||
{
|
||||
node = (SINT8)doomcom->remotenode;
|
||||
|
||||
if (netbuffer->packettype == PT_CLIENTJOIN && server)
|
||||
if (netbuffer->packettype == PT_CLIENTJOIN && server && !levelloading)
|
||||
{
|
||||
HandleConnect(node);
|
||||
continue;
|
||||
|
@ -5222,7 +5222,7 @@ static void CL_SendClientKeepAlive(void)
|
|||
static void SV_SendServerKeepAlive(void)
|
||||
{
|
||||
INT32 n;
|
||||
|
||||
|
||||
for (n = 1; n < MAXNETNODES; n++)
|
||||
{
|
||||
if (nodeingame[n])
|
||||
|
@ -5769,7 +5769,7 @@ FILESTAMP
|
|||
{
|
||||
SV_SendServerKeepAlive();
|
||||
}
|
||||
|
||||
|
||||
// No else because no tics are being run and we can't resynch during this
|
||||
|
||||
Net_AckTicker();
|
||||
|
|
|
@ -341,15 +341,14 @@ static void DRPC_GotServerIP(UINT32 address)
|
|||
{
|
||||
const unsigned char * p = (const unsigned char *)&address;
|
||||
sprintf(self_ip, "%u.%u.%u.%u:%u", p[0], p[1], p[2], p[3], current_port);
|
||||
DRPC_UpdatePresence();
|
||||
}
|
||||
|
||||
/*--------------------------------------------------
|
||||
static const char *DRPC_GetServerIP(void)
|
||||
|
||||
Retrieves the IP address of the server that you're
|
||||
connected to. Will attempt to use curl for getting your
|
||||
own IP address, if it's not yours.
|
||||
connected to. Will attempt to use STUN for getting your
|
||||
own IP address.
|
||||
--------------------------------------------------*/
|
||||
static const char *DRPC_GetServerIP(void)
|
||||
{
|
||||
|
@ -362,8 +361,7 @@ static const char *DRPC_GetServerIP(void)
|
|||
{
|
||||
// We're not the server, so we could successfully get the IP!
|
||||
// No need to do anything else :)
|
||||
sprintf(self_ip, "%s:%u", address, current_port);
|
||||
return self_ip;
|
||||
return address;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -442,25 +440,6 @@ void DRPC_UpdatePresence(void)
|
|||
// Server info
|
||||
if (netgame)
|
||||
{
|
||||
if (DRPC_InvitesAreAllowed() == true)
|
||||
{
|
||||
const char *join;
|
||||
|
||||
// Grab the host's IP for joining.
|
||||
if ((join = DRPC_GetServerIP()) != NULL)
|
||||
{
|
||||
char *xorjoin = DRPC_XORIPString(join);
|
||||
discordPresence.joinSecret = xorjoin;
|
||||
free(xorjoin);
|
||||
|
||||
joinSecretSet = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (cv_advertise.value)
|
||||
{
|
||||
discordPresence.state = "Public";
|
||||
|
@ -473,6 +452,18 @@ void DRPC_UpdatePresence(void)
|
|||
discordPresence.partyId = server_context; // Thanks, whoever gave us Mumble support, for implementing the EXACT thing Discord wanted for this field!
|
||||
discordPresence.partySize = D_NumPlayers(); // Players in server
|
||||
discordPresence.partyMax = discordInfo.maxPlayers; // Max players
|
||||
|
||||
if (DRPC_InvitesAreAllowed() == true)
|
||||
{
|
||||
const char *join;
|
||||
|
||||
// Grab the host's IP for joining.
|
||||
if ((join = DRPC_GetServerIP()) != NULL)
|
||||
{
|
||||
discordPresence.joinSecret = DRPC_XORIPString(join);
|
||||
joinSecretSet = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -15757,7 +15757,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
0, // mass
|
||||
0, // damage
|
||||
sfx_None, // activesound
|
||||
MF_NOBLOCKMAP|MF_BOUNCE|MF_SCENERY|MF_DONTENCOREMAP, // flags
|
||||
MF_NOBLOCKMAP|MF_NOCLIP|MF_BOUNCE|MF_SCENERY|MF_DONTENCOREMAP, // flags
|
||||
S_NULL // raisestate
|
||||
},
|
||||
|
||||
|
@ -15904,7 +15904,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
|
|||
sfx_tossed, // seesound
|
||||
8, // reactiontime
|
||||
sfx_None, // attacksound
|
||||
256*FRACUNIT, // painstate
|
||||
S_NULL, // painstate
|
||||
100, // painchance
|
||||
sfx_None, // painsound
|
||||
S_NULL, // meleestate
|
||||
|
|
18
src/k_kart.c
18
src/k_kart.c
|
@ -894,7 +894,7 @@ static INT32 K_KartGetItemOdds(UINT8 pos, SINT8 item, fixed_t mashed, boolean sp
|
|||
POWERITEMODDS(newodds);
|
||||
break;
|
||||
case KITEM_THUNDERSHIELD:
|
||||
if (thunderisout)
|
||||
if (thunderisout || COOLDOWNONSTART)
|
||||
newodds = 0;
|
||||
else
|
||||
POWERITEMODDS(newodds);
|
||||
|
@ -952,6 +952,7 @@ static INT32 K_FindUseodds(player_t *player, fixed_t mashed, INT32 pingame, INT3
|
|||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
{
|
||||
if (playeringame[i] && !players[i].spectator && players[i].mo
|
||||
&& players[i].kartstuff[k_position] != 0
|
||||
&& players[i].kartstuff[k_position] < player->kartstuff[k_position])
|
||||
pdis += P_AproxDistance(P_AproxDistance(players[i].mo->x - player->mo->x,
|
||||
players[i].mo->y - player->mo->y),
|
||||
|
@ -4526,7 +4527,7 @@ static void K_UpdateEngineSounds(player_t *player, ticcmd_t *cmd)
|
|||
volume = FixedDiv(volume * FRACUNIT, volumedampen) / FRACUNIT;
|
||||
}
|
||||
|
||||
if (volume <= 0)
|
||||
if (volume <= 0)
|
||||
{
|
||||
// Don't need to play the sound at all.
|
||||
return;
|
||||
|
@ -5061,6 +5062,13 @@ INT32 K_GetKartDriftSparkValue(player_t *player)
|
|||
static void K_KartDrift(player_t *player, boolean onground)
|
||||
{
|
||||
fixed_t minspeed = (10 * player->mo->scale);
|
||||
|
||||
// Grown players taking yellow spring panels will go below minspeed for one tic,
|
||||
// and will then wrongdrift or have their sparks removed because of this.
|
||||
// This fixes this problem.
|
||||
if (player->kartstuff[k_pogospring] == 2 && player->mo->scale > mapobjectscale)
|
||||
minspeed = FixedMul(10<<FRACBITS, mapobjectscale);
|
||||
|
||||
INT32 dsone = K_GetKartDriftSparkValue(player);
|
||||
INT32 dstwo = dsone*2;
|
||||
INT32 dsthree = dstwo*2;
|
||||
|
@ -5116,14 +5124,14 @@ static void K_KartDrift(player_t *player, boolean onground)
|
|||
{
|
||||
// Starting left drift
|
||||
player->kartstuff[k_drift] = 1;
|
||||
player->kartstuff[k_driftend] = player->kartstuff[k_driftcharge] = 0;
|
||||
player->kartstuff[k_driftend] = 0;
|
||||
}
|
||||
else if ((player->cmd.driftturn < 0) && player->speed > minspeed && player->kartstuff[k_jmp] == 1
|
||||
&& (player->kartstuff[k_drift] == 0 || player->kartstuff[k_driftend] == 1)) // && player->kartstuff[k_drift] != -1)
|
||||
{
|
||||
// Starting right drift
|
||||
player->kartstuff[k_drift] = -1;
|
||||
player->kartstuff[k_driftend] = player->kartstuff[k_driftcharge] = 0;
|
||||
player->kartstuff[k_driftend] = 0;
|
||||
}
|
||||
else if (player->kartstuff[k_jmp] == 0) // || player->kartstuff[k_turndir] == 0)
|
||||
{
|
||||
|
@ -5968,7 +5976,7 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
|||
{
|
||||
if (player->kartstuff[k_offroad])
|
||||
player->mo->friction -= 4912;
|
||||
if (player->kartstuff[k_wipeoutslow] == 1)
|
||||
if (player->kartstuff[k_wipeoutslow] == 1 && player->kartstuff[k_pogospring] == 0)
|
||||
player->mo->friction -= 9824;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2691,8 +2691,8 @@ boolean M_Responder(event_t *ev)
|
|||
M_QuitSRB2(0);
|
||||
return true;
|
||||
|
||||
case KEY_F11: // Gamma Level
|
||||
CV_AddValue(&cv_usegamma, 1);
|
||||
case KEY_F11: // Fullscreen
|
||||
CV_AddValue(&cv_fullscreen, 1);
|
||||
return true;
|
||||
|
||||
// Spymode on F12 handled in game logic
|
||||
|
|
Loading…
Reference in a new issue