mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 11:10:47 +00:00
Prevent the reserved cheats from displaying a finished time and from clobbering personal map time records.
git-svn-id: https://svn.eduke32.com/eduke32@2729 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
d3a3c74112
commit
3a3284e2a3
1 changed files with 19 additions and 10 deletions
|
@ -7112,6 +7112,7 @@ FOUNDCHEAT:
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case CHEAT_RESERVED2:
|
case CHEAT_RESERVED2:
|
||||||
|
g_player[myconnectindex].ps->player_par = 0;
|
||||||
g_player[myconnectindex].ps->gm = MODE_EOL;
|
g_player[myconnectindex].ps->gm = MODE_EOL;
|
||||||
end_cheat();
|
end_cheat();
|
||||||
return;
|
return;
|
||||||
|
@ -7369,6 +7370,7 @@ FOUNDCHEAT:
|
||||||
case CHEAT_RESERVED:
|
case CHEAT_RESERVED:
|
||||||
case CHEAT_RESERVED3:
|
case CHEAT_RESERVED3:
|
||||||
ud.eog = 1;
|
ud.eog = 1;
|
||||||
|
g_player[myconnectindex].ps->player_par = 0;
|
||||||
g_player[myconnectindex].ps->gm |= MODE_EOL;
|
g_player[myconnectindex].ps->gm |= MODE_EOL;
|
||||||
KB_FlushKeyBoardQueue();
|
KB_FlushKeyBoardQueue();
|
||||||
return;
|
return;
|
||||||
|
@ -11349,7 +11351,7 @@ FRAGBONUS:
|
||||||
|
|
||||||
playerbest = CONFIG_GetMapBestTime(MapInfo[ud.volume_number*MAXLEVELS+ud.last_level-1].filename);
|
playerbest = CONFIG_GetMapBestTime(MapInfo[ud.volume_number*MAXLEVELS+ud.last_level-1].filename);
|
||||||
|
|
||||||
if (g_player[myconnectindex].ps->player_par < playerbest || playerbest < 0)
|
if (g_player[myconnectindex].ps->player_par > 0 && (g_player[myconnectindex].ps->player_par < playerbest || playerbest < 0))
|
||||||
CONFIG_SetMapBestTime(MapInfo[ud.volume_number*MAXLEVELS+ud.last_level-1].filename, g_player[myconnectindex].ps->player_par);
|
CONFIG_SetMapBestTime(MapInfo[ud.volume_number*MAXLEVELS+ud.last_level-1].filename, g_player[myconnectindex].ps->player_par);
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@ -11446,7 +11448,9 @@ FRAGBONUS:
|
||||||
if (totalclock > (60*3))
|
if (totalclock > (60*3))
|
||||||
{
|
{
|
||||||
yy = zz = 59;
|
yy = zz = 59;
|
||||||
|
|
||||||
gametext(10,yy+9,"Your Time:",0,2+8+16);
|
gametext(10,yy+9,"Your Time:",0,2+8+16);
|
||||||
|
|
||||||
yy+=10;
|
yy+=10;
|
||||||
if (!(ud.volume_number == 0 && ud.last_level-1 == 7))
|
if (!(ud.volume_number == 0 && ud.last_level-1 == 7))
|
||||||
{
|
{
|
||||||
|
@ -11461,7 +11465,7 @@ FRAGBONUS:
|
||||||
}
|
}
|
||||||
if (playerbest > 0)
|
if (playerbest > 0)
|
||||||
{
|
{
|
||||||
gametext(10,yy+9,g_player[myconnectindex].ps->player_par<playerbest?"Prev Best Time:":"Your Best Time:",0,2+8+16);
|
gametext(10,yy+9,(g_player[myconnectindex].ps->player_par > 0 && g_player[myconnectindex].ps->player_par < playerbest)?"Prev Best Time:":"Your Best Time:",0,2+8+16);
|
||||||
yy += 10;
|
yy += 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11477,6 +11481,8 @@ FRAGBONUS:
|
||||||
S_PlaySound(PIPEBOMB_EXPLODE);
|
S_PlaySound(PIPEBOMB_EXPLODE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (g_player[myconnectindex].ps->player_par > 0)
|
||||||
|
{
|
||||||
Bsprintf(tempbuf,"%0*d:%02d.%02d",clockpad,
|
Bsprintf(tempbuf,"%0*d:%02d.%02d",clockpad,
|
||||||
(g_player[myconnectindex].ps->player_par/(REALGAMETICSPERSEC*60)),
|
(g_player[myconnectindex].ps->player_par/(REALGAMETICSPERSEC*60)),
|
||||||
(g_player[myconnectindex].ps->player_par/REALGAMETICSPERSEC)%60,
|
(g_player[myconnectindex].ps->player_par/REALGAMETICSPERSEC)%60,
|
||||||
|
@ -11485,6 +11491,9 @@ FRAGBONUS:
|
||||||
gametext((320>>2)+71,yy+9,tempbuf,0,2+8+16);
|
gametext((320>>2)+71,yy+9,tempbuf,0,2+8+16);
|
||||||
if (g_player[myconnectindex].ps->player_par < playerbest)
|
if (g_player[myconnectindex].ps->player_par < playerbest)
|
||||||
gametext((320>>2)+89+(clockpad*24),yy+9,"New record!",0,2+8+16);
|
gametext((320>>2)+89+(clockpad*24),yy+9,"New record!",0,2+8+16);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
gametextpalbits((320>>2)+71,yy+9,"Cheated!",0,2,2+8+16);
|
||||||
yy+=10;
|
yy+=10;
|
||||||
|
|
||||||
if (!(ud.volume_number == 0 && ud.last_level-1 == 7))
|
if (!(ud.volume_number == 0 && ud.last_level-1 == 7))
|
||||||
|
|
Loading…
Reference in a new issue