diff --git a/Changelog.md b/Changelog.md index f4df1f1..4526f1a 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,3 +1,16 @@ +# v2.4.0 + +- CHANGED entire plugin Lua implementation (rewrite) +- CHANGED moved *all* functions into MP.\* +- CHANGED all files of a Lua plugin to share a Lua state +- ADDED `MP.GetOSName() -> string`: Returns "Linux", "Windows" or "Other" +- ADDED `MP.GetServerVersion() -> string`: Returns major,minor,patch version +- ADDED `MP.IsPlayerGuest(id) -> boolean`: Whether player with id is a guest +- ADDED `MP.Settings` table providing aliases for 0,1,2,etc. in MP.Set(id,val) +- ADDED plugin directories to `package.path` and `package.cpath` before `onInit` +- ADDED ability to add `PluginConfig.toml` to your plugin folder to change some settings +- ADDED ability to share a lua state with other plugins via `StateId` setting in `PluginConfig.toml` + # v2.3.3 - CHANGED servers to be private by default diff --git a/include/CustomAssert.h b/include/CustomAssert.h index 5465651..73179f0 100644 --- a/include/CustomAssert.h +++ b/include/CustomAssert.h @@ -59,14 +59,14 @@ inline void _assert([[maybe_unused]] const char* file, [[maybe_unused]] const ch #define beammp_assert_not_reachable() _assert(__FILE__, __func__, __LINE__, "reached unreachable code", false) #else // In release build, these macros turn into NOPs. The compiler will optimize these out. -#define beammp_assert(cond) \ +#define beammp_assert(cond) \ do { \ bool result = (cond); \ if (!result) { \ Sentry.LogAssert(#cond, _file_basename, _line, __func__); \ } \ } while (false) -#define beammp_assert_not_reachable() \ +#define beammp_assert_not_reachable() \ do { \ Sentry.LogAssert("code is unreachable", _file_basename, _line, __func__); \ } while (false)