summaryrefslogtreecommitdiffstats
path: root/src/Entities/Floater.cpp (unfollow)
Commit message (Collapse)AuthorFilesLines
2021-09-30Spectation: add dedicated pathway for spectator mode (#5303)Tiger Wang1-1/+1
* Spectation: add dedicated pathway for spectator mode + Sync player rotation with spectated entity. + Add dedicated infrastructure to cPlayer for handling spectation, instead of misusing entity riding. * Avoid infinite recursion when exiting spectation, fixes #5296 * AttachTo: Change parameter to reference
2021-04-12Update entity sizesTiger Wang1-1/+1
2021-01-11Convert most calls to blocking GetHeight/GetBiomeAt to direct chunk accessesTiger Wang1-8/+16
* Hopefully fixes #5094
2020-05-03Add cEntity::GetBoundingBox, and use where appropriate. (#4711)Alexander Harkness1-1/+1
* Add cEntity::GetBoundingBox, and use where appropriate.
2020-05-01Unify entity spawn packet sendingTiger Wang1-2/+2
2020-04-20Delet SpawnObject paramsTiger Wang1-1/+1
* Fix #4679 awkward...
2020-04-16Using Super.Mattes D1-1/+1
2020-04-03Pulled the BlockID and BlockInfo headers from Globals.h. (#4591)Mattes D1-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
2020-03-27Fix typo in floater code (#4556)Mat1-1/+1
2020-03-05Stabilise MoveToWorld (#4004)Mat1-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
2019-09-29Refactored more of Entities and BlockEntities to use Vector3. (#4403)Mattes D1-3/+3
2018-07-24Broadcast refactor (#4264)peterbell101-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
2018-04-27Fix fishing timer (#4217)peterbell101-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.
2017-09-19Changed BroadcastSoundEffect, SendSoundEffect, and CastThunderbolt parameters to vectors (#3959)Lane Kolbly1-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
2017-09-11Replace ItemCallbacks with lambdas (#3993)peterbell101-37/+8
2017-09-02Revert "Replace ItemCallbacks with lambdas (#3948)"LogicParrot1-8/+37
This reverts commit 496c337cdfa593654018c171f6a74c28272265b5.
2017-09-01Replace ItemCallbacks with lambdas (#3948)peterbell101-37/+8
2017-06-13FastRandom rewrite (#3754)peterbell101-4/+6
2017-02-20Changed fish launching mechanism (#3520)Alex1-0/+2
Fish and other fishing loot now correctly fly towards played when reeled in.
2017-02-15Updated sounds and effect IDs (#3422)mathiascode1-1/+1
2016-02-05Bulk clearing of whitespaceLogicParrot1-4/+4
2015-12-11Test for correct coordinates when fishingGargaj1-1/+1
Fun fact: this was able to actually deadlock the server depending on where you were standing :)
2015-12-10Test for correct coordinates when fishingGargaj1-1/+1
Fun fact: this was able to actually deadlock the server depending on where you were standing :)
2015-07-31Unified the doxy-comment format.Mattes D1-2/+2
2015-07-29Silenced and fixed many warning messages across multiple files.Samuel Barney1-9/+10
2015-05-07Added support for additional data in the ParticleEffect Packettycho1-3/+3
Also started refactoring how broadcasts are handled
2015-01-11Initial convertion of a_Dt to std::chronoTycho1-1/+1
also refactored cWorld::m_WorldAge and cWorld::m_TimeOfDay
2014-10-23En masse NULL -> nullptr replaceTiger Wang1-1/+1
2014-10-20En masse NULL -> nullptr replaceTiger Wang1-1/+1
2014-07-17Normalized comments.madmaxoft1-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.
2014-07-13Changed BroadcastSoundEffect function to take floating pos.Howaner1-1/+1
2014-02-05Fixed most of the reordering warningsTycho1-2/+2
2014-02-04Improved Type safety of eBlockFaceTycho1-2/+2
May Fix #640
2013-12-25Fixed Parentheses.STRWarrior1-2/+2
2013-12-25You are now able to sweep mobs to your position using fishing rods.STRWarrior1-8/+129
2013-12-22Fishing underground is slower and fishing while raining is faster.STRWarrior1-0/+15
2013-12-22Fixed compiler warnings.STRWarrior1-2/+2
2013-12-22Fishing now uses a countdown instead of a random number each tick.STRWarrior1-11/+26
2013-12-21You could now only get fish from non-source blocks. Fixed it.STRWarrior1-1/+1
2013-12-21Fixed bug where you could get fish from non-source blocks.STRWarrior1-1/+1
2013-12-20Fixed bug where the floater could pop in the water while you could already get a fish.STRWarrior1-2/+2
2013-12-20More reordering fixes.madmaxoft1-3/+12
2013-12-19Fixed #include in Floater.cpp.STRWarrior1-1/+1
2013-12-19The floater now actualy dives under water.STRWarrior1-1/+1
2013-12-19Added cFloater class.STRWarrior1-0/+58