1
0
Fork 0
cuberite-2a/src
Tiger Wang 054a89dd9e Clarify cClientHandle, cPlayer ownership semantics
+ A cPlayer, once created, has a strong pointer to the cClientHandle. The player ticks the clienthandle. If he finds the handle destroyed, he destroys himself in turn. Nothing else can kill the player.
* The client handle has a pointer to the player. Once a player is created, the client handle never outlasts the player, nor does it manage the player's lifetime. The pointer is always safe to use after FinishAuthenticate, which is also the point where cProtocol is put into the Game state that allows player manipulation.
+ Entities are once again never lost by constructing a chunk when they try to move into one that doesn't exist.
* Fixed a forgotten Super invocation in cPlayer::OnRemoveFromWorld.
* Fix SaveToDisk usage in destructor by only saving things cPlayer owns, instead of accessing cWorld.
2021-01-12 12:34:34 +00:00
..
Bindings zlib -> libdeflate (#5085) 2021-01-11 16:39:43 +00:00
BlockEntities Fix potential destruction crashes (#5095) 2021-01-02 13:50:34 +00:00
Blocks Convert most calls to blocking GetHeight/GetBiomeAt to direct chunk accesses 2021-01-11 16:39:56 +00:00
Entities Clarify cClientHandle, cPlayer ownership semantics 2021-01-12 12:34:34 +00:00
Generating zlib -> libdeflate (#5085) 2021-01-11 16:39:43 +00:00
HTTP HTTPServerConnection: more robust error handling 2020-11-14 12:24:42 +00:00
Items Warnings improvements 2020-12-18 21:03:40 +00:00
Mobs Clarify cClientHandle, cPlayer ownership semantics 2021-01-12 12:34:34 +00:00
Noise Upgrade to C++17 [CMake] (#4717) 2020-05-16 20:59:10 +01:00
OSSupport zlib -> libdeflate (#5085) 2021-01-11 16:39:43 +00:00
Physics Comment and code style fix 2020-12-21 13:52:06 +00:00
Protocol Clarify cClientHandle, cPlayer ownership semantics 2021-01-12 12:34:34 +00:00
Registries Prepare for 1.15+ (#4856) 2020-12-21 13:54:04 +00:00
Resources zh-cn translation in resource file 2020-07-23 21:17:50 +01:00
Simulator Convert most calls to blocking GetHeight/GetBiomeAt to direct chunk accesses 2021-01-11 16:39:56 +00:00
UI Fix potential destruction crashes (#5095) 2021-01-02 13:50:34 +00:00
WorldStorage zlib -> libdeflate (#5085) 2021-01-11 16:39:43 +00:00
mbedTLS++ zlib -> libdeflate (#5085) 2021-01-11 16:39:43 +00:00
AllocationPool.h Cleanup unneeded globals (#4736) 2020-05-10 16:16:38 +00:00
BiomeDef.cpp Deleted BiomeDef.h and ChunkDef.h from Globals.h (#4885) 2020-09-25 09:13:59 +00:00
BiomeDef.h Deleted BiomeDef.h and ChunkDef.h from Globals.h (#4885) 2020-09-25 09:13:59 +00:00
BlockArea.cpp BlockHandler initialisation is a constant expression (#4891) 2020-09-20 13:50:52 +00:00
BlockArea.h BlockHandler initialisation is a constant expression (#4891) 2020-09-20 13:50:52 +00:00
BlockInServerPluginInterface.h Refactored block-to-pickup conversion. (#4417) 2019-10-16 10:06:34 +02:00
BlockInfo.cpp BlockInfo: float-equal for Clang only 2020-11-28 20:49:33 +00:00
BlockInfo.h TNT Changes (#4970) 2020-10-24 18:48:48 +01:00
BlockState.h Prepare for 1.15+ (#4856) 2020-12-21 13:54:04 +00:00
BlockTracer.h Deleted BiomeDef.h and ChunkDef.h from Globals.h (#4885) 2020-09-25 09:13:59 +00:00
BlockType.cpp Cleanup some workarounds and warnings (#4735) 2020-05-10 16:16:49 +00:00
BlockType.h Adding Silverfish Spawning Blocks (#4946) 2020-10-11 15:27:41 +00:00
BoundingBox.cpp Enable some more clang-tidy linter checks (#4738) 2020-05-14 22:15:35 +00:00
BoundingBox.h cBoundingBox: Fix tolua warning (#4361) 2019-08-08 19:49:00 +01:00
BrewingRecipes.cpp Replaced cpp14::make_unique<> with std::make_unique<>. 2020-08-01 20:04:31 +01:00
BrewingRecipes.h Minor cBrewingRecipes cleanup (#3731) 2017-05-28 20:08:23 +02:00
Broadcaster.cpp Broadcaster: don't loop over all entities to broadcast one's position 2020-08-28 21:41:18 +01:00
BuildInfo.h.cmake Added abilty to set build info 2014-09-10 16:07:00 +01:00
ByteBuffer.cpp zlib -> libdeflate (#5085) 2021-01-11 16:39:43 +00:00
ByteBuffer.h zlib -> libdeflate (#5085) 2021-01-11 16:39:43 +00:00
CMakeLists.txt zlib -> libdeflate (#5085) 2021-01-11 16:39:43 +00:00
ChatColor.cpp Removed extended ASCII, and added a check against it. (#4642) 2020-04-12 09:24:30 +02:00
ChatColor.h Bulk clearing of whitespace 2016-02-05 23:50:18 +02:00
CheckBasicStyle.lua Prepare for 1.15+ (#4856) 2020-12-21 13:54:04 +00:00
Chunk.cpp Clarify cClientHandle, cPlayer ownership semantics 2021-01-12 12:34:34 +00:00
Chunk.h Convert most calls to blocking GetHeight/GetBiomeAt to direct chunk accesses 2021-01-11 16:39:56 +00:00
ChunkData.cpp Pulled the BlockID and BlockInfo headers from Globals.h. (#4591) 2020-04-03 08:57:01 +02:00
ChunkData.h Deleted BiomeDef.h and ChunkDef.h from Globals.h (#4885) 2020-09-25 09:13:59 +00:00
ChunkDataCallback.h Replaced cpp14::make_unique<> with std::make_unique<>. 2020-08-01 20:04:31 +01:00
ChunkDef.h Chunk: use FAST_FLOOR_DIV 2020-12-21 13:52:15 +00:00
ChunkGeneratorThread.cpp cWorld * -> cWorld (#4771) 2020-07-14 17:57:30 +01:00
ChunkGeneratorThread.h Deleted BiomeDef.h and ChunkDef.h from Globals.h (#4885) 2020-09-25 09:13:59 +00:00
ChunkMap.cpp Clarify cClientHandle, cPlayer ownership semantics 2021-01-12 12:34:34 +00:00
ChunkMap.h Convert most calls to blocking GetHeight/GetBiomeAt to direct chunk accesses 2021-01-11 16:39:56 +00:00
ChunkSender.cpp Clarify cClientHandle, cPlayer ownership semantics 2021-01-12 12:34:34 +00:00
ChunkSender.h Clarify cClientHandle, cPlayer ownership semantics 2021-01-12 12:34:34 +00:00
ChunkStay.cpp Bulk clearing of whitespace 2016-02-05 23:50:18 +02:00
ChunkStay.h Deleted BiomeDef.h and ChunkDef.h from Globals.h (#4885) 2020-09-25 09:13:59 +00:00
CircularBufferCompressor.cpp zlib -> libdeflate (#5085) 2021-01-11 16:39:43 +00:00
CircularBufferCompressor.h Clarify cClientHandle, cPlayer ownership semantics 2021-01-12 12:34:34 +00:00
ClientHandle.cpp Clarify cClientHandle, cPlayer ownership semantics 2021-01-12 12:34:34 +00:00
ClientHandle.h Clarify cClientHandle, cPlayer ownership semantics 2021-01-12 12:34:34 +00:00
Color.cpp Leather Armor can now be dyed. 2015-07-15 14:05:36 -06:00
Color.h Lua plugin cColor (#3833) 2017-07-12 12:30:43 +02:00
CommandOutput.cpp Update submodules 2020-07-23 00:32:47 +01:00
CommandOutput.h Update submodules 2020-07-23 00:32:47 +01:00
CompositeChat.cpp changing cComposite Chat to newer c++ standart (#5028) 2020-11-11 22:38:51 +01:00
CompositeChat.h changing cComposite Chat to newer c++ standart (#5028) 2020-11-11 22:38:51 +01:00
CraftingRecipes.cpp Replaced cpp14::make_unique<> with std::make_unique<>. 2020-08-01 20:04:31 +01:00
CraftingRecipes.h Introduce recipe book functionality (#4493) 2020-07-14 17:56:42 +01:00
Cuberite.vcxproj.user Added working directory for x64 builds (#4037) 2017-09-20 19:01:46 +01:00
Cuboid.cpp Added more clamping operations to cCuboid. 2019-08-10 12:25:06 +02:00
Cuboid.h Added a basic PalettedBlockArea implementation (#4377) 2019-08-28 08:29:02 +02:00
DeadlockDetect.cpp Using Super. 2020-04-16 20:07:48 +00:00
DeadlockDetect.h Cleanup unneeded globals (#4736) 2020-05-10 16:16:38 +00:00
Defines.cpp Added magma block contact damage (#5055) 2020-11-25 17:56:55 +00:00
Defines.h ViewDistance: unsigned -> signed 2020-12-26 16:58:53 +00:00
EffectID.h Update tolua and export EffectID 2017-06-29 18:58:48 +02:00
Enchantments.cpp Warnings improvements 2020-12-18 21:03:40 +00:00
Enchantments.h Warnings improvements 2020-12-18 21:03:40 +00:00
Endianness.h Fixes compilation failures on MacOSX 10.10 2015-07-09 11:15:37 -06:00
FastRandom.cpp Cleanup some workarounds and warnings (#4735) 2020-05-10 16:16:49 +00:00
FastRandom.h Tentative fix for player-limit race condition (#3862) 2017-07-28 17:54:40 +01:00
ForEachChunkProvider.h Bulk clearing of whitespace 2016-02-05 23:50:18 +02:00
FunctionRef.h Stop cFunctionRef constructor from disabling default copy constructor. (#4173) 2018-07-24 22:30:05 +01:00
FurnaceRecipe.cpp Replaced cpp14::make_unique<> with std::make_unique<>. 2020-08-01 20:04:31 +01:00
FurnaceRecipe.h Smelting Gives Experience (#4094) 2018-04-11 07:46:11 +01:00
Globals.cpp
Globals.h zlib -> libdeflate (#5085) 2021-01-11 16:39:43 +00:00
IniFile.cpp Enable some more clang-tidy linter checks (#4738) 2020-05-14 22:15:35 +00:00
IniFile.h Warnings improvements 2020-12-18 21:03:40 +00:00
Inventory.cpp Introduce recipe book functionality (#4493) 2020-07-14 17:56:42 +01:00
Inventory.h Introduce recipe book functionality (#4493) 2020-07-14 17:56:42 +01:00
Item.cpp Warnings improvements 2020-12-18 21:03:40 +00:00
Item.h Warnings improvements 2020-12-18 21:03:40 +00:00
ItemGrid.cpp Introduce recipe book functionality (#4493) 2020-07-14 17:56:42 +01:00
ItemGrid.h Introduce recipe book functionality (#4493) 2020-07-14 17:56:42 +01:00
JsonUtils.cpp Update submodules (#4727) 2020-05-09 15:51:15 +01:00
JsonUtils.h Update submodules (#4727) 2020-05-09 15:51:15 +01:00
LazyArray.h Cleanup unneeded globals (#4736) 2020-05-10 16:16:38 +00:00
LightingThread.cpp Using Super. 2020-04-16 20:07:48 +00:00
LightingThread.h Using Super. 2020-04-16 20:07:48 +00:00
LineBlockTracer.cpp ChunkMap: do not wantonly make empty chunks 2020-08-28 21:22:44 +01:00
LineBlockTracer.h Use Vector3 for cLineBlockTracer and cBlockTracer (#4715) 2020-05-08 10:04:07 +01:00
LinearInterpolation.cpp Bulk clearing of whitespace 2016-02-05 23:50:18 +02:00
LinearInterpolation.h Unified the doxy-comment format. 2015-07-31 16:49:10 +02:00
LinearUpscale.h Upgrade to C++17 [CMake] (#4717) 2020-05-16 20:59:10 +01:00
Logger.cpp Update submodules 2020-07-23 00:32:47 +01:00
Logger.h Update submodules 2020-07-23 00:32:47 +01:00
LoggerListeners.cpp Replaced cpp14::make_unique<> with std::make_unique<>. 2020-08-01 20:04:31 +01:00
LoggerListeners.h Remove double includes part 2 (#3890) 2017-08-03 15:34:19 +02:00
LoggerSimple.h Enable debug logging in test builds 2020-05-16 09:39:05 +01:00
Map.cpp BlockHandler initialisation is a constant expression (#4891) 2020-09-20 13:50:52 +00:00
Map.h Deleted BiomeDef.h and ChunkDef.h from Globals.h (#4885) 2020-09-25 09:13:59 +00:00
MapManager.cpp Replace ItemCallbacks with lambdas (#3993) 2017-09-11 23:20:49 +02:00
MapManager.h Replace ItemCallbacks with lambdas (#3993) 2017-09-11 23:20:49 +02:00
Matrix4.h Bulk clearing of whitespace 2016-02-05 23:50:18 +02:00
MemorySettingsRepository.cpp Enable some more clang-tidy linter checks (#4738) 2020-05-14 22:15:35 +00:00
MemorySettingsRepository.h Precompile unordered_map/set 2020-07-19 19:58:53 +01:00
MobCensus.cpp Enable some more clang-tidy linter checks (#4738) 2020-05-14 22:15:35 +00:00
MobCensus.h Bulk clearing of whitespace 2016-02-05 23:50:18 +02:00
MobFamilyCollecter.cpp Removed double includes (#3885) 2017-08-02 19:57:20 +01:00
MobFamilyCollecter.h Remove double includes part 2 (#3890) 2017-08-03 15:34:19 +02:00
MobProximityCounter.cpp CheckBasicStyle: Check number of empty lines between functions (#4267) 2018-07-26 22:24:36 +01:00
MobProximityCounter.h Remove double includes part 2 (#3890) 2017-08-03 15:34:19 +02:00
MobSpawner.cpp Convert most calls to blocking GetHeight/GetBiomeAt to direct chunk accesses 2021-01-11 16:39:56 +00:00
MobSpawner.h Fixing Mob spawner behaviour (#4930) 2020-09-27 20:02:16 +03:00
MonsterConfig.cpp Tweak attack ranges 2020-04-02 09:30:50 +02:00
MonsterConfig.h Bulk clearing of whitespace 2016-02-05 23:50:18 +02:00
NetherPortalScanner.cpp Light the nether portal when switching dimensions (#5062) 2020-12-01 01:02:19 +00:00
NetherPortalScanner.h MoveToWorld must always be provided a world 2020-04-18 19:51:30 +01:00
OpaqueWorld.h Broadcast refactor (#4264) 2018-07-24 22:30:49 +01:00
OverridesSettingsRepository.cpp Streamline startup sequence 2020-09-05 13:16:52 +01:00
OverridesSettingsRepository.h Streamline startup sequence 2020-09-05 13:16:52 +01:00
PalettedBlockArea.cpp BlockTypePalette: Refactored for usage in both directions. 2019-12-28 22:43:35 +01:00
PalettedBlockArea.h Remove unused Temporary namespace 2020-12-21 00:11:34 +00:00
ProbabDistrib.cpp CheckBasicStyle: Check number of empty lines between functions (#4267) 2018-07-26 22:24:36 +01:00
ProbabDistrib.h FastRandom rewrite (#3754) 2017-06-13 21:35:30 +02:00
RCONServer.cpp Streamline startup sequence 2020-09-05 13:16:52 +01:00
RCONServer.h Bulk clearing of whitespace 2016-02-05 23:50:18 +02:00
RankManager.cpp Update submodules (#4727) 2020-05-09 15:51:15 +01:00
RankManager.h Remove cRankManager migration code (#4714) 2020-05-05 21:20:07 +03:00
Root.cpp Clarify cClientHandle, cPlayer ownership semantics 2021-01-12 12:34:34 +00:00
Root.h Warnings improvements 2020-12-18 21:03:40 +00:00
Scoreboard.cpp CheckBasicStyle: Check number of empty lines between functions (#4267) 2018-07-26 22:24:36 +01:00
Scoreboard.h Deleted BiomeDef.h and ChunkDef.h from Globals.h (#4885) 2020-09-25 09:13:59 +00:00
Server.cpp Clarify cClientHandle, cPlayer ownership semantics 2021-01-12 12:34:34 +00:00
Server.h zlib -> libdeflate (#5085) 2021-01-11 16:39:43 +00:00
SetChunkData.cpp Replaced cpp14::make_unique<> with std::make_unique<>. 2020-08-01 20:04:31 +01:00
SetChunkData.h Manage block entity lifetime with unique_ptr (#4080) 2020-04-03 23:23:38 +02:00
SettingsRepositoryInterface.h Fix cmake not adding Werror on clang, and _lots_ of warnings (#4963) 2020-10-05 10:27:14 +00:00
SpawnPrepare.cpp Replaced cpp14::make_unique<> with std::make_unique<>. 2020-08-01 20:04:31 +01:00
SpawnPrepare.h Potential spawn prepare fix (#3924) 2017-08-22 14:34:43 +02:00
Statistics.cpp Fix cmake not adding Werror on clang, and _lots_ of warnings (#4963) 2020-10-05 10:27:14 +00:00
Statistics.h Add Statistics and Achievements for newer Network standards 2020-08-19 20:45:27 +01:00
Stopwatch.h BlockTypePalette: Load from TSV or original reports' JSON. 2019-12-28 22:43:35 +01:00
StringCompression.cpp zlib -> libdeflate (#5085) 2021-01-11 16:39:43 +00:00
StringCompression.h Clarify cClientHandle, cPlayer ownership semantics 2021-01-12 12:34:34 +00:00
StringUtils.cpp zlib -> libdeflate (#5085) 2021-01-11 16:39:43 +00:00
StringUtils.h zlib -> libdeflate (#5085) 2021-01-11 16:39:43 +00:00
UUID.cpp Make offline UUIDs consistent with vanilla. (#4178) 2018-07-20 00:30:09 +01:00
UUID.h Add cUUID class (#3871) 2017-08-25 13:43:18 +01:00
Vector3.h C++17 stuff 2020-09-30 22:05:17 +01:00
VoronoiMap.cpp Bulk clearing of whitespace 2016-02-05 23:50:18 +02:00
VoronoiMap.h Bulk clearing of whitespace 2016-02-05 23:50:18 +02:00
WebAdmin.cpp Enable some more clang-tidy linter checks (#4738) 2020-05-14 22:15:35 +00:00
WebAdmin.h Enable some more clang-tidy linter checks (#4738) 2020-05-14 22:15:35 +00:00
World.cpp Clarify cClientHandle, cPlayer ownership semantics 2021-01-12 12:34:34 +00:00
World.h Clarify cClientHandle, cPlayer ownership semantics 2021-01-12 12:34:34 +00:00
XMLParser.h Minor changes (#3909) 2017-08-24 11:19:40 +02:00
fmt.h Update fmtlib to 7.0.0 2020-07-06 20:53:04 +01:00
main.cpp Warnings improvements 2020-12-18 21:03:40 +00:00
main.h Fix cmake not adding Werror on clang, and _lots_ of warnings (#4963) 2020-10-05 10:27:14 +00:00