fix: convert xmap path names for windows
* make sure, unsaved edits only count in editmode (otherwise "watercolour" in map configs would already be "edits") * nicer filenames for backup-xmaps * catch failed xmap file write access * unsavededits is now flag (!= 0) and counter - to enable scripts to detect "new edits". new commands: xmap_delete_backup deletes the backup xmap xmap_keep_backup moves the backup xmap to a regular named spot xmap_rename changes the nickname of an xmap
This commit is contained in:
@@ -4,7 +4,7 @@ int wx1, wy1, wx2, wy2;
|
||||
float wsx1, wsy1, wsx2, wsy2;
|
||||
|
||||
VARP(watersubdiv, 1, 4, 64);
|
||||
VARF(waterlevel, -128, -128, 127, if(!noteditmode("waterlevel")) { hdr.waterlevel = waterlevel; unsavededits = 1; });
|
||||
VARF(waterlevel, -128, -128, 127, if(!noteditmode("waterlevel")) { hdr.waterlevel = waterlevel; unsavededits++; });
|
||||
|
||||
void setwatercolor(const char *r, const char *g, const char *b, const char *a)
|
||||
{
|
||||
@@ -22,7 +22,7 @@ void setwatercolor(const char *r, const char *g, const char *b, const char *a)
|
||||
hdr.watercolor[2] = 20;
|
||||
hdr.watercolor[3] = 178;
|
||||
}
|
||||
unsavededits = 1;
|
||||
if(editmode) unsavededits++;
|
||||
}
|
||||
|
||||
COMMANDN(watercolour, setwatercolor, "ssss");
|
||||
|
||||
Reference in New Issue
Block a user