Changed: "Unable to save the map: there are too many unique sidedefs!" error message now displays info about sidedefs counts before and after sidedef compression.

Fixed, Draw Grid mode: in some cases invalid geometry was created when drawing very large grids.
Fixed, Things mode, "Rotate Clockwise" action: fixed inability to change thing angle from 0 to 315 when "doomthingrotationangles" Game Configuration property was set to true.
Updated ZDoom_DECORATE.cfg.
This commit is contained in:
MaxED 2016-06-17 20:44:14 +00:00
parent f7a1a64db0
commit ac68ec0bb8
5 changed files with 30 additions and 13 deletions

View file

@ -120,7 +120,7 @@ keywords
//Generic monster attacks //Generic monster attacks
A_CustomMissile = "A_CustomMissile(str missiletype[, float spawnheight = 32.0[, float spawnofs_horiz = 0.0[, int angle = 0[, int aimflags = 0[, int pitch = 0[, int target = AAPTR_TARGET]]]]]])"; A_CustomMissile = "A_CustomMissile(str missiletype[, float spawnheight = 32.0[, float spawnofs_horiz = 0.0[, int angle = 0[, int aimflags = 0[, int pitch = 0[, int target = AAPTR_TARGET]]]]]])";
A_CustomBulletAttack = "A_CustomBulletAttack(float horz_spread, float vert_spread, int numbullets, int damageperbullet[, str pufftype = \"BulletPuff\"[, float range = 0.0[, int flags = 0[, int target = AAPTR_TARGET]]]])"; A_CustomBulletAttack = "A_CustomBulletAttack(float horz_spread, float vert_spread, int numbullets, int damageperbullet[, str pufftype = \"BulletPuff\"[, float range = 0.0[, int flags = 0[, int target = AAPTR_TARGET]]]])";
A_CustomRailgun = "A_CustomRailgun(int damage[, int offset[, color ringcolor[, color corecolor[, int flags = 0[, bool aim = false[, float maxdiff = 0.0[, str pufftype = \"\"[, float spread_xy = 0.0[, float spread_z = 0.0[, float range = 8192[, int duration = 35[, float sparsity = 1.0[, float driftspeed = 1.0[, str spawnclass = \"\"[, float spawnofs_z = 0[, int spiraloffset = 270]]]]]]]]]]]]]]]])"; A_CustomRailgun = "A_CustomRailgun(int damage[, int offset[, color ringcolor[, color corecolor[, int flags = 0[, bool aim = false[, float maxdiff = 0.0[, str pufftype = \"\"[, float spread_xy = 0.0[, float spread_z = 0.0[, float range = 8192[, int duration = 35[, float sparsity = 1.0[, float driftspeed = 1.0[, str spawnclass = \"\"[, float spawnofs_z = 0[, int spiraloffset = 270[, int actorpiercelimit = 0]]]]]]]]]]]]]]]]])";
A_CustomMeleeAttack = "A_CustomMeleeAttack[(int damage = 0[, str meleesound = \"\"[, str misssound = \"\"[, str damagetype = \"Melee\"[, bool bleed = true]]]])]"; A_CustomMeleeAttack = "A_CustomMeleeAttack[(int damage = 0[, str meleesound = \"\"[, str misssound = \"\"[, str damagetype = \"Melee\"[, bool bleed = true]]]])]";
A_CustomComboAttack = "A_CustomComboAttack(str missiletype, float spawnheight, int damage, str meleesound[, str damagetype = \"Melee\"[, bool bleed = true]])"; A_CustomComboAttack = "A_CustomComboAttack(str missiletype, float spawnheight, int damage, str meleesound[, str damagetype = \"Melee\"[, bool bleed = true]])";
A_MonsterRefire = "state A_MonsterRefire(int chancecontinue, str abortstate)"; A_MonsterRefire = "state A_MonsterRefire(int chancecontinue, str abortstate)";
@ -292,6 +292,7 @@ keywords
A_RadiusGive = "int A_RadiusGive(str item, float distance, int flags[, int amount = 0[, str filter = \"None\"[, str species = \"None\"[, int mindist = 0[, int limit = 0]]]]])\nflags: RGF flags."; A_RadiusGive = "int A_RadiusGive(str item, float distance, int flags[, int amount = 0[, str filter = \"None\"[, str species = \"None\"[, int mindist = 0[, int limit = 0]]]]])\nflags: RGF flags.";
//Weapon functions //Weapon functions
A_WeaponReady = "A_WeaponReady[(int flags = 0)]\nflags: WRF flags."; A_WeaponReady = "A_WeaponReady[(int flags = 0)]\nflags: WRF flags.";
A_WeaponOffset = "A_WeaponOffset[(float x = 0[, float y = 32[, int flags = 0])]\nflags: WOF flags.";
A_Lower = "A_Lower"; A_Lower = "A_Lower";
A_Raise = "A_Raise"; A_Raise = "A_Raise";
A_ReFire = "A_ReFire[(str state = \"Hold\")]"; A_ReFire = "A_ReFire[(str state = \"Hold\")]";
@ -305,17 +306,19 @@ keywords
A_Light1 = "A_Light1"; A_Light1 = "A_Light1";
A_Light2 = "A_Light2"; A_Light2 = "A_Light2";
A_LightInverse = "A_LightInverse"; A_LightInverse = "A_LightInverse";
A_Overlay = "A_Overlay(int layer[, state start])";
A_OverlayFlags = "A_OverlayFlags(int layer, int flags, bool set)\nflags: PSPF flags.";
A_OverlayOffset = "A_OverlayOffset[(int layer = 0[, float x = 0.0f[, float y = 32.0f[, int flags = 0]]]])]\nflags: WOF flags.";
A_Recoil = "A_Recoil(float force)"; A_Recoil = "A_Recoil(float force)";
A_ZoomFactor = "A_ZoomFactor[(float zoom = 1.0[, int flags = 0])]\nflags: ZOOM flags."; A_ZoomFactor = "A_ZoomFactor[(float zoom = 1.0[, int flags = 0])]\nflags: ZOOM flags.";
A_SetCrosshair = "A_SetCrosshair(int number)"; A_SetCrosshair = "A_SetCrosshair(int number)";
A_WeaponOffset = "A_WeaponOffset[(float x = 0[, float y = 32[, int flags = 0])]\nflags: WOF flags.";
//Weapon attack functions //Weapon attack functions
A_Punch = "A_Punch"; A_Punch = "A_Punch";
A_Saw = "A_Saw[(str fullsound = \"weapons/sawfull\"[, str hitsound = \"weapons/sawhit\"[, int damage = 0[, str pufftype = \"BulletPuff\"[, int flags = 0[, float range = 65.0[, float spread_xy = 2.8125[, float spread_z = 0.0[, float lifesteal = 0.0[, int lifestealmax = 0[, str armorbonustype = \"ArmorBonus\"]]]]]]]]]])]"; A_Saw = "A_Saw[(str fullsound = \"weapons/sawfull\"[, str hitsound = \"weapons/sawhit\"[, int damage = 0[, str pufftype = \"BulletPuff\"[, int flags = 0[, float range = 65.0[, float spread_xy = 2.8125[, float spread_z = 0.0[, float lifesteal = 0.0[, int lifestealmax = 0[, str armorbonustype = \"ArmorBonus\"]]]]]]]]]])]";
A_CustomPunch = "A_CustomPunch(int damage[, bool norandom = false[, int flags = 0[, str pufftype = \"BulletPuff\"[, float range = 64.0[, float lifesteal = 0.0[, int lifestealmax = 0[, str armorbonustype = \"ArmorBonus\"[, str meleesound[, str misssound]]]]]]]]])"; A_CustomPunch = "A_CustomPunch(int damage[, bool norandom = false[, int flags = 0[, str pufftype = \"BulletPuff\"[, float range = 64.0[, float lifesteal = 0.0[, int lifestealmax = 0[, str armorbonustype = \"ArmorBonus\"[, str meleesound[, str misssound]]]]]]]]])";
A_FireBullets = "A_FireBullets(int spread_horz, int spread_vert, int numbullets, int damage[, str pufftype = \"\"[, int flags = FBF_USEAMMO[, float range = 0.0]]])"; A_FireBullets = "A_FireBullets(int spread_horz, int spread_vert, int numbullets, int damage[, str pufftype = \"\"[, int flags = FBF_USEAMMO[, float range = 0.0]]])";
A_FireCustomMissile = "A_FireCustomMissile(str missiletype[, int angle = 0[, bool useammo = false[, float spawnofs_horz = 0.0[, int spawnheight = 0[, int flags = 0[, angle pitch = 0]]]]]])"; A_FireCustomMissile = "A_FireCustomMissile(str missiletype[, int angle = 0[, bool useammo = false[, float spawnofs_horz = 0.0[, int spawnheight = 0[, int flags = 0[, angle pitch = 0]]]]]])";
A_RailAttack = "A_RailAttack(int damage[, int spawnofs_horz[, bool useammo[, str ringcolor[, str corecolor[, int flags[, int maxdiff[, str pufftype[, float spread_xy = 0.0[, float spread_z = 0.0[, float range = 8192.0[, int duration = 35[, float sparsity = 1.0[, float driftspeed = 1.0[, str spawnclass[, float spawnofs_z = 0.0[, int spiraloffset = 270]]]]]]]]]]]]]]]])"; A_RailAttack = "A_RailAttack(int damage[, int spawnofs_horz[, bool useammo[, str ringcolor[, str corecolor[, int flags[, int maxdiff[, str pufftype[, float spread_xy = 0.0[, float spread_z = 0.0[, float range = 8192.0[, int duration = 35[, float sparsity = 1.0[, float driftspeed = 1.0[, str spawnclass[, float spawnofs_z = 0.0[, int spiraloffset = 270[, int actorpiercelimit = 0]]]]]]]]]]]]]]]]])";
A_FireAssaultGun = "A_FireAssaultGun"; A_FireAssaultGun = "A_FireAssaultGun";
A_FireBFG = "A_FireBFG"; A_FireBFG = "A_FireBFG";
A_FireOldBFG = "A_FireOldBFG"; A_FireOldBFG = "A_FireOldBFG";
@ -1359,4 +1362,9 @@ constants
WOF_KEEPX; WOF_KEEPX;
WOF_KEEPY; WOF_KEEPY;
WOF_ADD; WOF_ADD;
//A_OverlayFlags flags
PSPF_ADDWEAPON;
PSPF_ADDBOB;
PSPF_POWDOUBLE;
PSPF_CVARFAST;
} }

View file

@ -662,6 +662,7 @@ namespace CodeImp.DoomBuilder
if(map.Sidedefs.Count > io.MaxSidedefs) if(map.Sidedefs.Count > io.MaxSidedefs)
{ {
// Compress sidedefs // Compress sidedefs
int initialsidescount = outputset.Sidedefs.Count; //mxd
General.MainWindow.DisplayStatus(StatusType.Busy, "Compressing sidedefs..."); General.MainWindow.DisplayStatus(StatusType.Busy, "Compressing sidedefs...");
outputset.CompressSidedefs(); outputset.CompressSidedefs();
@ -669,7 +670,9 @@ namespace CodeImp.DoomBuilder
if(outputset.Sidedefs.Count > io.MaxSidedefs) if(outputset.Sidedefs.Count > io.MaxSidedefs)
{ {
// Problem! Can't save the map like this! // Problem! Can't save the map like this!
General.ShowErrorMessage("Unable to save the map: There are too many unique sidedefs!", MessageBoxButtons.OK); General.ShowErrorMessage("Unable to save the map: there are too many unique sidedefs!" + Environment.NewLine + Environment.NewLine
+ "Sidedefs before compresion: " + initialsidescount + Environment.NewLine
+ "Sidedefs after compresion: " + outputset.Sidedefs.Count, MessageBoxButtons.OK);
General.MainWindow.DisplayStatus(oldstatus); General.MainWindow.DisplayStatus(oldstatus);
return false; return false;
} }

View file

@ -937,6 +937,7 @@ namespace CodeImp.DoomBuilder.Geometry
if(points[0].stitch) mergeverts.Add(v1); else nonmergeverts.Add(v1); if(points[0].stitch) mergeverts.Add(v1); else nonmergeverts.Add(v1);
// Go for all other points // Go for all other points
int roundprecision = (General.Map.FormatInterface.VertexDecimals > 0 ? General.Map.FormatInterface.VertexDecimals - 1 : 0); //mxd
for(int i = 1; i < points.Count; i++) for(int i = 1; i < points.Count; i++)
{ {
// Create vertex for point // Create vertex for point
@ -999,6 +1000,10 @@ namespace CodeImp.DoomBuilder.Geometry
// may already have changed in length due to a previous split // may already have changed in length due to a previous split
Vector2D splitpoint = measureline.GetCoordinatesAt(u); Vector2D splitpoint = measureline.GetCoordinatesAt(u);
//mxd. Work around some imprecisions when splitting very long lines (like 19000 mu long)
splitpoint.x = (float)Math.Round(splitpoint.x, roundprecision);
splitpoint.y = (float)Math.Round(splitpoint.y, roundprecision);
// Make the vertex // Make the vertex
Vertex splitvertex = map.CreateVertex(splitpoint); Vertex splitvertex = map.CreateVertex(splitpoint);
if(splitvertex == null) return false; if(splitvertex == null) return false;

View file

@ -364,7 +364,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
int step = width / slicesH; int step = width / slicesH;
for(int w = 0; w < slicesH; w++) for(int w = 0; w < slicesH; w++)
{ {
shapes.Add(new[] { new Vector2D((int)s.x + step * w, (int)s.y), new Vector2D((int)s.x + step * w + step, (int)s.y) }); shapes.Add(new[] { new Vector2D((float)Math.Round(s.x + step * w), (float)Math.Round(s.y)),
new Vector2D((float)Math.Round(s.x + step * w + step), (float)Math.Round(s.y)) });
} }
return shapes; return shapes;
} }
@ -375,7 +376,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
int step = height / slicesV; int step = height / slicesV;
for(int h = 0; h < slicesV; h++) for(int h = 0; h < slicesV; h++)
{ {
shapes.Add(new[] {new Vector2D((int) s.x, (int) s.y + step * h), new Vector2D((int) s.x, (int) s.y + step * h + step)}); shapes.Add(new[] { new Vector2D((float)Math.Round(s.x), (float)Math.Round(s.y + step * h)),
new Vector2D((float)Math.Round(s.x), (float)Math.Round(s.y + step * h + step)) });
} }
return shapes; return shapes;
} }
@ -384,7 +386,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
return new List<Vector2D[]> {new[] {s, e}}; return new List<Vector2D[]> {new[] {s, e}};
} }
// Create shape // Create grid shape
List<Vector2D> rect = new List<Vector2D> { s, new Vector2D((int)s.x, (int)e.y), e, new Vector2D((int)e.x, (int)s.y), s }; List<Vector2D> rect = new List<Vector2D> { s, new Vector2D((int)s.x, (int)e.y), e, new Vector2D((int)e.x, (int)s.y), s };
if(slicesH == 1 && slicesV == 1) if(slicesH == 1 && slicesV == 1)
{ {
@ -397,7 +399,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
RectangleF[,] blocks = new RectangleF[slicesH, slicesV]; RectangleF[,] blocks = new RectangleF[slicesH, slicesV];
for(int w = 0; w < slicesH; w++) for(int w = 0; w < slicesH; w++)
{ {
for(int h = 0; h < slicesV; h++) for(int h = 0; h < slicesV; h++)
{ {
float left = (float)Math.Round(InterpolationTools.Interpolate(s.x, e.x, (float)w / slicesH, horizontalinterpolation)); float left = (float)Math.Round(InterpolationTools.Interpolate(s.x, e.x, (float)w / slicesH, horizontalinterpolation));
float top = (float)Math.Round(InterpolationTools.Interpolate(s.y, e.y, (float)h / slicesV, verticalinterpolation)); float top = (float)Math.Round(InterpolationTools.Interpolate(s.y, e.y, (float)h / slicesV, verticalinterpolation));
@ -412,15 +414,15 @@ namespace CodeImp.DoomBuilder.BuilderModes
{ {
for(int w = 1; w < slicesH; w++) for(int w = 1; w < slicesH; w++)
{ {
int px = (int) Math.Round(blocks[w, 0].X); float px = (float)Math.Round(blocks[w, 0].X);
shapes.Add(new[] {new Vector2D(px, s.y), new Vector2D(px, e.y)}); shapes.Add(new[] { new Vector2D(px, s.y), new Vector2D(px, e.y) });
} }
} }
if(slicesV > 1) if(slicesV > 1)
{ {
for(int h = 1; h < slicesV; h++) for(int h = 1; h < slicesV; h++)
{ {
int py = (int) Math.Round(blocks[0, h].Y); float py = (float)Math.Round(blocks[0, h].Y);
shapes.Add(new[] { new Vector2D(s.x, py), new Vector2D(e.x, py) }); shapes.Add(new[] { new Vector2D(s.x, py), new Vector2D(e.x, py) });
} }
} }

View file

@ -1576,8 +1576,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
foreach(Thing t in selected) foreach(Thing t in selected)
{ {
int newangle = t.AngleDoom + increment; int newangle = t.AngleDoom + increment;
if(General.Map.Config.DoomThingRotationAngles) newangle = (newangle + 22) / 45 * 45; if(General.Map.Config.DoomThingRotationAngles) newangle = newangle / 45 * 45;
t.Rotate(General.ClampAngle(newangle)); t.Rotate(General.ClampAngle(newangle));
} }