More lenient checkpoints
Doesn't really belong in this branch but shut up! I'm lazy :p
This commit is contained in:
parent
a2767fe341
commit
888515331f
|
@ -575,6 +575,7 @@ 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);
|
||||||
|
|
||||||
|
@ -706,6 +707,7 @@ 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);
|
||||||
|
|
||||||
|
|
|
@ -219,6 +219,7 @@ 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;
|
||||||
|
|
||||||
|
|
|
@ -477,6 +477,7 @@ 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
|
||||||
|
|
||||||
|
|
|
@ -2142,6 +2142,7 @@ 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;
|
||||||
|
|
||||||
if (rendermode == render_soft)
|
if (rendermode == render_soft)
|
||||||
V_SetPaletteLump(GetPalette()); // Reset the palette
|
V_SetPaletteLump(GetPalette()); // Reset the palette
|
||||||
|
@ -2182,6 +2183,7 @@ 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;
|
||||||
|
@ -2239,6 +2241,7 @@ 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;
|
||||||
|
@ -2296,6 +2299,7 @@ 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;
|
||||||
|
@ -2665,6 +2669,7 @@ 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))
|
||||||
{
|
{
|
||||||
|
@ -3714,6 +3719,7 @@ void G_InitNew(UINT8 pultmode, const char *mapname, boolean resetplayer, boolean
|
||||||
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 (netgame || multiplayer)
|
if (netgame || multiplayer)
|
||||||
{
|
{
|
||||||
|
|
|
@ -246,6 +246,8 @@ 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"))
|
||||||
|
@ -513,6 +515,8 @@ 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"))
|
||||||
|
|
|
@ -1213,9 +1213,9 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
// In circuit, player must have touched all previous starposts
|
// SRB2kart: make sure the player will have enough checkpoints to touch
|
||||||
if (circuitmap
|
if (circuitmap
|
||||||
&& special->health - player->starpostnum > 1)
|
&& 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)
|
||||||
|
@ -1242,6 +1242,7 @@ 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++;
|
||||||
P_ClearStarPost(special->health);
|
P_ClearStarPost(special->health);
|
||||||
|
|
||||||
// Find all starposts in the level with this value.
|
// Find all starposts in the level with this value.
|
||||||
|
|
|
@ -4110,12 +4110,12 @@ DoneSection2:
|
||||||
|
|
||||||
case 10: // Finish Line
|
case 10: // Finish Line
|
||||||
// SRB2kart - 150117
|
// SRB2kart - 150117
|
||||||
if (gametype == GT_RACE && (player->starpostnum == numstarposts || player->exiting))
|
if (gametype == GT_RACE && (player->starpostcount >= numstarposts/2 || player->exiting))
|
||||||
player->kartstuff[k_starpostwp] = player->kartstuff[k_waypoint] = 0;
|
player->kartstuff[k_starpostwp] = player->kartstuff[k_waypoint] = 0;
|
||||||
//
|
//
|
||||||
if (gametype == GT_RACE && !player->exiting)
|
if (gametype == GT_RACE && !player->exiting)
|
||||||
{
|
{
|
||||||
if (player->starpostnum == numstarposts) // Must have touched all the starposts
|
if (player->starpostcount >= numstarposts/2) // srb2kart: must have touched *enough* starposts (was originally "(player->starpostnum == numstarposts)")
|
||||||
{
|
{
|
||||||
player->laps++;
|
player->laps++;
|
||||||
player->kartstuff[k_lapanimation] = 80;
|
player->kartstuff[k_lapanimation] = 80;
|
||||||
|
@ -4134,6 +4134,7 @@ 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 New Issue