diff --git a/polymer/build/include/build.h b/polymer/build/include/build.h index 3a33968b3..00890a37c 100644 --- a/polymer/build/include/build.h +++ b/polymer/build/include/build.h @@ -437,7 +437,7 @@ void clearallviews(int dacol); void drawmapview(int dax, int day, int zoome, short ang); void rotatesprite(int sx, int sy, int z, short a, short picnum, signed char dashade, char dapalnum, char dastat, int cx1, int cy1, int cx2, int cy2); void drawline256(int x1, int y1, int x2, int y2, char col); -void printext16(int xpos, int ypos, short col, short backcol, char *name, char fontsize); +int printext16(int xpos, int ypos, short col, short backcol, char *name, char fontsize); void printext256(int xpos, int ypos, short col, short backcol, char *name, char fontsize); int clipmove(int *x, int *y, int *z, short *sectnum, int xvect, int yvect, int walldist, int ceildist, int flordist, unsigned int cliptype); diff --git a/polymer/build/src/engine.c b/polymer/build/src/engine.c index 267d0a391..40a6b05bc 100644 --- a/polymer/build/src/engine.c +++ b/polymer/build/src/engine.c @@ -11502,7 +11502,7 @@ void draw2dscreen(int posxe, int posye, short ange, int zoome, short gride) // // printext16 // -void printext16(int xpos, int ypos, short col, short backcol, char *name, char fontsize) +int printext16(int xpos, int ypos, short col, short backcol, char *name, char fontsize) { int stx, i, x, y, charxsiz, ocol = col, obackcol = backcol; char *fontptr, *letptr, *ptr; @@ -11593,6 +11593,8 @@ void printext16(int xpos, int ypos, short col, short backcol, char *name, char f stx += charxsiz; } enddrawing(); //}}} + + return stx; } diff --git a/polymer/eduke32/source/astub.c b/polymer/eduke32/source/astub.c index 0d92cfafb..51001d79b 100644 --- a/polymer/eduke32/source/astub.c +++ b/polymer/eduke32/source/astub.c @@ -43,7 +43,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include #endif -#define BUILDDATE " 20080907" +#define BUILDDATE " 20080912" #define VERSION " 1.2.0devel" static int floor_over_floor; @@ -1546,7 +1546,7 @@ ENDFOR1: inumlines; i++) { Bmemcpy(disptext[i], helppage[curhp]->line[j], 80); - printext16(8,ydim-overridepm16y+28+i*9,15, + printext16(8,ydim-overridepm16y+28+i*9,12, (j==highlightline && curhp==highlighthp && totalclock-lasthighlighttime<120*5)?1:-1, disptext[i],0); @@ -8238,7 +8238,7 @@ int parsealphabets(scriptfile *script) } if (scriptfile_getsymbol(script,&k)) break; - if (i>126 || j<33) break; + if (i>126 || j<33) break; for (; i<=j && k=33 && i<=126) @@ -8851,7 +8851,7 @@ static void Keys2d3d(void) { SHELLEXECUTEINFOA sinfo; char *prog = "eduke32"; - char *param = " -map autosave.map"; + char *param = " -map autosave.map -noinstancechecking"; char *fullparam; int slen; @@ -8869,7 +8869,7 @@ static void Keys2d3d(void) ExtPreSaveMap(); saveboard("autosave.map",&posx,&posy,&posz,&ang,&cursectnum); message("Board saved to AUTOSAVE.MAP. Starting Eduke32..."); - + Bmemset(&sinfo, 0, sizeof(sinfo)); sinfo.cbSize = sizeof(sinfo); sinfo.fMask = SEE_MASK_FLAG_NO_UI; @@ -9956,35 +9956,54 @@ static void EditSpriteData(short spritenum) // Build edit +static char *FuncMenuStrings[] = +{ + " Replace invalid tiles", + " Delete all spr of tile #", + " Set map sky shade", + " Set map sky height", + " Global Z coord shift", + " Resize selection", + " Global shade divide", + " Global visibility divide " +}; + +#define MENU_Y_SPACING 8 +#define MENU_BASE_Y 16 + static void FuncMenuOpts(void) { - char snotbuf[80]; + int x = 8; + int y = MENU_BASE_Y+16; + int i = 0; + // int x2 = 0; +// static int x2_max = 0; - Bsprintf(snotbuf,"Special functions"); - printext16(8,ydim-STATUS2DSIZ+32,11,-1,snotbuf,0); - Bsprintf(snotbuf,"Replace invalid tiles"); - printext16(8,ydim-STATUS2DSIZ+48,11,-1,snotbuf,0); - Bsprintf(snotbuf,"Delete all spr of tile #"); - printext16(8,ydim-STATUS2DSIZ+56,11,-1,snotbuf,0); - Bsprintf(snotbuf,"Global sky shade"); - printext16(8,ydim-STATUS2DSIZ+64,11,-1,snotbuf,0); - Bsprintf(snotbuf,"Global sky height"); - printext16(8,ydim-STATUS2DSIZ+72,11,-1,snotbuf,0); - Bsprintf(snotbuf,"Global Z coord shift"); - printext16(8,ydim-STATUS2DSIZ+80,11,-1,snotbuf,0); - Bsprintf(snotbuf,"Resize selection"); - printext16(8,ydim-STATUS2DSIZ+88,11,-1,snotbuf,0); - Bsprintf(snotbuf,"Global shade divide"); - printext16(8,ydim-STATUS2DSIZ+96,11,-1,snotbuf,0); - Bsprintf(snotbuf,"Global visibility divide"); - printext16(8,ydim-STATUS2DSIZ+104,11,-1,snotbuf,0); + int numopts = (sizeof(FuncMenuStrings)/sizeof(FuncMenuStrings[0])); + + do + { +// x2 = + printext16(x,y,11,2,FuncMenuStrings[i],0); + // if (x2 > x2_max) x2_max = x2; + y += MENU_Y_SPACING; + } + while (++i < numopts); +// drawline16(x-1,y,x2_max+1,y,1); + // drawline16(x-1,MENU_BASE_Y-4,x-1,y,1); + +// x2 = + printext16(x,MENU_BASE_Y,11,1,"Special functions",0); +// drawline16(x-1,MENU_BASE_Y-4,x2+1,MENU_BASE_Y-4,1); + // drawline16(x2_max+1,MENU_BASE_Y+16-4,x2_max+1,y-1,1); + //drawline16(x2+1,MENU_BASE_Y+16-1,x2_max+1,MENU_BASE_Y+16-1,1); } static void FuncMenu(void) { char disptext[80]; - int col=0, row=0, rowmax=7, dispwidth = 24, editval = 0, i = -1, j; - int xpos = 8, ypos = ydim-STATUS2DSIZ+48; + int col=0, row=0, rowmax=7, dispwidth = 26, editval = 0, i = -1, j; + int xpos = 8, ypos = MENU_BASE_Y+16; disptext[dispwidth] = 0; clearmidstatbar16(); @@ -10004,7 +10023,7 @@ static void FuncMenu(void) { if (row < rowmax) { - printext16(xpos,ypos+row*8,11,0,disptext,0); + printext16(xpos,ypos+row*MENU_Y_SPACING,11,0,disptext,0); row++; } keystatus[KEYSC_DOWN] = 0; @@ -10013,7 +10032,7 @@ static void FuncMenu(void) { if (row > 0) { - printext16(xpos,ypos+row*8,11,0,disptext,0); + printext16(xpos,ypos+row*MENU_Y_SPACING,11,0,disptext,0); row--; } keystatus[KEYSC_UP] = 0; @@ -10082,7 +10101,7 @@ static void FuncMenu(void) { case 0: { - for (i=Bsprintf(disptext,"Replace invalid tiles"); i < dispwidth; i++) disptext[i] = ' '; + for (i=Bsprintf(disptext,FuncMenuStrings[row]); i < dispwidth; i++) disptext[i] = ' '; if (editval) { j = 0; @@ -10112,7 +10131,7 @@ static void FuncMenu(void) break; case 1: { - for (i=Bsprintf(disptext,"Delete all spr of tile #"); i < dispwidth; i++) disptext[i] = ' '; + for (i=Bsprintf(disptext,FuncMenuStrings[row]); i < dispwidth; i++) disptext[i] = ' '; if (editval) { Bsprintf(tempbuf,"Delete all sprites of tile #: "); @@ -10132,26 +10151,26 @@ static void FuncMenu(void) break; case 2: { - for (i=Bsprintf(disptext,"Global sky shade"); i < dispwidth; i++) disptext[i] = ' '; + for (i=Bsprintf(disptext,FuncMenuStrings[row]); i < dispwidth; i++) disptext[i] = ' '; if (editval) { - j=getnumber16("Global sky shade: ",0,128,1); + j=getnumber16("Set map sky shade: ",0,128,1); for (i=0;ifta; - if (j > 4) gametext(320>>1,k,fta_quotes[g_player[screenpeek].ps->ftq],0,2+8+16); - else if (j > 2) gametext(320>>1,k,fta_quotes[g_player[screenpeek].ps->ftq],0,2+8+16+1); - else gametext(320>>1,k,fta_quotes[g_player[screenpeek].ps->ftq],0,2+8+16+1+32); + if (!hud_glowingquotes) + { + if (j > 4) gametext(320>>1,k,fta_quotes[g_player[screenpeek].ps->ftq],0,2+8+16); + else if (j > 2) gametext(320>>1,k,fta_quotes[g_player[screenpeek].ps->ftq],0,2+8+16+1); + else gametext(320>>1,k,fta_quotes[g_player[screenpeek].ps->ftq],0,2+8+16+1+32); + return; + } + if (j > 4) gametext(320>>1,k,fta_quotes[g_player[screenpeek].ps->ftq],(sintable[(totalclock<<5)&2047]>>10),2+8+16); + else if (j > 2) gametext(320>>1,k,fta_quotes[g_player[screenpeek].ps->ftq],(sintable[(totalclock<<5)&2047]>>10),2+8+16+1); + else gametext(320>>1,k,fta_quotes[g_player[screenpeek].ps->ftq],(sintable[(totalclock<<5)&2047]>>10),2+8+16+1+32); } void FTA(int q, player_struct *p) @@ -3771,14 +3782,28 @@ void displayrest(int smoothratio) SetGameVarID(g_iReturnVarID,0,g_player[screenpeek].ps->i,screenpeek); OnEvent(EVENT_DISPLAYSBAR, g_player[screenpeek].ps->i, screenpeek, -1); -// i = usehightile; -// if (r_downsize > 1) -// usehightile = 0; if (GetGameVarID(g_iReturnVarID,g_player[screenpeek].ps->i,screenpeek) == 0) coolgaugetext(screenpeek); operatefta(); -// usehightile = i; + + if (hud_showmapname && leveltexttime > 1) + { + int bits = 10+16; + + if (leveltexttime > 4) + bits = bits; + else if (leveltexttime > 2) + bits |= 1; + else bits |= 1+32; + if (map[(ud.volume_number*MAXLEVELS) + ud.level_number].name != NULL) + { + if (currentboardfilename[0] != 0) + menutext_(160,75,(sintable[(totalclock<<5)&2047]>>11),0,currentboardfilename,bits); + else menutext_(160,75,(sintable[(totalclock<<5)&2047]>>11),0,map[(ud.volume_number*MAXLEVELS) + ud.level_number].name,bits); + } + } + if (KB_KeyPressed(sc_Escape) && ud.overhead_on == 0 && ud.show_help == 0 && g_player[myconnectindex].ps->newowner == -1) @@ -9511,6 +9536,11 @@ static void checkcommandline(int argc, const char **argv) i++; continue; } + if (!Bstrcasecmp(c+1,"noinstancechecking")) + { + i++; + continue; + } } if (firstnet > 0) @@ -10621,12 +10651,20 @@ void app_crashhandler(void) void app_main(int argc,const char **argv) { - int i, j; + int i = 0, j; char cwd[BMAX_PATH]; // extern char datetimestring[]; #ifdef RENDERTYPEWIN - if (win_checkinstance()) + if (argc > 1) + { + for (;i" }; @@ -1087,7 +1089,10 @@ static int increasescriptsize(int size) newscript = (intptr_t *)Brealloc(script, g_ScriptSize * sizeof(intptr_t)); - if (newscript == NULL) +// bitptr = (char *)Brealloc(bitptr, g_ScriptSize * sizeof(char)); + newbitptr = Bcalloc(1,((size+7)>>3) * sizeof(char)); + + if (newscript == NULL || newbitptr == NULL) { ReportError(-1); initprintf("%s:%d: out of memory: Aborted (%ud)\n",compilefile,line_number,(unsigned)(scriptptr-script)); @@ -1096,19 +1101,14 @@ static int increasescriptsize(int size) return 1; } -// bitptr = (char *)Brealloc(bitptr, g_ScriptSize * sizeof(char)); - newbitptr = Bcalloc(1,((size+7)>>3) * sizeof(char)); - - if (size > osize) + if (size >= osize) { Bmemset(&newscript[osize],0,(size-osize) * sizeof(intptr_t)); // Bmemset(&bitptr[osize],0,size-osize); Bmemcpy(newbitptr,bitptr,sizeof(char) * ((osize+7)>>3)); } else if (size < osize) - { Bmemcpy(newbitptr,bitptr,sizeof(char) * ((size+7)>>3)); - } Bfree(bitptr); bitptr = newbitptr; @@ -2877,6 +2877,7 @@ static int parsecommand(void) case CON_SLEEPTIME: case CON_CLIPDIST: case CON_LOTSOFGLASS: + case CON_SAVENN: case CON_SAVE: if (!CheckEventSync(current_event)) { @@ -3788,6 +3789,7 @@ static int parsecommand(void) textptr++; transvar(); return 0; + case CON_GETARRAYSIZE: case CON_RESIZEARRAY: getlabel(); i=GetADefID(label+(labelcnt<<6)); @@ -5530,6 +5532,7 @@ static void AddDefaultDefinitions(void) AddDefinition("EVENT_WEAPKEY9",EVENT_WEAPKEY9,LABEL_DEFINE); AddDefinition("EVENT_KILLIT",EVENT_KILLIT,LABEL_DEFINE); AddDefinition("EVENT_LOADACTOR",EVENT_LOADACTOR,LABEL_DEFINE); + AddDefinition("EVENT_NEWGAME",EVENT_NEWGAME,LABEL_DEFINE); AddDefinition("STR_MAPNAME",STR_MAPNAME,LABEL_DEFINE); AddDefinition("STR_MAPFILENAME",STR_MAPFILENAME,LABEL_DEFINE); diff --git a/polymer/eduke32/source/gamedef.h b/polymer/eduke32/source/gamedef.h index 09272c0b1..37fffc052 100644 --- a/polymer/eduke32/source/gamedef.h +++ b/polymer/eduke32/source/gamedef.h @@ -866,5 +866,7 @@ enum keywords CON_IFVARVARXOR, // 340 CON_IFVAREITHER, // 341 CON_IFVARVAREITHER, // 342 + CON_GETARRAYSIZE, // 343 + CON_SAVENN, // 344 CON_END }; diff --git a/polymer/eduke32/source/gameexec.c b/polymer/eduke32/source/gameexec.c index 15404c944..8111ceb8e 100644 --- a/polymer/eduke32/source/gameexec.c +++ b/polymer/eduke32/source/gameexec.c @@ -2513,7 +2513,7 @@ static int parse(void) insptr++; g_sp->cstat = (short) *insptr++; break; - + case CON_SAVENN: case CON_SAVE: insptr++; { @@ -2523,16 +2523,18 @@ static int parse(void) if ((movesperpacket == 4 && connecthead != myconnectindex) || lastsavedpos > 9) break; - - curtime = time(NULL); - Bstrcpy(tempbuf,asctime(localtime(&curtime))); - clearbuf(ud.savegame[lastsavedpos],sizeof(ud.savegame[lastsavedpos]),0); - Bsprintf(ud.savegame[lastsavedpos],"Auto"); + if ((tw == CON_SAVE) || !(ud.savegame[lastsavedpos][0])) + { + curtime = time(NULL); + Bstrcpy(tempbuf,asctime(localtime(&curtime))); + clearbuf(ud.savegame[lastsavedpos],sizeof(ud.savegame[lastsavedpos]),0); + Bsprintf(ud.savegame[lastsavedpos],"Auto"); // for (j=0;j<13;j++) // Bmemcpy(&ud.savegame[lastsavedpos][j+4],&tempbuf[j+3],sizeof(tempbuf[j+3])); // ud.savegame[lastsavedpos][j+4] = '\0'; - Bmemcpy(&ud.savegame[lastsavedpos][4],&tempbuf[3],sizeof(tempbuf[0])*13); - ud.savegame[lastsavedpos][17] = '\0'; + Bmemcpy(&ud.savegame[lastsavedpos][4],&tempbuf[3],sizeof(tempbuf[0])*13); + ud.savegame[lastsavedpos][17] = '\0'; + } OSD_Printf("Saving to slot %d\n",lastsavedpos); KB_FlushKeyboardQueue(); @@ -3524,6 +3526,11 @@ static int parse(void) aGameArrays[j].plValues[index]=value; break; } + case CON_GETARRAYSIZE: + insptr++; + j=*insptr++; + SetGameVarID(*insptr++,aGameArrays[j].size, g_i, g_p); + break; case CON_RESIZEARRAY: insptr++; diff --git a/polymer/eduke32/source/gamevars.c b/polymer/eduke32/source/gamevars.c index 99cfa2ceb..410528347 100644 --- a/polymer/eduke32/source/gamevars.c +++ b/polymer/eduke32/source/gamevars.c @@ -1331,6 +1331,8 @@ static void AddSystemVars() AddGameVar("NUMWALLS",(intptr_t)&numwalls, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_SHORTPTR | GAMEVAR_FLAG_READONLY); AddGameVar("NUMSECTORS",(intptr_t)&numsectors, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_SHORTPTR | GAMEVAR_FLAG_READONLY); + + AddGameVar("lastsavedpos",(intptr_t)&lastsavedpos, GAMEVAR_FLAG_SYSTEM | GAMEVAR_FLAG_INTPTR); } void InitGameVars(void) diff --git a/polymer/eduke32/source/menus.c b/polymer/eduke32/source/menus.c index 1bfe8a71d..23d0131e8 100644 --- a/polymer/eduke32/source/menus.c +++ b/polymer/eduke32/source/menus.c @@ -197,7 +197,7 @@ static inline int probesm(int x,int y,int i,int n) return probe_(1,x,y,i,n); } -int menutext_(int x,int y,int s,int p,char *t) +int menutext_(int x,int y,int s,int p,char *t,int bits) { short i, ac, centre; // int ht = usehightile; @@ -311,7 +311,7 @@ int menutext_(int x,int y,int s,int p,char *t) continue; } - rotatesprite(x<<16,y<<16,65536L,0,ac,s,p,10+16,0,0,xdim-1,ydim-1); + rotatesprite(x<<16,y<<16,65536L,0,ac,s,p,bits,0,0,xdim-1,ydim-1); x += tilesizx[ac]; t++; @@ -4720,7 +4720,7 @@ cheat_for_port_credits: sprintf(tempbuf,"EPISODE: %-2d / LEVEL: %-2d / SKILL: %-2d",1+ud.volume_number,1+ud.level_number,ud.player_skill); mgametext(160,168,tempbuf,0,2+8+16); if (ud.volume_number == 0 && ud.level_number == 7) - mgametext(160,180,boardfilename,0,2+8+16); + mgametext(160,180,currentboardfilename,0,2+8+16); x = strget((320>>1),184,&ud.savegame[current_menu-360][0],19, 999); @@ -4806,7 +4806,7 @@ cheat_for_port_credits: sprintf(tempbuf,"EPISODE: %-2d / LEVEL: %-2d / SKILL: %-2d",1+ud.volume_number,1+ud.level_number,ud.player_skill); mgametext(160,168,tempbuf,0,2+8+16); if (ud.volume_number == 0 && ud.level_number == 7) - mgametext(160,180,boardfilename,0,2+8+16); + mgametext(160,180,currentboardfilename,0,2+8+16); } switch (x) diff --git a/polymer/eduke32/source/osdcmds.c b/polymer/eduke32/source/osdcmds.c index 971e83d76..4d78688e8 100644 --- a/polymer/eduke32/source/osdcmds.c +++ b/polymer/eduke32/source/osdcmds.c @@ -35,7 +35,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. extern int voting, doquicksave; struct osdcmd_cheatsinfo osdcmd_cheatsinfo_stat; float r_ambientlight = 1.0, r_ambientlightrecip = 1.0; -extern int althud_numbertile, althud_numberpal, althud_shadows, althud_flashing; +extern int althud_numbertile, althud_numberpal, althud_shadows, althud_flashing, hud_glowingquotes; +extern int hud_showmapname; static inline int osdcmd_quit(const osdfuncparm_t *parm) { @@ -708,6 +709,8 @@ cvarmappings cvar[] = { "hud_numberpal", "hud_numberpal: pal for alt hud numbers", (void*)&althud_numberpal, CVAR_INT, 0, 0, MAXPALOOKUPS }, { "hud_shadows", "hud_shadows: enable/disable althud shadows", (void*)&althud_shadows, CVAR_BOOL, 0, 0, 1 }, { "hud_flashing", "hud_flashing: enable/disable althud flashing", (void*)&althud_flashing, CVAR_BOOL, 0, 0, 1 }, + { "hud_glowingquotes", "hud_glowingquotes: enable/disable \"glowing\" quote text", (void*)&hud_glowingquotes, CVAR_BOOL, 0, 0, 1 }, + { "hud_showmapname", "hud_showmapname: enable/disable map name display on load", (void*)&hud_showmapname, CVAR_BOOL, 0, 0, 1 }, { "cl_autoaim", "cl_autoaim: enable/disable weapon autoaim", (void*)&ud.config.AutoAim, CVAR_INT|CVAR_MULTI, 0, 0, 2 }, { "cl_automsg", "cl_automsg: enable/disable automatically sending messages to all players", (void*)&ud.automsg, CVAR_BOOL, 0, 0, 1 }, { "cl_autovote", "cl_autovote: enable/disable automatic voting", (void*)&ud.autovote, CVAR_INT|CVAR_MULTI, 0, 0, 2 }, diff --git a/polymer/eduke32/source/player.c b/polymer/eduke32/source/player.c index f631cd6fe..d452755d2 100644 --- a/polymer/eduke32/source/player.c +++ b/polymer/eduke32/source/player.c @@ -39,6 +39,8 @@ int g_weapon_xoffset; int32 turnheldtime; //MED int32 lastcontroltime; //MED +extern int leveltexttime; + void setpal(player_struct *p) { if (p->heat_on) p->palette = slimepal; @@ -3523,6 +3525,9 @@ void processinput(int snum) } } + if (leveltexttime > 0) + leveltexttime--; + if (s->extra <= 0) { if (p->dead_flag == 0) diff --git a/polymer/eduke32/source/premap.c b/polymer/eduke32/source/premap.c index ef777ad07..467a25485 100644 --- a/polymer/eduke32/source/premap.c +++ b/polymer/eduke32/source/premap.c @@ -41,6 +41,7 @@ static char precachehightile[2][MAXTILES>>3]; static int precachecount; extern char *duke3dgrpstring; +extern int leveltexttime; static void tloadtile(int tilenume, int type) { @@ -356,12 +357,12 @@ static void dofrontscreens(char *statustext) } if (boardfilename[0] != 0 && ud.level_number == 7 && ud.volume_number == 0) { - menutext(160,90,0,0,"ENTERING USER MAP"); + menutext(160,90,0,0,"LOADING USER MAP"); gametextpal(160,90+10,boardfilename,14,2); } else { - menutext(160,90,0,0,"ENTERING"); + menutext(160,90,0,0,"LOADING"); if (map[(ud.volume_number*MAXLEVELS) + ud.level_number].name != NULL) menutext(160,90+16+8,0,0,map[(ud.volume_number*MAXLEVELS) + ud.level_number].name); } @@ -1290,6 +1291,7 @@ void newgame(int vn,int ln,int sk) connecthead = 0; connectpoint2[0] = -1; } + OnEvent(EVENT_NEWGAME, g_player[screenpeek].ps->i, screenpeek, -1); } int getteampal(int team) @@ -1498,6 +1500,7 @@ void resettimevars(void) ototalclock = 0L; lockclock = 0L; ready2send = 1; + leveltexttime = 85; } void waitforeverybody() @@ -1867,6 +1870,8 @@ int enterlevel(int g) //AddLog(g_szBuf); // variables are set by pointer... + Bmemcpy(¤tboardfilename[0],&boardfilename[0],BMAX_PATH); + OnEvent(EVENT_ENTERLEVEL, -1, -1, -1); OSD_Printf(OSDTEXT_YELLOW "E%dL%d: %s\n",ud.volume_number+1,ud.level_number+1,map[(ud.volume_number*MAXLEVELS)+ud.level_number].name); return 0; diff --git a/polymer/eduke32/source/savegame.c b/polymer/eduke32/source/savegame.c index de850ee17..13beee3cd 100644 --- a/polymer/eduke32/source/savegame.c +++ b/polymer/eduke32/source/savegame.c @@ -220,6 +220,7 @@ int loadplayer(int spot) if (kdfread(&ud.level_number,sizeof(ud.level_number),1,fil) != 1) goto corrupt; if (kdfread(&ud.player_skill,sizeof(ud.player_skill),1,fil) != 1) goto corrupt; if (kdfread(&boardfilename[0],BMAX_PATH,1,fil) != 1) goto corrupt; + Bmemcpy(¤tboardfilename[0],&boardfilename[0],BMAX_PATH); ud.m_level_number = ud.level_number; ud.m_volume_number = ud.volume_number; @@ -590,7 +591,7 @@ int saveplayer(int spot) dfwrite(&ud.volume_number,sizeof(ud.volume_number),1,fil); dfwrite(&ud.level_number,sizeof(ud.level_number),1,fil); dfwrite(&ud.player_skill,sizeof(ud.player_skill),1,fil); - dfwrite(&boardfilename[0],BMAX_PATH,1,fil); + dfwrite(¤tboardfilename[0],BMAX_PATH,1,fil); if (!waloff[TILE_SAVESHOT]) { walock[TILE_SAVESHOT] = 254; diff --git a/polymer/eduke32/source/sector.c b/polymer/eduke32/source/sector.c index c60427ba0..82010f155 100644 --- a/polymer/eduke32/source/sector.c +++ b/polymer/eduke32/source/sector.c @@ -2561,7 +2561,8 @@ void sharedkeys(int snum) if (GetGameVarID(g_iReturnVarID,g_player[snum].ps->i,snum) == 0) { p->quick_kick = 14; - FTA(80,p); + if (p->fta == 0 || p->ftq == 80) + FTA(80,p); } }