1
0
Fork 0
Commit Graph

26 Commits

Author SHA1 Message Date
Tiger Wang 0b9b7bc1a8 Unify entity spawn packet sending 2020-04-30 23:04:56 +01:00
Mattes D 9ee47e5999 Using Super. 2020-04-16 20:07:48 +00:00
Mattes D bdedab15c9
Falling blocks can now be spawned at any position. (#4620)
* Falling blocks can now be spawned at any position.

* Added a /cake command to Debuggers that throws a cake in a nice slow arc.

* Fixed regular falling blocks.
2020-04-09 20:25:20 +00:00
Mattes D 01b8ed5295
Pulled the BlockID and BlockInfo headers from Globals.h. (#4591)
The BlockID.h file was removed from Globals.h and renamed to BlockType.h (main change)
The BlockInfo.h file was removed from Globals.h (main change)
The ENUM_BLOCK_ID and ENUM_ITEM_ID enum names were replaced with ENUM_BLOCK_TYPE and ENUM_ITEM_TYPE (cosmetics)
The various enums, such as eDimension, eDamageType and eExplosionSource were moved from BlockType.h to Defines.h, together with the helper functions for converting between them and strings (StringToDimension et al.) (minor)
Many inline functions were moved from headers to their respective cpp files, so that BlockType.h could be included only into the cpp file, rather than the header.
That broke our tests a bit, since they pick bits and pieces out of the main code and provide stubs for the rest; they had to be re-stubbed and re-verified.
eMonsterType values are no longer tied to E_ITEM_SPAWN_EGG_META_* values
2020-04-03 08:57:01 +02: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 365cbc6e1c
Refactored more of Entities and BlockEntities to use Vector3. (#4403) 2019-09-29 14:59:24 +02:00
peterbell10 4727ed2084 Add a formatting function for Vector3 (#4282)
* Vector3: Add custom fmt compatible formatter.

* cLuaState: Add fmt version of ApiParamError

* Use vector formatting in manual bindings

* Always log vectors with FLOG
2018-09-24 21:33:39 +01:00
Zach DeCook 68fc28857f Concrete mixing (#4096)
Adds a block handler for concrete powder and implements hardening to concrete.
Concrete powder turns into concrete when:
* It is next to water when it receives a block update
* It falls onto a water block (even with Physics SandInstantFall=1)
2018-01-03 16:33:31 +00:00
Altenius 510614e8ef Fixed falling block spawning
Fixes #3222
2016-07-05 17:10:58 -04:00
LogicParrot ca6ef58b1e Bulk clearing of whitespace 2016-02-05 23:50:18 +02:00
tycho dae9e5792a Made -Weverything an error. 2015-05-24 12:56:56 +01:00
DevToaster 45c84ea933 Changed air drag units to 'interpolated ticks' per second 2015-03-31 11:03:35 -04:00
DevToaster c743c7fd0c Modified physics for more vanilla-like behavior 2015-03-30 19:42:32 -04:00
Tommy Santerre 3f6d823aa4 Correct world height validations.
Unify the way we test block above the current one (Height - 1 instead of a_RelY + 1).
Allow generation of world of flat height = 255
2015-03-19 20:32:17 -04:00
Tycho 2a9664d6ca Initial convertion of a_Dt to std::chrono
also refactored cWorld::m_WorldAge and cWorld::m_TimeOfDay
2015-01-11 21:12:26 +00:00
Tycho d478e3cfb1 Merge branch 'master' into chunksparsing/structs
Conflicts:
	src/Chunk.h
2014-05-10 05:05:44 -07:00
Tiger Wang 0d1804e439 Merge branch 'master' into redstoneimprovements
Conflicts:
	src/ClientHandle.cpp
	src/Entities/FallingBlock.cpp
	src/Mobs/AggressiveMonster.cpp
	src/Simulator/IncrementalRedstoneSimulator.cpp
2014-05-04 14:15:10 +01:00
Tycho 8780b324ff Merge branch 'master' into chunksparsing/structs 2014-05-01 11:50:40 -07:00
madmaxoft dffd38e53b Fixed a MSVC warning. 2014-04-28 22:21:49 +02:00
Tiger Wang bbc5faa723 Redstone simulator now directly accesses cChunk
* Redstone simulator performance improvements
* Added return values to some functions
* Minor fixes
2014-04-27 17:35:41 +01:00
archshift 7841bad27a More small fixes. 2014-04-26 14:05:00 -07:00
Tycho e40f9d6e5b Implemented Chunk Sparsing with segments 2014-04-26 10:50:23 -07:00
archshift aef2c8ec62 Further refactored, Reverted Minecart change
Other small changes.
2014-04-26 09:25:30 -07:00
archshift 73edd2b961 Fixed a couple more warnings. 2014-04-25 17:15:12 -07:00
Tiger Wang 53231bebd6 Added extra awesomeness to TNT
+ TNT now has a chance of flinging FallingBlock entities around
* Improved TNT damage
* Improved TNT spawning visuals
* Possible fix for 'SetSwimState failure' messages in debug
2014-03-05 22:12:48 +00:00
Alexander Harkness 675b4aa878 Moved source to src 2013-11-24 14:19:41 +00:00