diff options
Diffstat (limited to 'src/Bindings/ManualBindings.cpp')
-rw-r--r-- | src/Bindings/ManualBindings.cpp | 56 |
1 files changed, 52 insertions, 4 deletions
diff --git a/src/Bindings/ManualBindings.cpp b/src/Bindings/ManualBindings.cpp index 4e7d7c8ef..fbb49d127 100644 --- a/src/Bindings/ManualBindings.cpp +++ b/src/Bindings/ManualBindings.cpp @@ -3954,6 +3954,56 @@ static int tolua_cCompositeChat_UnderlineUrls(lua_State * tolua_S) +static int tolua_cEntity_IsSubmerged(lua_State * tolua_S) +{ + // Check the params: + cLuaState L(tolua_S); + if (!L.CheckParamSelf("cEntity")) + { + return 0; + } + + // Get the params: + cEntity * self = nullptr; + L.GetStackValue(1, self); + + // API function deprecated: + LOGWARNING("cEntity:IsSubmerged() is deprecated. Use cEntity:IsHeadInWater() instead."); + cLuaState::LogStackTrace(tolua_S); + + L.Push(self->IsHeadInWater()); + return 1; +} + + + + + +static int tolua_cEntity_IsSwimming(lua_State * tolua_S) +{ + // Check the params: + cLuaState L(tolua_S); + if (!L.CheckParamSelf("cEntity")) + { + return 0; + } + + // Get the params: + cEntity * self = nullptr; + L.GetStackValue(1, self); + + // API function deprecated + LOGWARNING("cEntity:IsSwimming() is deprecated. Use cEntity:IsInWater() instead."); + cLuaState::LogStackTrace(tolua_S); + + L.Push(self->IsInWater()); + return 1; +} + + + + + static int tolua_cEntity_GetPosition(lua_State * tolua_S) { cLuaState L(tolua_S); @@ -4073,6 +4123,8 @@ void cManualBindings::Bind(lua_State * tolua_S) tolua_beginmodule(tolua_S, "cEntity"); tolua_constant(tolua_S, "INVALID_ID", cEntity::INVALID_ID); + tolua_function(tolua_S, "IsSubmerged", tolua_cEntity_IsSubmerged); + tolua_function(tolua_S, "IsSwimming", tolua_cEntity_IsSwimming); tolua_function(tolua_S, "GetPosition", tolua_cEntity_GetPosition); tolua_function(tolua_S, "GetSpeed", tolua_cEntity_GetSpeed); tolua_endmodule(tolua_S); @@ -4238,7 +4290,3 @@ void cManualBindings::Bind(lua_State * tolua_S) tolua_endmodule(tolua_S); } - - - - |