mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-16 09:21:12 +00:00
fix a couple of editor issues:
- one reported by Micky: http://forums.duke4.net/topic/3911-true-room-over-room/page__view__findpost__p__106610 - malloc(0) call when saving a map with no sprites - update 'asksave' after Alt-S and corrupt-check on starting a new map git-svn-id: https://svn.eduke32.com/eduke32@2017 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
c698822a41
commit
3b634f28ae
2 changed files with 41 additions and 32 deletions
|
@ -5300,6 +5300,10 @@ end_join_sectors:
|
|||
{
|
||||
NEXTWALL(i).nextwall = i;
|
||||
NEXTWALL(i).nextsector = numsectors;
|
||||
#ifdef YAX_ENABLE
|
||||
yax_setnextwall(i, YAX_CEILING, -1);
|
||||
yax_setnextwall(i, YAX_FLOOR, -1);
|
||||
#endif
|
||||
}
|
||||
#ifdef YAX_ENABLE
|
||||
yax_setbunches(numsectors, -1, -1);
|
||||
|
@ -5310,6 +5314,7 @@ end_join_sectors:
|
|||
newnumwalls = -1;
|
||||
numsectors++;
|
||||
|
||||
asksave = 1;
|
||||
printmessage16("Inner loop made into new sector.");
|
||||
}
|
||||
}
|
||||
|
@ -6555,6 +6560,8 @@ CANCEL:
|
|||
message("Can't copy highlighted portion of old map: limits exceeded.");
|
||||
}
|
||||
|
||||
CheckMapCorruption(4, 0);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -9743,12 +9743,13 @@ int32_t saveboard(const char *filename, int32_t *daposx, int32_t *daposy, int32_
|
|||
|
||||
ts = B_LITTLE16(numsprites); Bwrite(fil,&ts,2);
|
||||
|
||||
if (numsprites > 0)
|
||||
{
|
||||
tspri = (spritetype *)Bmalloc(sizeof(spritetype) * numsprites);
|
||||
|
||||
if (tspri == NULL)
|
||||
break;
|
||||
|
||||
|
||||
spri=tspri;
|
||||
|
||||
for (j=0; j<MAXSPRITES; j++)
|
||||
|
@ -9777,6 +9778,7 @@ int32_t saveboard(const char *filename, int32_t *daposx, int32_t *daposy, int32_
|
|||
|
||||
Bwrite(fil,&tspri[0],sizeof(spritetype) * numsprites);
|
||||
Bfree(tspri);
|
||||
}
|
||||
|
||||
Bclose(fil);
|
||||
return(0);
|
||||
|
|
Loading…
Reference in a new issue