diff options
author | Max Luchterhand <52720531+maxluchterhand1@users.noreply.github.com> | 2020-03-21 17:00:26 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-21 17:00:26 +0100 |
commit | 4f60eaabcae03c77958585b4b4e843f479955aae (patch) | |
tree | a374f6b3c2a77e458b49b6e0cbc270cf851a9a77 | |
parent | Don't call player movement hook if nothing changed (#4517) (diff) | |
download | cuberite-4f60eaabcae03c77958585b4b4e843f479955aae.tar cuberite-4f60eaabcae03c77958585b4b4e843f479955aae.tar.gz cuberite-4f60eaabcae03c77958585b4b4e843f479955aae.tar.bz2 cuberite-4f60eaabcae03c77958585b4b4e843f479955aae.tar.lz cuberite-4f60eaabcae03c77958585b4b4e843f479955aae.tar.xz cuberite-4f60eaabcae03c77958585b4b4e843f479955aae.tar.zst cuberite-4f60eaabcae03c77958585b4b4e843f479955aae.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Bindings/LuaState.cpp | 10 | ||||
-rw-r--r-- | src/Bindings/LuaState.h | 1 |
2 files changed, 11 insertions, 0 deletions
diff --git a/src/Bindings/LuaState.cpp b/src/Bindings/LuaState.cpp index c1e71bd5c..ad1021001 100644 --- a/src/Bindings/LuaState.cpp +++ b/src/Bindings/LuaState.cpp @@ -949,6 +949,16 @@ void cLuaState::Push(bool a_Value) +void cLuaState::Push(const cEntity * a_Entity) +{ + // Once we can make Lua understand constness, this function shall receive a corresponding function body + Push(const_cast<cEntity * >(a_Entity)); +} + + + + + void cLuaState::Push(cEntity * a_Entity) { ASSERT(IsValid()); diff --git a/src/Bindings/LuaState.h b/src/Bindings/LuaState.h index 362f16e21..3220992cb 100644 --- a/src/Bindings/LuaState.h +++ b/src/Bindings/LuaState.h @@ -624,6 +624,7 @@ public: // Push a simple value onto the stack (keep alpha-sorted): void Push(bool a_Value); void Push(cEntity * a_Entity); + void Push(const cEntity * a_Entity); void Push(cLuaServerHandle * a_ServerHandle); void Push(cLuaTCPLink * a_TCPLink); void Push(cLuaUDPEndpoint * a_UDPEndpoint); |