7d4934534e
* 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
55 lines
884 B
CMake
55 lines
884 B
CMake
|
|
SET (SRCS
|
|
CriticalSection.cpp
|
|
Errors.cpp
|
|
Event.cpp
|
|
File.cpp
|
|
GZipFile.cpp
|
|
HostnameLookup.cpp
|
|
IPLookup.cpp
|
|
IsThread.cpp
|
|
NetworkInterfaceEnum.cpp
|
|
NetworkLookup.cpp
|
|
NetworkSingleton.cpp
|
|
ServerHandleImpl.cpp
|
|
StackTrace.cpp
|
|
TCPLinkImpl.cpp
|
|
UDPEndpointImpl.cpp
|
|
WinStackWalker.cpp
|
|
)
|
|
|
|
SET (HDRS
|
|
AtomicUniquePtr.h
|
|
CriticalSection.h
|
|
Errors.h
|
|
Event.h
|
|
File.h
|
|
GetAddressInfoError.h
|
|
GZipFile.h
|
|
HostnameLookup.h
|
|
IPLookup.h
|
|
IsThread.h
|
|
Network.h
|
|
NetworkLookup.h
|
|
NetworkSingleton.h
|
|
Queue.h
|
|
ServerHandleImpl.h
|
|
StackTrace.h
|
|
TCPLinkImpl.h
|
|
UDPEndpointImpl.h
|
|
WinStackWalker.h
|
|
)
|
|
|
|
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
|
add_flags_cxx("-Wno-error=global-constructors ")
|
|
endif()
|
|
|
|
if(NOT MSVC)
|
|
add_library(OSSupport ${SRCS} ${HDRS})
|
|
target_link_libraries(OSSupport fmt::fmt)
|
|
|
|
if(NOT WIN32)
|
|
target_link_libraries(OSSupport event_pthreads_static)
|
|
endif()
|
|
endif()
|