mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-01-14 13:51:31 +00:00
Require 3/5ths of checkpoints instead of 1/2
This broke MKSC in a minor way if you skip a specific item set and then take the big cut... I'll let it go anyway since its an improvement everywhere else.
This commit is contained in:
parent
28488cc0dc
commit
e2a9aeb34c
9 changed files with 5 additions and 24 deletions
|
@ -619,7 +619,6 @@ static inline void resynch_write_player(resynch_pak *rsp, const size_t i)
|
||||||
rsp->starposty = SHORT(players[i].starposty);
|
rsp->starposty = SHORT(players[i].starposty);
|
||||||
rsp->starpostz = SHORT(players[i].starpostz);
|
rsp->starpostz = SHORT(players[i].starpostz);
|
||||||
rsp->starpostnum = LONG(players[i].starpostnum);
|
rsp->starpostnum = LONG(players[i].starpostnum);
|
||||||
rsp->starpostcount = LONG(players[i].starpostcount);
|
|
||||||
rsp->starposttime = (tic_t)LONG(players[i].starposttime);
|
rsp->starposttime = (tic_t)LONG(players[i].starposttime);
|
||||||
rsp->starpostangle = (angle_t)LONG(players[i].starpostangle);
|
rsp->starpostangle = (angle_t)LONG(players[i].starpostangle);
|
||||||
|
|
||||||
|
@ -755,7 +754,6 @@ static void resynch_read_player(resynch_pak *rsp)
|
||||||
players[i].starposty = SHORT(rsp->starposty);
|
players[i].starposty = SHORT(rsp->starposty);
|
||||||
players[i].starpostz = SHORT(rsp->starpostz);
|
players[i].starpostz = SHORT(rsp->starpostz);
|
||||||
players[i].starpostnum = LONG(rsp->starpostnum);
|
players[i].starpostnum = LONG(rsp->starpostnum);
|
||||||
players[i].starpostcount = LONG(rsp->starpostcount);
|
|
||||||
players[i].starposttime = (tic_t)LONG(rsp->starposttime);
|
players[i].starposttime = (tic_t)LONG(rsp->starposttime);
|
||||||
players[i].starpostangle = (angle_t)LONG(rsp->starpostangle);
|
players[i].starpostangle = (angle_t)LONG(rsp->starpostangle);
|
||||||
|
|
||||||
|
|
|
@ -251,7 +251,6 @@ typedef struct
|
||||||
INT16 starposty;
|
INT16 starposty;
|
||||||
INT16 starpostz;
|
INT16 starpostz;
|
||||||
INT32 starpostnum;
|
INT32 starpostnum;
|
||||||
INT32 starpostcount;
|
|
||||||
tic_t starposttime;
|
tic_t starposttime;
|
||||||
angle_t starpostangle;
|
angle_t starpostangle;
|
||||||
|
|
||||||
|
|
|
@ -515,7 +515,6 @@ typedef struct player_s
|
||||||
INT16 starposty;
|
INT16 starposty;
|
||||||
INT16 starpostz;
|
INT16 starpostz;
|
||||||
INT32 starpostnum; // The number of the last starpost you hit
|
INT32 starpostnum; // The number of the last starpost you hit
|
||||||
INT32 starpostcount; // SRB2kart: how many did you hit?
|
|
||||||
tic_t starposttime; // Your time when you hit the starpost
|
tic_t starposttime; // Your time when you hit the starpost
|
||||||
angle_t starpostangle; // Angle that the starpost is facing - you respawn facing this way
|
angle_t starpostangle; // Angle that the starpost is facing - you respawn facing this way
|
||||||
|
|
||||||
|
|
|
@ -2266,7 +2266,6 @@ static inline void G_PlayerFinishLevel(INT32 player)
|
||||||
p->starposty = 0;
|
p->starposty = 0;
|
||||||
p->starpostz = 0;
|
p->starpostz = 0;
|
||||||
p->starpostnum = 0;
|
p->starpostnum = 0;
|
||||||
p->starpostcount = 0;
|
|
||||||
|
|
||||||
// SRB2kart: Increment the "matches played" counter.
|
// SRB2kart: Increment the "matches played" counter.
|
||||||
if (player == consoleplayer)
|
if (player == consoleplayer)
|
||||||
|
@ -2318,7 +2317,6 @@ void G_PlayerReborn(INT32 player)
|
||||||
INT16 starposty;
|
INT16 starposty;
|
||||||
INT16 starpostz;
|
INT16 starpostz;
|
||||||
INT32 starpostnum;
|
INT32 starpostnum;
|
||||||
INT32 starpostcount;
|
|
||||||
INT32 starpostangle;
|
INT32 starpostangle;
|
||||||
fixed_t jumpfactor;
|
fixed_t jumpfactor;
|
||||||
INT32 exiting;
|
INT32 exiting;
|
||||||
|
@ -2382,7 +2380,6 @@ void G_PlayerReborn(INT32 player)
|
||||||
starposty = players[player].starposty;
|
starposty = players[player].starposty;
|
||||||
starpostz = players[player].starpostz;
|
starpostz = players[player].starpostz;
|
||||||
starpostnum = players[player].starpostnum;
|
starpostnum = players[player].starpostnum;
|
||||||
starpostcount = players[player].starpostcount;
|
|
||||||
starpostangle = players[player].starpostangle;
|
starpostangle = players[player].starpostangle;
|
||||||
jumpfactor = players[player].jumpfactor;
|
jumpfactor = players[player].jumpfactor;
|
||||||
thokitem = players[player].thokitem;
|
thokitem = players[player].thokitem;
|
||||||
|
@ -2474,7 +2471,6 @@ void G_PlayerReborn(INT32 player)
|
||||||
p->starposty = starposty;
|
p->starposty = starposty;
|
||||||
p->starpostz = starpostz;
|
p->starpostz = starpostz;
|
||||||
p->starpostnum = starpostnum;
|
p->starpostnum = starpostnum;
|
||||||
p->starpostcount = starpostcount;
|
|
||||||
p->starpostangle = starpostangle;
|
p->starpostangle = starpostangle;
|
||||||
p->jumpfactor = jumpfactor;
|
p->jumpfactor = jumpfactor;
|
||||||
p->exiting = exiting;
|
p->exiting = exiting;
|
||||||
|
@ -2938,7 +2934,6 @@ void G_DoReborn(INT32 playernum)
|
||||||
player->starposty = 0;
|
player->starposty = 0;
|
||||||
player->starpostz = 0;
|
player->starpostz = 0;
|
||||||
player->starpostnum = 0;
|
player->starpostnum = 0;
|
||||||
player->starpostcount = 0;
|
|
||||||
}
|
}
|
||||||
if (!countdowntimeup && (mapheaderinfo[gamemap-1]->levelflags & LF_NORELOAD))
|
if (!countdowntimeup && (mapheaderinfo[gamemap-1]->levelflags & LF_NORELOAD))
|
||||||
{
|
{
|
||||||
|
@ -4326,7 +4321,6 @@ void G_InitNew(UINT8 pencoremode, const char *mapname, boolean resetplayer, bool
|
||||||
players[i].playerstate = PST_REBORN;
|
players[i].playerstate = PST_REBORN;
|
||||||
players[i].starpostangle = players[i].starpostnum = players[i].starposttime = 0;
|
players[i].starpostangle = players[i].starpostnum = players[i].starposttime = 0;
|
||||||
players[i].starpostx = players[i].starposty = players[i].starpostz = 0;
|
players[i].starpostx = players[i].starposty = players[i].starpostz = 0;
|
||||||
players[i].starpostcount = 0; // srb2kart
|
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
if (netgame || multiplayer)
|
if (netgame || multiplayer)
|
||||||
|
|
|
@ -7982,10 +7982,10 @@ static void K_drawCheckpointDebugger(void)
|
||||||
if (stplyr != &players[displayplayer]) // only for p1
|
if (stplyr != &players[displayplayer]) // only for p1
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if ((numstarposts/2 + stplyr->starpostnum) >= numstarposts)
|
if (stplyr->starpostnum >= (numstarposts - (2*numstarposts)/5))
|
||||||
V_DrawString(8, 184, 0, va("Checkpoint: %d / %d (Can finish)", stplyr->starpostnum, numstarposts));
|
V_DrawString(8, 184, 0, va("Checkpoint: %d / %d (Can finish)", stplyr->starpostnum, numstarposts));
|
||||||
else
|
else
|
||||||
V_DrawString(8, 184, 0, va("Checkpoint: %d / %d (Skip: %d)", stplyr->starpostnum, numstarposts, (numstarposts/2 + stplyr->starpostnum)));
|
V_DrawString(8, 184, 0, va("Checkpoint: %d / %d (Skip: %d)", stplyr->starpostnum, numstarposts, ((2*numstarposts)/5 + stplyr->starpostnum)));
|
||||||
V_DrawString(8, 192, 0, va("Waypoint dist: Prev %d, Next %d", stplyr->kartstuff[k_prevcheck], stplyr->kartstuff[k_nextcheck]));
|
V_DrawString(8, 192, 0, va("Waypoint dist: Prev %d, Next %d", stplyr->kartstuff[k_prevcheck], stplyr->kartstuff[k_nextcheck]));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -246,8 +246,6 @@ static int player_get(lua_State *L)
|
||||||
lua_pushinteger(L, plr->starpostz);
|
lua_pushinteger(L, plr->starpostz);
|
||||||
else if (fastcmp(field,"starpostnum"))
|
else if (fastcmp(field,"starpostnum"))
|
||||||
lua_pushinteger(L, plr->starpostnum);
|
lua_pushinteger(L, plr->starpostnum);
|
||||||
else if (fastcmp(field,"starpostcount"))
|
|
||||||
lua_pushinteger(L, plr->starpostcount);
|
|
||||||
else if (fastcmp(field,"starposttime"))
|
else if (fastcmp(field,"starposttime"))
|
||||||
lua_pushinteger(L, plr->starposttime);
|
lua_pushinteger(L, plr->starposttime);
|
||||||
else if (fastcmp(field,"starpostangle"))
|
else if (fastcmp(field,"starpostangle"))
|
||||||
|
@ -519,8 +517,6 @@ static int player_set(lua_State *L)
|
||||||
plr->starpostz = (INT16)luaL_checkinteger(L, 3);
|
plr->starpostz = (INT16)luaL_checkinteger(L, 3);
|
||||||
else if (fastcmp(field,"starpostnum"))
|
else if (fastcmp(field,"starpostnum"))
|
||||||
plr->starpostnum = (INT32)luaL_checkinteger(L, 3);
|
plr->starpostnum = (INT32)luaL_checkinteger(L, 3);
|
||||||
else if (fastcmp(field,"starpostcount"))
|
|
||||||
plr->starpostcount = (INT32)luaL_checkinteger(L, 3);
|
|
||||||
else if (fastcmp(field,"starposttime"))
|
else if (fastcmp(field,"starposttime"))
|
||||||
plr->starposttime = (tic_t)luaL_checkinteger(L, 3);
|
plr->starposttime = (tic_t)luaL_checkinteger(L, 3);
|
||||||
else if (fastcmp(field,"starpostangle"))
|
else if (fastcmp(field,"starpostangle"))
|
||||||
|
|
|
@ -1425,8 +1425,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
// SRB2kart: make sure the player will have enough checkpoints to touch
|
// SRB2kart: make sure the player will have enough checkpoints to touch
|
||||||
if (circuitmap
|
if (circuitmap && special->health >= ((2*numstarposts)/5 + player->starpostnum))
|
||||||
&& special->health >= (numstarposts/2 + player->starpostnum))
|
|
||||||
{
|
{
|
||||||
// blatant reuse of a variable that's normally unused in circuit
|
// blatant reuse of a variable that's normally unused in circuit
|
||||||
if (!player->tossdelay)
|
if (!player->tossdelay)
|
||||||
|
@ -1453,7 +1452,6 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
||||||
player->starpostz = special->z>>FRACBITS;
|
player->starpostz = special->z>>FRACBITS;
|
||||||
player->starpostangle = special->angle;
|
player->starpostangle = special->angle;
|
||||||
player->starpostnum = special->health;
|
player->starpostnum = special->health;
|
||||||
player->starpostcount++;
|
|
||||||
|
|
||||||
//S_StartSound(toucher, special->info->painsound);
|
//S_StartSound(toucher, special->info->painsound);
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -198,7 +198,6 @@ static void P_NetArchivePlayers(void)
|
||||||
WRITEINT16(save_p, players[i].starposty);
|
WRITEINT16(save_p, players[i].starposty);
|
||||||
WRITEINT16(save_p, players[i].starpostz);
|
WRITEINT16(save_p, players[i].starpostz);
|
||||||
WRITEINT32(save_p, players[i].starpostnum);
|
WRITEINT32(save_p, players[i].starpostnum);
|
||||||
WRITEINT32(save_p, players[i].starpostcount);
|
|
||||||
WRITEANGLE(save_p, players[i].starpostangle);
|
WRITEANGLE(save_p, players[i].starpostangle);
|
||||||
|
|
||||||
WRITEANGLE(save_p, players[i].angle_pos);
|
WRITEANGLE(save_p, players[i].angle_pos);
|
||||||
|
@ -382,7 +381,6 @@ static void P_NetUnArchivePlayers(void)
|
||||||
players[i].starposty = READINT16(save_p);
|
players[i].starposty = READINT16(save_p);
|
||||||
players[i].starpostz = READINT16(save_p);
|
players[i].starpostz = READINT16(save_p);
|
||||||
players[i].starpostnum = READINT32(save_p);
|
players[i].starpostnum = READINT32(save_p);
|
||||||
players[i].starpostcount = READINT32(save_p);
|
|
||||||
players[i].starpostangle = READANGLE(save_p);
|
players[i].starpostangle = READANGLE(save_p);
|
||||||
|
|
||||||
players[i].angle_pos = READANGLE(save_p);
|
players[i].angle_pos = READANGLE(save_p);
|
||||||
|
|
|
@ -4190,12 +4190,12 @@ DoneSection2:
|
||||||
|
|
||||||
case 10: // Finish Line
|
case 10: // Finish Line
|
||||||
// SRB2kart - 150117
|
// SRB2kart - 150117
|
||||||
if (G_RaceGametype() && (player->starpostcount >= numstarposts/2 || player->exiting))
|
if (G_RaceGametype() && (player->starpostnum >= (numstarposts - (2*numstarposts)/5) || player->exiting))
|
||||||
player->kartstuff[k_starpostwp] = player->kartstuff[k_waypoint] = 0;
|
player->kartstuff[k_starpostwp] = player->kartstuff[k_waypoint] = 0;
|
||||||
//
|
//
|
||||||
if (G_RaceGametype() && !player->exiting)
|
if (G_RaceGametype() && !player->exiting)
|
||||||
{
|
{
|
||||||
if (player->starpostcount >= numstarposts/2) // srb2kart: must have touched *enough* starposts (was originally "(player->starpostnum == numstarposts)")
|
if (player->starpostnum >= (numstarposts - (2*numstarposts)/5)) // srb2kart: must have touched *enough* starposts (was originally "(player->starpostnum == numstarposts)")
|
||||||
{
|
{
|
||||||
UINT8 nump = 0;
|
UINT8 nump = 0;
|
||||||
|
|
||||||
|
@ -4244,7 +4244,6 @@ DoneSection2:
|
||||||
// SRB2kart 200117
|
// SRB2kart 200117
|
||||||
player->starpostangle = player->starpostnum = 0;
|
player->starpostangle = player->starpostnum = 0;
|
||||||
player->starpostx = player->starposty = player->starpostz = 0;
|
player->starpostx = player->starposty = player->starpostz = 0;
|
||||||
player->starpostcount = 0;
|
|
||||||
//except the time!
|
//except the time!
|
||||||
player->starposttime = player->realtime;
|
player->starposttime = player->realtime;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue