1
0
Commit Graph

15 Commits

Author SHA1 Message Date
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
peterbell10
950aeffff8
CheckBasicStyle: Check number of empty lines between functions (#4267)
Add check for number of empty lines between functions and fix the corresponding failures
2018-07-26 22:24:36 +01:00
Bond-009
104f9e127b Changed some int parameters to vector parameters (#3937) 2017-09-07 10:25:34 +02:00
LogicParrot
90be4e7efd Entities now bail out of ticks if destroyed (#3363) 2016-09-03 14:31:27 +03:00
LogicParrot
ca6ef58b1e Bulk clearing of whitespace 2016-02-05 23:50:18 +02: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
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
madmaxoft
00c524519e Fixed style: spaces after commas. 2014-07-19 14:53:41 +02:00
Tiger Wang
7f5cf417de Some change to Entity.cpp
* Added comments to BroadcastMovementUpdate() and the collision tracer
2014-04-23 21:06:46 +01:00
Howaner
b37966fd21 Change TNT Fuse to ticks 2014-03-08 12:24:33 +01:00
Howaner
f5e374be41 Add TNT Save/Load and add Netbeans projects to .gitignore 2014-03-08 10:25:46 +01:00
Alexander Harkness
675b4aa878 Moved source to src 2013-11-24 14:19:41 +00:00