Skip to content

Commit 8ec574a

Browse files
committed
Add Clientside lua function resetBlurLevel
1 parent ad78737 commit 8ec574a

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
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(static_cast<unsigned char>(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: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ class CLuaFunctionDefs
100100
LUA_DECLARE(GetGarageSize);
101101
LUA_DECLARE(GetGarageBoundingBox);
102102
LUA_DECLARE(IsWorldSpecialPropertyEnabled);
103-
LUA_DECLARE(GetBlurLevel);
104103
LUA_DECLARE(GetTrafficLightState);
105104
LUA_DECLARE(AreTrafficLightsLocked);
106105
LUA_DECLARE(GetJetpackMaxHeight);
@@ -124,6 +123,8 @@ class CLuaFunctionDefs
124123
LUA_DECLARE(SetGarageOpen);
125124
LUA_DECLARE(SetWorldSpecialPropertyEnabled);
126125
LUA_DECLARE(SetBlurLevel);
126+
LUA_DECLARE(GetBlurLevel);
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: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,6 @@ void CLuaManager::LoadCFunctions()
274274
{"getGaragePosition", CLuaFunctionDefs::GetGaragePosition},
275275
{"getGarageSize", CLuaFunctionDefs::GetGarageSize},
276276
{"getGarageBoundingBox", CLuaFunctionDefs::GetGarageBoundingBox},
277-
{"getBlurLevel", CLuaFunctionDefs::GetBlurLevel},
278277
{"getTrafficLightState", CLuaFunctionDefs::GetTrafficLightState},
279278
{"areTrafficLightsLocked", CLuaFunctionDefs::AreTrafficLightsLocked},
280279
{"getSkyGradient", CLuaFunctionDefs::GetSkyGradient},
@@ -316,6 +315,8 @@ void CLuaManager::LoadCFunctions()
316315
{"setGarageOpen", CLuaFunctionDefs::SetGarageOpen},
317316
{"setWorldSpecialPropertyEnabled", CLuaFunctionDefs::SetWorldSpecialPropertyEnabled},
318317
{"setBlurLevel", CLuaFunctionDefs::SetBlurLevel},
318+
{"getBlurLevel", CLuaFunctionDefs::GetBlurLevel},
319+
{"resetBlurLevel", CLuaFunctionDefs::ResetBlurLevel},
319320
{"setJetpackMaxHeight", CLuaFunctionDefs::SetJetpackMaxHeight},
320321
{"setCloudsEnabled", CLuaFunctionDefs::SetCloudsEnabled},
321322
{"setTrafficLightState", CLuaFunctionDefs::SetTrafficLightState},

0 commit comments

Comments
 (0)