summaryrefslogtreecommitdiff
path: root/src/script/lua_api/l_object.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/script/lua_api/l_object.cpp')
-rw-r--r--src/script/lua_api/l_object.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/script/lua_api/l_object.cpp b/src/script/lua_api/l_object.cpp
index 4e4901db5..bc150d70f 100644
--- a/src/script/lua_api/l_object.cpp
+++ b/src/script/lua_api/l_object.cpp
@@ -1023,7 +1023,7 @@ int ObjectRef::l_is_player_connected(lua_State *L)
NO_MAP_LOCK_REQUIRED;
ObjectRef *ref = checkobject(L, 1);
RemotePlayer *player = getplayer(ref);
- lua_pushboolean(L, (player != NULL && player->peer_id != 0));
+ lua_pushboolean(L, (player != NULL && player->getPeerId() != PEER_ID_INEXISTENT));
return 1;
}