Lots of work on documenting class LuaStack

This commit is contained in:
2024-03-20 14:29:20 -04:00
parent 3d6b5224f3
commit bb83837377
7 changed files with 981 additions and 479 deletions

View File

@@ -32,6 +32,13 @@
#include <cstdarg>
#include "spookyv2.hpp"
enum WorldType {
WORLD_TYPE_MASTER = 1,
WORLD_TYPE_PREDICTIVE = 2,
};
namespace sv {
// Bring this into our namespace.
@@ -320,6 +327,9 @@ double distance_squared(double x1, double y1, double x2, double y2);
// Make a LuaSourceVec with one element, for unit testing.
LuaSourcePtr make_lua_source(const eng::string &code);
// Return true if the worldtype is authoritative.
inline bool is_authoritative(WorldType t) { return (t == WORLD_TYPE_MASTER); }
// Remove items from a vector that are nullptr.
template<class T>
void remove_nullptrs(T &vec) {