Skip to content

Commit f3d80a7

Browse files
author
Luxy.c
authored
Add clientside lua function resetBlurLevel (#1266)
* Add Clientside lua function `resetBlurLevel` * Add `resetPlayerBlurLevel` which is an alias to `resetBlurLevvel` * Revert "Add `resetPlayerBlurLevel` which is an alias to `resetBlurLevvel`" This reverts commit 7676322. * Move `getBlurLevel` back in place and remove cast * Addendum to previous commit
1 parent 6757645 commit f3d80a7

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

Client/mods/deathmatch/logic/lua/CLuaFunctionDefs.World.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -549,6 +549,13 @@ int CLuaFunctionDefs::SetBlurLevel(lua_State* luaVM)
549549
return 1;
550550
}
551551

552+
int CLuaFunctionDefs::ResetBlurLevel(lua_State* luaVM)
553+
{
554+
g_pGame->SetBlurLevel(36);
555+
lua_pushboolean(luaVM, true);
556+
return 1;
557+
}
558+
552559
int CLuaFunctionDefs::SetTime(lua_State* luaVM)
553560
{
554561
// bool setTime ( int hour, int minute )

Client/mods/deathmatch/logic/lua/CLuaFunctionDefs.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ class CLuaFunctionDefs
124124
LUA_DECLARE(SetGarageOpen);
125125
LUA_DECLARE(SetWorldSpecialPropertyEnabled);
126126
LUA_DECLARE(SetBlurLevel);
127+
LUA_DECLARE(ResetBlurLevel);
127128
LUA_DECLARE(SetJetpackMaxHeight);
128129
LUA_DECLARE(SetCloudsEnabled);
129130
LUA_DECLARE(GetCloudsEnabled);

Client/mods/deathmatch/logic/lua/CLuaManager.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,7 @@ void CLuaManager::LoadCFunctions()
316316
{"setGarageOpen", CLuaFunctionDefs::SetGarageOpen},
317317
{"setWorldSpecialPropertyEnabled", CLuaFunctionDefs::SetWorldSpecialPropertyEnabled},
318318
{"setBlurLevel", CLuaFunctionDefs::SetBlurLevel},
319+
{"resetBlurLevel", CLuaFunctionDefs::ResetBlurLevel},
319320
{"setJetpackMaxHeight", CLuaFunctionDefs::SetJetpackMaxHeight},
320321
{"setCloudsEnabled", CLuaFunctionDefs::SetCloudsEnabled},
321322
{"setTrafficLightState", CLuaFunctionDefs::SetTrafficLightState},

0 commit comments

Comments
 (0)