1
0
Fork 0
Commit Graph

39 Commits

Author SHA1 Message Date
peterbell10 84289a2ba9
Cleanup some workarounds and warnings (#4735)
* Cleanup thread_local usage in FastRandom

* Use constexpr to avoid clang warning

* Fix more Wglobal-constructor warnings

* Make MSVC happy?
2020-05-10 16:16:49 +00:00
Mat 7d4934534e
Stabilise MoveToWorld (#4004)
* 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
2020-03-05 12:52:34 +02:00
Mattes D f021e2fe22 Updated LibEvent to release 2.1.11-stable. (#4383)
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.
2019-09-04 22:34:54 +01:00
peterbell10 ee84197014
Force all headers other than "Globals.h" to be included with relative paths (#4269)
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.
2018-08-29 01:51:25 +01:00
peterbell10 757231cc6e
Add the fmt library (#4065)
* 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.
2018-01-03 17:41:16 +00:00
Mattes D 7ac3b0fa0b Removed the LeakFinder for Windows. (#3777) 2017-06-19 11:05:19 +02:00
peterbell10 035ecdc9e2 Replace evdns with getaddrinfo and getnameinfo (#3766) 2017-06-15 11:03:49 +02:00
Tiger Wang 8c6d0b51c7 Use CMake's Android generators to crosscompile 2016-12-12 14:32:32 +00:00
Mattes D 8eaa8613da CMake: Remove needless minimum version specifications. 2016-07-18 22:11:42 +02:00
Mattes D 80e1eb37dd Renamed leftover strings to Cuberite / Server, as needed.
Also upgraded the user setting file for MSVC to 2013.
2016-01-01 21:05:09 +01:00
Samuel Barney 804805d35a Silenced and fixed many warning messages across multiple files. 2015-07-29 09:49:30 -06:00
Cengiz Can c967698b2d Skip unknown cflag for Apple clang & remove cSemaphore 2015-06-04 11:48:56 +03:00
tycho dae9e5792a Made -Weverything an error. 2015-05-24 12:56:56 +01:00
tycho a5624debcb Fix tests 2015-05-23 13:21:02 +01:00
Mattes D c758482ece cNetwork: Added EnumLocalIPAddresses() function. 2015-02-22 10:51:16 +01:00
Mattes D 9c5162041e cNetwork: Added UDP API. 2015-02-20 14:28:05 +01:00
Mattes D f243aa387c Removed ListenThread and SocketThreads.
They have been replaced by the cNetwork API.
Socket.cpp is still used by RCONClient.
2015-01-27 14:53:32 +01:00
Mattes D 80a386cbc4 Fixed missing LibEvent reference in OSSupport. 2015-01-27 14:53:26 +01:00
Mattes D c0cb787c10 cNetwork: Split the main cpp file into several files. 2015-01-22 20:13:02 +01:00
Mattes D d3076a3e16 cNetwork: Split cNetworkSingleton to a separate file. 2015-01-22 20:13:00 +01:00
Mattes D 6f5e267d58 Implemented LibEvent-based client connections. 2015-01-22 20:12:40 +01:00
Mattes D c014f5624c Merged branch 'origin/master' into c++11. 2014-12-04 22:04:16 +01:00
Mattes D 201313a9f8 Added a basic stacktracing for assert and signal failures. 2014-11-29 23:06:10 +01:00
Mattes D 765bf006ad Merged branch 'master' into c++11. 2014-10-24 10:19:13 +02:00
archshift dd86c1f4a3 OSSupport/CMakeLists.txt: fixed indentation 2014-10-23 23:49:20 -07:00
archshift 8ccb729504 Fixed potential linker errors with mingw, as it isn't MSVC and it isn't APPLE. 2014-10-23 15:03:54 -07:00
archshift 6bcc2c187a Fix linking on OS X, which does not have librt. 2014-10-23 14:58:42 -07:00
Tiger Wang 2b920f9e21 Compile fix? 2014-10-21 13:49:53 +01:00
Tiger Wang bde99d684e Migrated cSleep and cTimer to std::chrono 2014-10-20 18:59:40 +01:00
Tiger Wang 6d5a8892f3 Use std::thread 2014-10-19 00:29:34 +01:00
worktycho a20bd0dbbd Update CMakeLists.txt 2014-10-05 23:44:55 +01:00
archshift 725d1fd1e2 Subdirs: Only add_library if not using MSVC 2014-07-18 17:41:43 -07:00
archshift dcaa3262a2 OSSupport/CMakeLists.txt: Replaced glob with list of files 2014-07-18 17:41:43 -07:00
archshift e47dab84f3 Cmake generated projects for IDEs include headers in project files. 2014-04-25 09:56:15 -07:00
Tycho Bickerstaff e02fbd37ab added pthread linking code to OSSupport 2013-12-19 00:15:30 +00:00
Tycho Bickerstaff 712f7d5a23 added tolua++ command and removed stackwalker from build 2013-12-10 22:59:53 +00:00
Tycho Bickerstaff daccfd9c6e more cmake changes 2013-12-10 22:43:21 +00:00
Tycho Bickerstaff 6cdc990884 more cmake 2013-12-10 21:39:20 +00:00
Tycho Bickerstaff b91cfb8765 started work on cmake 2013-12-10 18:41:43 +00:00