resetmap/startmap cleanup

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@2780 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Lee Salzman
2008-09-27 17:52:46 +00:00
parent cb22175368
commit 92b60f874b
4 changed files with 27 additions and 22 deletions
+6 -8
View File
@@ -273,9 +273,6 @@ void setupworld(int factor)
void empty_world(int factor, bool force) // main empty world creation routine, if passed factor -1 will enlarge old world by 1
{
if(!force && noteditmode()) return;
cleardynlights();
pruneundos();
clearworldsounds();
sqr *oldworld = world;
bool copy = false;
if(oldworld && factor<0) { factor = sfactor+1; copy = true; }
@@ -327,11 +324,7 @@ void empty_world(int factor, bool force) // main empty world creation routine
}
calclight();
if(factor>=0)
{
findplayerstart(player1, true);
startmap("");
}
if(factor>=0) resetmap();
if(oldworld)
{
delete[] oldworld;
@@ -346,6 +339,11 @@ void empty_world(int factor, bool force) // main empty world creation routine
setvar("fullbright", 1, true);
}
}
if(factor>=0)
{
findplayerstart(player1, true);
startmap("");
}
}
void mapenlarge() { empty_world(-1, false); }