mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-14 08:30:58 +00:00
1. Mapster32 saves autosave variable in the cfg.
2. Autosaving interval is configurable. 3. Sprite noclip is on by default(CTRL+N to toggle). 4. Fixed the devastator crash. Thanks to Nukey for helping me to track it down. Notes about the devastator crash. The yvel of projectile may point to an already removed sprite(its sectnum is MAXSECT). If some code tries to access the sector of the removed sprite, the crash might happen. How to reproduce crashes. True story: Nukey recorded a demo(*.dmo) and send me his demo and map so that I could easily reproduce it and eventually fix the crash. git-svn-id: https://svn.eduke32.com/eduke32@744 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
6778e2c201
commit
7f9e4157fa
5 changed files with 14 additions and 8 deletions
|
@ -48,6 +48,7 @@ extern int ydim16, xdimgame, ydimgame, bppgame, xdim2d, ydim2d, forcesetup;
|
||||||
extern char unrealedlook, quickmapcycling;
|
extern char unrealedlook, quickmapcycling;
|
||||||
extern int pk_turnaccel,pk_turndecel,pk_uedaccel;
|
extern int pk_turnaccel,pk_turndecel,pk_uedaccel;
|
||||||
extern int revertCTRL,scrollamount;
|
extern int revertCTRL,scrollamount;
|
||||||
|
extern unsigned char autosave;
|
||||||
|
|
||||||
|
|
||||||
extern int ExtInit(void);
|
extern int ExtInit(void);
|
||||||
|
|
|
@ -213,6 +213,8 @@ int loadsetup(const char *fn)
|
||||||
|
|
||||||
if (readconfig(fp, "turndecel", val, VL) > 0) pk_turndecel = Batoi(val);
|
if (readconfig(fp, "turndecel", val, VL) > 0) pk_turndecel = Batoi(val);
|
||||||
|
|
||||||
|
if (readconfig(fp, "autosave", val, VL) > 0) autosave = Batoi(val);
|
||||||
|
|
||||||
for (i=0;i<256;i++)remap[i]=i;
|
for (i=0;i<256;i++)remap[i]=i;
|
||||||
remapinit=1;
|
remapinit=1;
|
||||||
if (readconfig(fp, "remap", val, VL) > 0)
|
if (readconfig(fp, "remap", val, VL) > 0)
|
||||||
|
@ -340,6 +342,9 @@ int writesetup(const char *fn)
|
||||||
"; Turning deceleration\n"
|
"; Turning deceleration\n"
|
||||||
"turndecel = %d\n"
|
"turndecel = %d\n"
|
||||||
"\n"
|
"\n"
|
||||||
|
"; Autosave map interval (minutes)\n"
|
||||||
|
"autosave = %d\n"
|
||||||
|
"\n"
|
||||||
#if 1
|
#if 1
|
||||||
"; Key Settings\n"
|
"; Key Settings\n"
|
||||||
"; Here's a map of all the keyboard scan codes: NOTE: values are listed in hex!\n"
|
"; Here's a map of all the keyboard scan codes: NOTE: values are listed in hex!\n"
|
||||||
|
@ -400,7 +405,7 @@ int writesetup(const char *fn)
|
||||||
option[7]>>4, option[2],
|
option[7]>>4, option[2],
|
||||||
#endif
|
#endif
|
||||||
option[3], msens, unrealedlook, pk_uedaccel, quickmapcycling,
|
option[3], msens, unrealedlook, pk_uedaccel, quickmapcycling,
|
||||||
revertCTRL,scrollamount,pk_turnaccel,pk_turndecel,
|
revertCTRL,scrollamount,pk_turnaccel,pk_turndecel,autosave,
|
||||||
#if 1
|
#if 1
|
||||||
keys[0], keys[1], keys[2], keys[3], keys[4], keys[5],
|
keys[0], keys[1], keys[2], keys[3], keys[4], keys[5],
|
||||||
keys[6], keys[7], keys[8], keys[9], keys[10], keys[11],
|
keys[6], keys[7], keys[8], keys[9], keys[10], keys[11],
|
||||||
|
|
|
@ -2403,7 +2403,7 @@ static void moveweapons(void)
|
||||||
if (j)break;
|
if (j)break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(hittype[i].projectile.workslike & PROJECTILE_FLAG_BOUNCESOFFWALLS) && s->yvel >= 0)
|
if (!(hittype[i].projectile.workslike & PROJECTILE_FLAG_BOUNCESOFFWALLS) && s->yvel >= 0 && sprite[s->yvel].sectnum < MAXSECTORS)
|
||||||
if (FindDistance2D(s->x-sprite[s->yvel].x,s->y-sprite[s->yvel].y) < 256)
|
if (FindDistance2D(s->x-sprite[s->yvel].x,s->y-sprite[s->yvel].y) < 256)
|
||||||
j = 49152|s->yvel;
|
j = 49152|s->yvel;
|
||||||
|
|
||||||
|
@ -2861,7 +2861,7 @@ static void moveweapons(void)
|
||||||
|
|
||||||
j = movesprite(i,(k*(sintable[(s->ang+512)&2047]))>>14,(k*(sintable[s->ang&2047]))>>14,ll,qq);
|
j = movesprite(i,(k*(sintable[(s->ang+512)&2047]))>>14,(k*(sintable[s->ang&2047]))>>14,ll,qq);
|
||||||
|
|
||||||
if (s->picnum == RPG && s->yvel >= 0)
|
if (s->picnum == RPG && s->yvel >= 0 && sprite[s->yvel].sectnum < MAXSECTORS)
|
||||||
if (FindDistance2D(s->x-sprite[s->yvel].x,s->y-sprite[s->yvel].y) < 256)
|
if (FindDistance2D(s->x-sprite[s->yvel].x,s->y-sprite[s->yvel].y) < 256)
|
||||||
j = 49152|s->yvel;
|
j = 49152|s->yvel;
|
||||||
|
|
||||||
|
|
|
@ -48,8 +48,8 @@ static char defaultduke3dgrp[BMAX_PATH] = "duke3d.grp";
|
||||||
static char *duke3dgrp = defaultduke3dgrp;
|
static char *duke3dgrp = defaultduke3dgrp;
|
||||||
static int fixmapbeforesaving = 1;
|
static int fixmapbeforesaving = 1;
|
||||||
static int lastsave = -180*60;
|
static int lastsave = -180*60;
|
||||||
static int spnoclip=0;
|
|
||||||
static int NoAutoLoad = 0;
|
static int NoAutoLoad = 0;
|
||||||
|
int spnoclip=1;
|
||||||
|
|
||||||
#if !defined(_WIN32)
|
#if !defined(_WIN32)
|
||||||
static int usecwd = 0;
|
static int usecwd = 0;
|
||||||
|
@ -7291,7 +7291,7 @@ int ExtInit(void)
|
||||||
getmessagetimeoff = 0;
|
getmessagetimeoff = 0;
|
||||||
|
|
||||||
Bstrcpy(apptitle, "Mapster32"VERSION"");
|
Bstrcpy(apptitle, "Mapster32"VERSION"");
|
||||||
autosavetimer = totalclock+120*180;
|
autosavetimer = totalclock+120*autosave*3;
|
||||||
|
|
||||||
#if defined(_WIN32) && defined(DUKEOSD)
|
#if defined(_WIN32) && defined(DUKEOSD)
|
||||||
OSD_SetFunctions(
|
OSD_SetFunctions(
|
||||||
|
@ -7520,7 +7520,7 @@ static void Keys2d3d(void)
|
||||||
if (keystatus[KEYSC_QUOTE] && keystatus[KEYSC_A]) // ' a
|
if (keystatus[KEYSC_QUOTE] && keystatus[KEYSC_A]) // ' a
|
||||||
{
|
{
|
||||||
keystatus[KEYSC_A] = 0;
|
keystatus[KEYSC_A] = 0;
|
||||||
autosave=!autosave;
|
autosave=autosave?0:3;
|
||||||
if (autosave) message("Autosave ON");
|
if (autosave) message("Autosave ON");
|
||||||
else message("Autosave OFF");
|
else message("Autosave OFF");
|
||||||
}
|
}
|
||||||
|
@ -7552,7 +7552,7 @@ static void Keys2d3d(void)
|
||||||
ExtSaveMap("autosave.map");
|
ExtSaveMap("autosave.map");
|
||||||
message("Board autosaved to AUTOSAVE.MAP");
|
message("Board autosaved to AUTOSAVE.MAP");
|
||||||
}
|
}
|
||||||
autosavetimer = totalclock+120*180;
|
autosavetimer = totalclock+120*autosave*3;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (eitherCTRL) //CTRL
|
if (eitherCTRL) //CTRL
|
||||||
|
|
|
@ -93,7 +93,7 @@ short cursprite;
|
||||||
int mousxplc, mousyplc, ppointhighlight;
|
int mousxplc, mousyplc, ppointhighlight;
|
||||||
int counter=0;
|
int counter=0;
|
||||||
unsigned char nosprites=0,purpleon=0,skill=4;
|
unsigned char nosprites=0,purpleon=0,skill=4;
|
||||||
unsigned char framerateon=1,shadepreview=0,autosave=1,sidemode=0;
|
unsigned char framerateon=1,shadepreview=0,autosave=3,sidemode=0;
|
||||||
extern int vel, svel, hvel, angvel;
|
extern int vel, svel, hvel, angvel;
|
||||||
int xvel, yvel, timoff;
|
int xvel, yvel, timoff;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue