- renamed visual mode thing

- visual mode thing can now be placed/moved in any classic mode with a shortcut key
- visual mode thing flags are all set to false (off) when map is saved (to prevent it from appearing in game)
This commit is contained in:
codeimp 2009-01-03 22:42:08 +00:00
parent d174544cd6
commit 75d2b8b4e5
24 changed files with 90 additions and 21 deletions

View file

@ -2549,7 +2549,7 @@ thingtypes
error = 0;
fixedsize = true;
32000 = "3D Mode start";
32000 = "Visual Mode camera";
}
players

View file

@ -1036,7 +1036,7 @@ thingtypes
error = 0;
fixedsize = true;
32000 = "3D Mode start";
32000 = "Visual Mode camera";
}
players

View file

@ -1265,7 +1265,7 @@ thingtypes
error = 0;
fixedsize = true;
32000 = "3D Mode start";
32000 = "Visual Mode camera";
}
players

View file

@ -2495,7 +2495,7 @@ thingtypes
error = 0;
fixedsize = true;
32000 = "3D Mode start";
32000 = "Visual Mode camera";
}
players

View file

@ -2819,7 +2819,7 @@ thingtypes
error = 0;
fixedsize = true;
32000 = "3D Mode start";
32000 = "Visual Mode camera";
}
players

View file

@ -2458,7 +2458,7 @@ thingtypes
error = 0;
fixedsize = true;
32000 = "3D Mode start";
32000 = "Visual Mode camera";
}
players

View file

@ -1091,7 +1091,7 @@ thingtypes
error = 0;
fixedsize = true;
32000 = "3D Mode start";
32000 = "Visual Mode camera";
}
players

View file

@ -2272,7 +2272,7 @@ thingtypes
error = 0;
fixedsize = true;
32000 = "3D Mode start";
32000 = "Visual Mode camera";
}
players

View file

@ -2629,7 +2629,7 @@ thingtypes
error = 0;
fixedsize = true;
32000 = "3D Mode start";
32000 = "Visual Mode camera";
}
players

View file

@ -2601,7 +2601,7 @@ thingtypes
error = 0;
fixedsize = true;
32000 = "3D Mode start";
32000 = "Visual Mode camera";
}
players

View file

@ -2551,7 +2551,7 @@ thingtypes
error = 0;
fixedsize = true;
32000 = "3D Mode start";
32000 = "Visual Mode camera";
}
players

View file

@ -4555,7 +4555,7 @@ thingtypes
error = 0;
fixedsize = true;
32000 = "3D Mode start";
32000 = "Visual Mode camera";
}
cameras

View file

@ -1849,7 +1849,7 @@ thingtypes
sort = 1;
fixedsize = true;
32000 = "3D Mode start";
32000 = "Visual Mode camera";
}
players

View file

@ -1254,7 +1254,7 @@ thingtypes
error = 0;
fixedsize = true;
32000 = "3D Mode start";
32000 = "Visual Mode camera";
}
players

View file

@ -2624,7 +2624,7 @@ thingtypes
hangs = 0;
fixedsize = true;
32000 = "3D Mode start";
32000 = "Visual Mode camera";
}
players

View file

@ -4848,7 +4848,7 @@ thingtypes
error = 0;
fixedsize = true;
32000 = "3D Mode start";
32000 = "Visual Mode camera";
}
cameras

View file

@ -5069,7 +5069,7 @@ thingtypes
error = 0;
fixedsize = true;
32000 = "3D Mode start";
32000 = "Visual Mode camera";
}
cameras

View file

@ -4861,7 +4861,7 @@ thingtypes
sort = 1;
fixedsize = true;
32000 = "3D Mode start";
32000 = "Visual Mode camera";
}
cameras

View file

@ -4707,7 +4707,7 @@ thingtypes
error = 0;
fixedsize = true;
32000 = "3D Mode start";
32000 = "Visual Mode camera";
}
cameras

View file

@ -4868,7 +4868,7 @@ thingtypes
sort = 1;
fixedsize = true;
32000 = "3D Mode start";
32000 = "Visual Mode camera";
}
cameras

View file

@ -1288,7 +1288,7 @@ thingtypes
error = 0;
fixedsize = true;
32000 = "3D Mode start";
32000 = "Visual Mode camera";
}
players

View file

@ -105,5 +105,54 @@ namespace CodeImp.DoomBuilder.BuilderModes
}
#endregion
#region ================== Actions
[BeginAction("placevisualstart")]
public void PlaceVisualStartThing()
{
bool onefound = false;
// Not during volatile mode
if(this.Attributes.Volatile) return;
// Mouse must be inside window
if(!mouseinside) return;
// Go for all things
foreach(Thing t in General.Map.Map.Things)
{
if(t.Type == General.Map.Config.Start3DModeThingType)
{
if(!onefound)
{
// Move this thing
t.Move(mousemappos);
onefound = true;
}
else
{
// One was already found and moved, delete this one
t.Dispose();
}
}
}
// No thing found?
if(!onefound)
{
// Make a new one
Thing t = General.Map.Map.CreateThing();
t.Type = General.Map.Config.Start3DModeThingType;
t.Move(mousemappos);
t.UpdateConfiguration();
General.Map.ThingsFilter.Update();
}
// Redraw display to show changes
General.Interface.RedrawDisplay();
}
#endregion
}
}

View file

@ -476,3 +476,13 @@ togglegravity
allowmouse = true;
allowscroll = true;
}
placevisualstart
{
title = "Place Visual Mode Camera";
category = "classic";
description = "Places a new, or moves the existing, Visual Mode start thing to the mouse position. This thing will keep track where you left Visual Mode so that you return to Visual Mode in the same location.";
allowkeys = true;
allowmouse = true;
allowscroll = true;
}

View file

@ -392,6 +392,16 @@ namespace CodeImp.DoomBuilder
// Make a copy of the map data
outputset = map.Clone();
// Remove all flags from all 3D Start things
foreach(Thing t in outputset.Things)
{
if(t.Type == config.Start3DModeThingType)
{
List<string> flagkeys = new List<string>(t.Flags.Keys);
foreach(string k in flagkeys) t.Flags[k] = false;
}
}
// Do we need sidedefs compression?
if(map.Sidedefs.Count > io.MaxSidedefs)
{