summaryrefslogtreecommitdiffstats
path: root/src/Entities/Floater.cpp (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Using Super.Mattes D2020-04-161-1/+1
|
* Pulled the BlockID and BlockInfo headers from Globals.h. (#4591)Mattes D2020-04-031-0/+1
| | | | | | | | | 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
* Fix typo in floater code (#4556)Mat2020-03-271-1/+1
|
* Stabilise MoveToWorld (#4004)Mat2020-03-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Refactored more of Entities and BlockEntities to use Vector3. (#4403)Mattes D2019-09-291-3/+3
|
* Broadcast refactor (#4264)peterbell102018-07-241-3/+2
| | | | | | | | | | | | | | | | | | | | | | | * Move Broadcast functions from cChunkMap to cBroadcaster - Remove cBroadcastInterface in favour of cBroadcaster. - cChunk: Remove broadcast functions. * resurect broadcast interface * Absorb cBroadcaster into cWorld. Removes the need for forwarding the function calls. * Improve const-correctness * Use Int8 instead of char + Comment `ForClients` functions * Improve comments * Broadcaster: Rename ForClients functions
* Fix fishing timer (#4217)peterbell102018-04-271-0/+5
| | | | | | | | | | | Fixes ["Fishing Speed Too Slow"](https://forum.cuberite.org/thread-3175-post-29000.html#pid29000). Interestingly, the constants @NiLSPACE points out are actually correct: ```cpp (Random.RandInt(100, 900) - static_cast<int>(a_Player->GetEquippedItem().m_Enchantments.GetLevel(cEnchantments::enchLure) * 100)) ``` 100 to 900 ticks is the correct timing of 5-45 seconds. However, the timer is only updated when the floater is in the water and the server side position was actually bobbing in and out of the water. This meant the timer took ~2-3x longer than it should. With this change the floater position is always in the water and so the timer works as expected.
* Changed BroadcastSoundEffect, SendSoundEffect, and CastThunderbolt parameters to vectors (#3959)Lane Kolbly2017-09-191-1/+1
| | | | | | | | | | | | | | | | | | * Made BroadcastSoundEffect take vector parameters. * Added docs for new vectored methods * Removed old code * Fixed lua warnings * Made old BroadcastSoundEffect not an override. * m_Block to m_BlockPos, used Vector3d constructor where prettier. * a_Block to a_BlockPos * Changed thunderbolt a_Block to a_BlockPos
* Replace ItemCallbacks with lambdas (#3993)peterbell102017-09-111-37/+8
|
* Revert "Replace ItemCallbacks with lambdas (#3948)"LogicParrot2017-09-021-8/+37
| | | | This reverts commit 496c337cdfa593654018c171f6a74c28272265b5.
* Replace ItemCallbacks with lambdas (#3948)peterbell102017-09-011-37/+8
|
* FastRandom rewrite (#3754)peterbell102017-06-131-4/+6
|
* Changed fish launching mechanism (#3520)Alex2017-02-201-0/+2
| | | Fish and other fishing loot now correctly fly towards played when reeled in.
* Updated sounds and effect IDs (#3422)mathiascode2017-02-151-1/+1
|
* Bulk clearing of whitespaceLogicParrot2016-02-051-4/+4
|
* Test for correct coordinates when fishingGargaj2015-12-101-1/+1
| | | | Fun fact: this was able to actually deadlock the server depending on where you were standing :)
* Unified the doxy-comment format.Mattes D2015-07-311-2/+2
|
* Silenced and fixed many warning messages across multiple files.Samuel Barney2015-07-291-9/+10
|
* Added support for additional data in the ParticleEffect Packettycho2015-05-071-3/+3
| | | | Also started refactoring how broadcasts are handled
* Initial convertion of a_Dt to std::chronoTycho2015-01-111-1/+1
| | | | also refactored cWorld::m_WorldAge and cWorld::m_TimeOfDay
* En masse NULL -> nullptr replaceTiger Wang2014-10-231-1/+1
|
* Normalized comments.madmaxoft2014-07-171-9/+9
| | | | | This was mostly done automatically and then visually inspected for obvious errors. All //-style comments should have a 2-space separation from the code, and 1 space after the comment sign.
* Changed BroadcastSoundEffect function to take floating pos.Howaner2014-07-131-1/+1
|
* Fixed most of the reordering warningsTycho2014-02-051-2/+2
|
* Improved Type safety of eBlockFaceTycho2014-02-041-2/+2
| | | | May Fix #640
* Fixed Parentheses.STRWarrior2013-12-251-2/+2
|
* You are now able to sweep mobs to your position using fishing rods.STRWarrior2013-12-251-8/+129
|
* Fishing underground is slower and fishing while raining is faster.STRWarrior2013-12-221-0/+15
|
* Fixed compiler warnings.STRWarrior2013-12-221-2/+2
|
* Fishing now uses a countdown instead of a random number each tick.STRWarrior2013-12-221-11/+26
|
* You could now only get fish from non-source blocks. Fixed it.STRWarrior2013-12-211-1/+1
|
* Fixed bug where you could get fish from non-source blocks.STRWarrior2013-12-211-1/+1
|
* Fixed bug where the floater could pop in the water while you could already get a fish.STRWarrior2013-12-201-2/+2
|
* More reordering fixes.madmaxoft2013-12-201-3/+12
|
* Fixed #include in Floater.cpp.STRWarrior2013-12-191-1/+1
|
* The floater now actualy dives under water.STRWarrior2013-12-191-1/+1
|
* Added cFloater class.STRWarrior2013-12-191-0/+58