* Stabilise MoveToWorld
* Fix comments and deprecate ScheduleMoveToWorld
* Enhanced thread safety for m_WorldChangeInfo
* Return unique_ptr from cAtomicUniquePtr::exchange
* cWorld now calls entity cEntity::OnAddToWorld and cEntity::OnRemoveFromWorld.
Allows broadcasting entities added to the world from the world's tick thread.
This also factors out some common code from cEntity::DoMoveToWorld and cEntity::Initialize.
As a consequence, cEntity::Destroy(false) (i.e. Destroying the entity without broadcasting) is impossible.
This isn't used anywhere in Cuberite so it's now deprecated.
* Update entity position after removing it from the world.
Fixes broadcasts being sent to the wrong chunk.
* Fix style
* cEntity: Update LastSentPosition when sending spawn packet
* Add Wno-deprecated-declarations to the lua bindings
* Kill uses of ScheduleMoveToWorld
* Terminate android build script early if any step fails
* Remove deprecated android types
* Use android NDK cmake support rather than cmake android NDK support as that support is better supported
* Android uses GNU strerror_r?
* Fix compilation
* Rebase
* Fix final issues
* Drop submodule changes
* Revert change
* Parentheses
* Lower api levels
* Don't use GNU strerror_r for Android
Co-authored-by: Mat <mail@mathias.is>
This finally restores my ability to compile on Windows and Linux from the same source folder (on a network drive).
LibEvent broke this long ago by writing a config file into the source folder, rather than build folder. Now it's finally fixed.
Closes#4236
CMake now creates a header file in the build directory under the path "include/Globals.h" which just includes "src/Globals.h" with an absolute path. Then instead of adding "src/" to the include directories, it adds "include/".
#include "Globals.h" still works by including the build generated file and any other src-relative path will not work.
Problem: On a new server the players folder was not created on windows.
Root Cause:
`GetUUIDFolderName` was returning a folder structure for players with `/` while CreateFolderRecursively was checking for `\\` for win32.
The fix is to recognise both forward and backward slashes as file separators on windows.
Fixes#4284
* Change reinterpret_cast -> static_cast wherever possible
* Remove more unnecessary `const_cast`s.
reinterpret_casts should be avoided for the same reason as c-style casts - they don't do any type-checking. reinterpret_cast was mainly being used for down-casting in inheritance hierarchies but static_cast works just as well while also making sure that there is actually an inheritance relationship there.
Fixes#4040
* The TCP connection is now shutdown after OnBodyFinished
* Any open connections are closed when cNetworkSingleton::Terminate() is called.
* Removed ownership cycles in cUrlClientRequest
* Added a check to the test to ensure there are no leaks.
* Replaces AppendVPrintf with fmt::sprintf
* fmt::ArgList now used as a type safe alternative to varargs.
* Removed SIZE_T_FMT compatibility macros. fmt::sprintf is fully portable and supports %zu.
* Adds FLOG functions to log with fmt's native formatting style.
* Fixed Clang 5.0 compile errors
* Fixed wrong comment
* Only disable warnings in Clang 5 or higher
* Added a CMake condition for the Clang 5 no-zero-as-null-pointer-constant warning
* Now using the use_nullptr branch of the Cuberite specific SQLiteCpp fork
* Renaming changes:
* macro prefix "POLARSSL" -> "MBEDTLS"
* functions now prefixed with "mbedtls_"
* rename PolarSSL++ -> mbedTLS++
* rename polarssl submodule
* Use mbedtls' AES-CFB8 implementation.
* Add cSslConfig to wrap mbedtls_ssl_config
* Update cTCPLink and cBlockingSslClientSocket to use cSslConfig
* Use cSslConfig in cHTTPServer
* Use cSslConfig for cMojangAPI::SecureRequest
* CI Fixes
* Set -fomit-frame-pointer on the right target
* SelfTests: Added a cEvent stress-test.
* cNetwork: Fixed startup event hang.
The original code used to hang with a ~ 1:50000 chance, because on Linux the cEvent was destroyed before its "Set()" returned.