From bf8cfce50e3f32b84c7fccf470601986d6f7913f Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Sat, 2 Jun 2012 15:47:36 +0300 Subject: Add ObjRef:is_player() and modify ObjRef:get_player_name() to always return a string to aid better inter-object compatibility of code that assumes objects to be players --- doc/lua_api.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/lua_api.txt b/doc/lua_api.txt index 6de255c0d..ddab47262 100644 --- a/doc/lua_api.txt +++ b/doc/lua_api.txt @@ -913,7 +913,8 @@ LuaEntitySAO-only: (no-op for other objects) - get_entity_name() (DEPRECATED: Will be removed in a future version) - get_luaentity() Player-only: (no-op for other objects) -- get_player_name(): will return nil if is not a player +- is_player(): true for players, false for others +- get_player_name(): returns "" if is not a player - get_look_dir(): get camera direction as a unit vector - get_look_pitch(): pitch in radians - get_look_yaw(): yaw in radians (wraps around pretty randomly as of now) -- cgit v1.2.3