diff --git a/packages/maps/dev_coal.cgz b/packages/maps/dev_coal.cgz new file mode 100644 index 00000000..d53af3d2 Binary files /dev/null and b/packages/maps/dev_coal.cgz differ diff --git a/packages/maps/dev_dusk.cgz b/packages/maps/dev_dusk.cgz index 317f016a..db9899a4 100644 Binary files a/packages/maps/dev_dusk.cgz and b/packages/maps/dev_dusk.cgz differ diff --git a/packages/maps/dev_gothic.cgz b/packages/maps/dev_gothic.cgz index b4f889ca..c8f7979a 100644 Binary files a/packages/maps/dev_gothic.cgz and b/packages/maps/dev_gothic.cgz differ diff --git a/packages/maps/dev_industrial.cgz b/packages/maps/dev_industrial.cgz index 97d0d45c..926225e8 100644 Binary files a/packages/maps/dev_industrial.cgz and b/packages/maps/dev_industrial.cgz differ diff --git a/packages/maps/dev_scaffold.cgz b/packages/maps/dev_scaffold.cgz index b4519baf..56f97e53 100644 Binary files a/packages/maps/dev_scaffold.cgz and b/packages/maps/dev_scaffold.cgz differ diff --git a/packages/maps/dev_sunset.cgz b/packages/maps/dev_sunset.cgz index 46b2c87c..26ec0cf2 100644 Binary files a/packages/maps/dev_sunset.cgz and b/packages/maps/dev_sunset.cgz differ diff --git a/source/src/water.cpp b/source/src/water.cpp index 78c8f011..e0886535 100644 --- a/source/src/water.cpp +++ b/source/src/water.cpp @@ -33,7 +33,8 @@ void setwatercolor(const char *r, const char *g, const char *b, const char *a) if(editmode) unsavededits++; } -COMMANDN(watercolour, setwatercolor, "ssss"); +//COMMANDN(watercolour, setwatercolor, "ssss"); +COMMANDF(watercolour, "ssss", (char *r, char *g, char *b, char *a) { if(editmode) setwatercolor(r, g, b, a); }); FVAR(waveheight, 0, 0.3f, 1.0f); VARP(ignoreoverride_limitwaveheight, 0, 0, 1); diff --git a/source/src/worldio.cpp b/source/src/worldio.cpp index 05f44891..30b50b71 100644 --- a/source/src/worldio.cpp +++ b/source/src/worldio.cpp @@ -554,19 +554,19 @@ void rebuildtexlists() // checks the texlists, if they still contain all possib if(mt) conoutf("WARNING: rebuildtexlists() fixed %d|%d|%d missing entries", mk[0], mk[1], mk[2]); } -static const uchar sortenttab[] = { - 99, // NOTUSED // entity slot not in use in map (usually seen at deleted entities) - 5, // LIGHT // lightsource, attr1 = radius, attr2 = intensity (or attr2..4 = r-g-b) - 2, // PLAYERSTART // attr1 = angle, attr2 = team - 1, 1, 1, // I_CLIPS, I_AMMO, I_GRENADE, // attr1 = elevation +static const uchar sortenttab[] = { // 1..9: used in network protocol, 10..19: sorted lights, 20..29: misc, 30..39: clipped ents at the end of the list + 99, // NOTUSED // entity slot not in use in map (usually seen at deleted entities) + 10, // LIGHT (colored: 11, shadow: 12) // lightsource, attr1 = radius, attr2 = intensity (or attr2..4 = r-g-b) + 2, // PLAYERSTART // attr1 = angle, attr2 = team + 1, 1, 1, // I_CLIPS, I_AMMO, I_GRENADE, // attr1 = elevation 1, 1, 1, 1, // I_HEALTH, I_HELMET, I_ARMOUR, I_AKIMBO, - 10, // MAPMODEL // attr1 = angle, attr2 = idx, attr3 = elevation, attr4 = texture, attr5 = pitch, attr6 = roll - 9, // CARROT // attr1 = tag, attr2 = type - 3, // LADDER // attr1 = height - 1, // CTF_FLAG // attr1 = angle, attr2 = red/blue - 8, // SOUND // attr1 = idx, attr2 = radius, attr3 = size, attr4 = volume - 12, // CLIP // attr1 = elevation, attr2 = xradius, attr3 = yradius, attr4 = height, attr6 = slope, attr7 = shape - 13}; // PLCLIP // attr1 = elevation, attr2 = xradius, attr3 = yradius, attr4 = height, attr6 = slope, attr7 = shape + 30, // MAPMODEL (clipped: 31) // attr1 = angle, attr2 = idx, attr3 = elevation, attr4 = texture, attr5 = pitch, attr6 = roll + 21, // CARROT // attr1 = tag, attr2 = type + 3, // LADDER // attr1 = height + 1, // CTF_FLAG // attr1 = angle, attr2 = red/blue + 20, // SOUND // attr1 = idx, attr2 = radius, attr3 = size, attr4 = volume + 32, // CLIP // attr1 = elevation, attr2 = xradius, attr3 = yradius, attr4 = height, attr6 = slope, attr7 = shape + 33}; // PLCLIP // attr1 = elevation, attr2 = xradius, attr3 = yradius, attr4 = height, attr6 = slope, attr7 = shape struct numbered_persistent_entity { persistent_entity e; int n; }; @@ -628,11 +628,12 @@ void save_world(char *mname, bool skipoptimise, bool addcomfort) if(t == LIGHT) { if(npe.e.attr3 || npe.e.attr4) nt++; // sort white lights before colored ones to fix light bug + if(npe.e.attr1 < 0) nt += 2; // sort shadows after lights } else if(t == MAPMODEL) { mapmodelinfo *mmi = getmminfo(npe.e.attr2); - if(mmi && mmi->h) nt++; // sort clipped mapmodels right after unclipped mapmodels + if(mmi && mmi->h) nt++; // sort clipped mapmodels right after unclipped mapmodels, but before clips and plclips } npe.n = i | (nt << 16); // numbers have to be unique for the sort to be stable sortedents.add(npe);