This commit is contained in:
JugadorXEI 2021-08-05 17:27:57 +02:00
commit 31b3a9ac90
5 changed files with 30 additions and 23 deletions

View file

@ -515,6 +515,10 @@ ifdef ZDEBUG
CPPFLAGS+=-DZDEBUG CPPFLAGS+=-DZDEBUG
endif endif
ifdef DUMPCONSISTENCY
CPPFLAGS+=-DDUMPCONSISTENCY
endif
ifdef DEVELOP ifdef DEVELOP
CPPFLAGS+=-DDEVELOP CPPFLAGS+=-DDEVELOP
endif endif

View file

@ -5011,7 +5011,7 @@ FILESTAMP
{ {
node = (SINT8)doomcom->remotenode; node = (SINT8)doomcom->remotenode;
if (netbuffer->packettype == PT_CLIENTJOIN && server) if (netbuffer->packettype == PT_CLIENTJOIN && server && !levelloading)
{ {
HandleConnect(node); HandleConnect(node);
continue; continue;

View file

@ -361,8 +361,7 @@ static const char *DRPC_GetServerIP(void)
{ {
// We're not the server, so we could successfully get the IP! // We're not the server, so we could successfully get the IP!
// No need to do anything else :) // No need to do anything else :)
sprintf(self_ip, "%s:%u", address, current_port); return address;
return self_ip;
} }
} }
@ -461,10 +460,7 @@ void DRPC_UpdatePresence(void)
// Grab the host's IP for joining. // Grab the host's IP for joining.
if ((join = DRPC_GetServerIP()) != NULL) if ((join = DRPC_GetServerIP()) != NULL)
{ {
char *xorjoin = DRPC_XORIPString(join); discordPresence.joinSecret = DRPC_XORIPString(join);
discordPresence.joinSecret = xorjoin;
free(xorjoin);
joinSecretSet = true; joinSecretSet = true;
} }
} }

View file

@ -15757,7 +15757,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
0, // mass 0, // mass
0, // damage 0, // damage
sfx_None, // activesound 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 S_NULL // raisestate
}, },
@ -15904,7 +15904,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
sfx_tossed, // seesound sfx_tossed, // seesound
8, // reactiontime 8, // reactiontime
sfx_None, // attacksound sfx_None, // attacksound
256*FRACUNIT, // painstate S_NULL, // painstate
100, // painchance 100, // painchance
sfx_None, // painsound sfx_None, // painsound
S_NULL, // meleestate S_NULL, // meleestate

View file

@ -894,7 +894,7 @@ static INT32 K_KartGetItemOdds(UINT8 pos, SINT8 item, fixed_t mashed, boolean sp
POWERITEMODDS(newodds); POWERITEMODDS(newodds);
break; break;
case KITEM_THUNDERSHIELD: case KITEM_THUNDERSHIELD:
if (thunderisout) if (thunderisout || COOLDOWNONSTART)
newodds = 0; newodds = 0;
else else
POWERITEMODDS(newodds); 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++) for (i = 0; i < MAXPLAYERS; i++)
{ {
if (playeringame[i] && !players[i].spectator && players[i].mo if (playeringame[i] && !players[i].spectator && players[i].mo
&& players[i].kartstuff[k_position] != 0
&& players[i].kartstuff[k_position] < player->kartstuff[k_position]) && players[i].kartstuff[k_position] < player->kartstuff[k_position])
pdis += P_AproxDistance(P_AproxDistance(players[i].mo->x - player->mo->x, pdis += P_AproxDistance(P_AproxDistance(players[i].mo->x - player->mo->x,
players[i].mo->y - player->mo->y), players[i].mo->y - player->mo->y),
@ -3258,7 +3259,7 @@ static mobj_t *K_ThrowKartItem(player_t *player, boolean missile, mobjtype_t map
angle_t fa = player->mo->angle>>ANGLETOFINESHIFT; angle_t fa = player->mo->angle>>ANGLETOFINESHIFT;
fixed_t HEIGHT = (20 + (dir*10))*mapobjectscale + (player->mo->momz*P_MobjFlip(player->mo)); fixed_t HEIGHT = (20 + (dir*10))*mapobjectscale + (player->mo->momz*P_MobjFlip(player->mo));
P_SetObjectMomZ(mo, HEIGHT, false); mo->momz = HEIGHT*P_MobjFlip(mo);
mo->momx = player->mo->momx + FixedMul(FINECOSINE(fa), PROJSPEED*dir); mo->momx = player->mo->momx + FixedMul(FINECOSINE(fa), PROJSPEED*dir);
mo->momy = player->mo->momy + FixedMul(FINESINE(fa), PROJSPEED*dir); mo->momy = player->mo->momy + FixedMul(FINESINE(fa), PROJSPEED*dir);
@ -5065,6 +5066,12 @@ static void K_KartDrift(player_t *player, boolean onground)
INT32 dstwo = dsone*2; INT32 dstwo = dsone*2;
INT32 dsthree = dstwo*2; INT32 dsthree = dstwo*2;
// 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);
// Drifting is actually straffing + automatic turning. // Drifting is actually straffing + automatic turning.
// Holding the Jump button will enable drifting. // Holding the Jump button will enable drifting.
@ -5116,14 +5123,14 @@ static void K_KartDrift(player_t *player, boolean onground)
{ {
// Starting left drift // Starting left drift
player->kartstuff[k_drift] = 1; 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 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) && (player->kartstuff[k_drift] == 0 || player->kartstuff[k_driftend] == 1)) // && player->kartstuff[k_drift] != -1)
{ {
// Starting right drift // Starting right drift
player->kartstuff[k_drift] = -1; 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) else if (player->kartstuff[k_jmp] == 0) // || player->kartstuff[k_turndir] == 0)
{ {
@ -5968,7 +5975,7 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
{ {
if (player->kartstuff[k_offroad]) if (player->kartstuff[k_offroad])
player->mo->friction -= 4912; 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; player->mo->friction -= 9824;
} }
} }
@ -6028,7 +6035,7 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
if (leveltime < starttime+10) if (leveltime < starttime+10)
{ {
player->mo->scalespeed = mapobjectscale/12; player->mo->scalespeed = mapobjectscale/12;
player->mo->destscale = mapobjectscale + (player->kartstuff[k_boostcharge]*131); player->mo->destscale = mapobjectscale + (FixedMul(mapobjectscale, player->kartstuff[k_boostcharge]*131));
if (cv_kartdebugshrink.value && !modeattacking && !player->bot) if (cv_kartdebugshrink.value && !modeattacking && !player->bot)
player->mo->destscale = (6*player->mo->destscale)/8; player->mo->destscale = (6*player->mo->destscale)/8;
} }