Add lua entity_list function GetShuffledClientList()

There is cases where we need to get a random client, but
GetRandomClient() is not sufficient enough due to complex predicates
required on what tells us is a valid client. This way we can just loop
over a shuffled list and verify a client is valid instead of multiple
GetRandomClient() calls.
This commit is contained in:
Michael Cook (mackal)
2018-08-05 22:55:30 -04:00
parent 93749bc509
commit e3c01d4143
2 changed files with 18 additions and 0 deletions
+1
View File
@@ -101,6 +101,7 @@ public:
Lua_Client GetRandomClient(float x, float y, float z, float dist, Lua_Client exclude);
Lua_Mob_List GetMobList();
Lua_Client_List GetClientList();
Lua_Client_List GetShuffledClientList();
Lua_NPC_List GetNPCList();
Lua_Corpse_List GetCorpseList();
Lua_Object_List GetObjectList();