Update Changelog, fix assert formatting

This commit is contained in:
Lion Kortlepel 2021-09-17 15:21:06 +02:00
parent 82a5fc3999
commit 3c7109b23f
No known key found for this signature in database
GPG Key ID: 4322FF2B4C71259B
2 changed files with 15 additions and 2 deletions

View File

@ -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 # v2.3.3
- CHANGED servers to be private by default - CHANGED servers to be private by default

View File

@ -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) #define beammp_assert_not_reachable() _assert(__FILE__, __func__, __LINE__, "reached unreachable code", false)
#else #else
// In release build, these macros turn into NOPs. The compiler will optimize these out. // In release build, these macros turn into NOPs. The compiler will optimize these out.
#define beammp_assert(cond) \ #define beammp_assert(cond) \
do { \ do { \
bool result = (cond); \ bool result = (cond); \
if (!result) { \ if (!result) { \
Sentry.LogAssert(#cond, _file_basename, _line, __func__); \ Sentry.LogAssert(#cond, _file_basename, _line, __func__); \
} \ } \
} while (false) } while (false)
#define beammp_assert_not_reachable() \ #define beammp_assert_not_reachable() \
do { \ do { \
Sentry.LogAssert("code is unreachable", _file_basename, _line, __func__); \ Sentry.LogAssert("code is unreachable", _file_basename, _line, __func__); \
} while (false) } while (false)