Ported 3.3.4.2 fixes to trunk

This commit is contained in:
Mark Vejvoda
2010-04-23 04:29:11 +00:00
5 changed files with 48 additions and 16 deletions

View File

@@ -3,8 +3,8 @@
//
// Copyright (C) 2001-2005 Marti<74>o Figueroa
//
// You can redistribute this code and/or modify it under
// the terms of the GNU General Public License as published
// You can redistribute this code and/or modify it under
// the terms of the GNU General Public License as published
// by the Free Software Foundation; either version 2 of the
// License, or (at your option) any later version
// ==============================================================
@@ -71,6 +71,7 @@ void ScriptManager::init(World* world, GameCamera *gameCamera){
luaScript.registerFunction(getLastDeadUnitId, "lastDeadUnit");
luaScript.registerFunction(getUnitCount, "unitCount");
luaScript.registerFunction(getUnitCountOfType, "unitCountOfType");
luaScript.registerFunction(unfogMap, "unfogMap");
//load code
@@ -396,4 +397,14 @@ int ScriptManager::getUnitCountOfType(LuaHandle* luaHandle){
return luaArguments.getReturnCount();
}
void ScriptManager::unfogMap() {
world->setFogOfWar(false);
}
int ScriptManager::unfogMap(LuaHandle* luaHandle){
LuaArguments luaArguments(luaHandle);
thisScriptManager->unfogMap();
return luaArguments.getReturnCount();
}
}}//end namespace