forgot add before

This commit is contained in:
Pawel Kolodziejski 2005-01-14 22:25:38 +00:00
parent 43635340dc
commit 07c4acb81e

17
lua.cpp
View file

@ -1436,11 +1436,18 @@ static void LightMgrSetChange() {
} }
static void SetAmbientLight() { static void SetAmbientLight() {
int type = check_int(1); int mode = check_int(1);
if (type != 0) if (mode == 0) {
warning("SetAmbientLight() Set ambient light to %d", type); if (g_engine->currScene() != NULL) {
else g_engine->currScene()->setLightEnableState(true);
;// 0 - seems turn off ambient light }
} else if (mode == 1) {
if (g_engine->currScene() != NULL) {
g_engine->currScene()->setLightEnableState(false);
}
} else {
error("SetAmbientLight() Unknown param %d", mode);
}
} }
static void EngineDisplay() { static void EngineDisplay() {