summaryrefslogtreecommitdiffstats
path: root/src/Entities/Entity.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Fix potential destruction crashes (#5095)Tiger Wang2021-01-021-7/+2
| | | | | | | | | | * Fix potential destruction crashes * Fix destructors accessing destroyted objects * Fix cPlayer not destroying windows (Destroyed never called) * Tentatively fixes #4608, fixes #3236, fixes #3262 - Remove cEntity::Destroyed() and replace with cEntity::OnRemoveFromWorld() * Add missing call to OnRemoveFromWorld
* Added magma block contact damage (#5055)Aiden Neill2020-11-251-0/+3
| | | | | | * Added magma block contact damage * Fireproof entities do not take damage from magma * Fire resistance prevents magma damage * No magma damage when hovering over magma block
* Do not call into things we don't own in destructorsTiger Wang2020-09-251-3/+0
| | | | | - Remove improper accesses in cChunk destructor * Fixes #4894
* Use tracing for explosions (#4845)Tiger Wang2020-09-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | * TNT: Implement tracing algorithm + Add intensity tracing * Fix iterating over all players to SendExplosion, even those not in range * Implemented TNT entity interaction * Fixed misaligned destruction tracing * Finalise TNT algorithm - Remove BlockArea and just use chunks Using SetBlock makes it so that we can update everything properly, and does appear to be faster. * BlockInfo learns about explosion attentuation * Rename Explodinator parameters * TNT: pull block destruction into common function Co-authored-by: Alexander Harkness <me@bearbin.net>
* Cleanup unneeded globals (#4736)peterbell102020-05-101-1/+1
|
* Improve entity position updates (#4701)Tiger Wang2020-05-041-1/+5
| | | | | | | | | * Make puking pickups fly nicer * Improve entity position updates * Move determination of whether a delta is too big for a packet into the protocol handlers + Less jittery movement + Generalise CollectEntity to take any entity
* Buttons can now be triggered by arrows. (#4670)DrButcher2020-05-031-0/+1
| | | * Buttons can now be triggered by arrows.
* Add cEntity::GetBoundingBox, and use where appropriate. (#4711)Alexander Harkness2020-05-031-0/+3
| | | * Add cEntity::GetBoundingBox, and use where appropriate.
* MoveToWorld must always be provided a worldTiger Wang2020-04-181-4/+4
|
* Only store IDs across ticksTiger Wang2020-04-181-3/+3
|
* Using Super.Mattes D2020-04-161-2/+2
|
* Prevent player from being destroyed by plugins (#4584)Alexander Harkness2020-03-311-6/+2
| | | | | | | | | | * Prevent player from being destroyed by plugins Add manual binding, bails out with error message if attempted entity to destroy is player. * Improve warnings and documentation, remove automatic binding * Remove old and unnecessary deprecated function
* Send respawn packet by default (#4540)Mat2020-03-241-2/+2
|
* Fix armor protection (#4506)Mat2020-03-221-2/+2
| | | | | | | | | | | | | | | * Fix armor protection * Check min damage * Check min damage * Commit missing changes * Convert to int * Use float * Float some more
* Don't send entity velocity for boats (#4488)Mat2020-03-071-4/+4
| | | * Don't send entity velocity for boats
* Stabilise MoveToWorld (#4004)Mat2020-03-051-14/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-1/+5
|
* Fix building with clang 8.0 (#4346)Bond-0092019-08-111-4/+6
|
* Change TakeDamageInfo::FinalDamage from int to float (#4359)Aplaus2282019-08-081-2/+2
| | | | Closes #4357
* Broadcast refactor (#4264)peterbell102018-07-241-1/+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
* cPawn: Reset last ground height in ResetPosition (#4261)peterbell102018-07-231-1/+1
| | | | | Prevents fall damage after teleporting/portaling to a lower height. Fixes #3457
* Rewrite explosion knock back (#4251)changyong guo2018-07-231-1/+10
| | | | | | | 1. Base knockback on an entity's bounding box intersection with the explosion 2. Armor blast protection reduces knockback 3. Don't apply knockback to players flying in creative mode Fixes #4139
* Support swap item between main hand and offhand by press key "F" (#4241)changyong guo2018-06-241-0/+3
| | | | | | | | Hi, I found cuberite don't support to press key "F" to swap items on main hand and offhand, so I implemented this feature. Best regards Changyong
* Update m_LastSentPosition in TeleportToCoords and DoMoveToWorld. (#4211)peterbell102018-04-111-0/+4
|
* Rename cEntity swim states (#3996)Alexander Harkness2018-01-141-11/+23
| | | | | | | | | | * Replace cEntity:m_IsSubmerged with m_IsHeadInWater * Replace cEntity:m_IsSwimming with m_IsInWater * Add API documentation for new symbols * Apply SetSwimState to all entities, not just mobs and players * Pickups now use IsOnFire to check if they are on fire before destruction Fixes #3987
* Store Health as a float (#4073)Fabian2017-11-221-6/+6
| | | | | | | | | | | | | | | | | | * Fix #4024 * Fix clang error * Add comment * Fix behaviour * Save Health as float * Changed m_Health to float * Remove redundant static_cast * Fix casts
* Adjust lava damage values (#4020)Alexander Harkness2017-09-121-1/+1
| | | Fixes isue #2925
* Updated APIDoc (#3985)Lukas Pioch2017-09-071-3/+4
|
* Changed some int parameters to vector parameters (#3937)Bond-0092017-09-071-1/+1
|
* Protocol Spawn Position Should Use LastSentPosition (#3929)Lane Kolbly2017-08-301-0/+4
| | | | | | + Added GetLastSentPos * Fixed spawn position bug in 1.8.
* Added ShouldSendRespawn parameter to ScheduleMoveToWorld (#3979)Lane Kolbly2017-08-301-1/+2
|
* Minor changes (#3909)mathiascode2017-08-241-1/+1
|
* Fully implemented leashes (#3798)Pablo Beltrán2017-08-211-1/+19
|
* Changed entity ownership model to use smart pointersTiger Wang2017-08-071-3/+1
|
* Remove double includes part 2 (#3890)peterbell102017-08-031-1/+0
|
* Check for intersection between placed blocks and entities. (#3850)Lane Kolbly2017-07-281-0/+3
| | | | | | | | | | | | | * Check for intersection between placed blocks and entities. + Implemented GetPlacementCollisionBox, to permit custom placement collision boxes for blocks. * Factored block-entity placement checking into another function in cPlayer. - Removed vector min/max functions * Use GetWorld to get the world in DoesPlacingBlocksIntersectEntity. + Added block height checks, allow different cEntity subclasses to decide whether they will prevent block placement.
* Updated armor cover calculation. (#3858)Lane Kolbly2017-07-231-2/+8
| | | | | | | | * Updated armor damage calculation. + Added lua docs, added casts from float to int. * Changed verbage in docstring and comment.
* Entity: Replaced a mutexed counter with a std::atomic. (#3773)Mattes D2017-06-151-4/+6
|
* Added a nullptr check to cEntity::IsA (#3659)Marvin Kopf2017-04-011-1/+1
| | | Fixes #3603
* Export GetPosition and GetSpeed from cEntity as a copy instead of a pointer to lua.Lukas Pioch2016-12-101-2/+6
|
* Spectators added (#2852)bibo382016-10-121-1/+1
|
* Updated API documentation.Mattes D2016-07-181-3/+7
|
* Fixes for boat entities (#3265)beeduck2016-07-181-0/+3
| | | protocol for vehicles now properly handled, protocol for boat paddles now properly handled, boats can no longer spawn underwater, boats now properly float, boat metadata now properly broadcasted.
* Fixed fall damageTiger Wang2016-06-021-1/+1
| | | | * Fixes #3216
* Fixed death on teleportation or leaving Minecart (#3181)LogicParrot2016-05-031-1/+1
|
* MoveToWorld defaults to spawnpointLogicParrot2016-03-301-2/+2
|
* Proper entity destruction in non-ticking chunksLogicParrot2016-02-191-16/+29
|
* Fix cPawn pushingMarvin Kopf2016-02-021-0/+3
| | | | cPawn instances can no longer push an entity they are attached to. cEntity now has a IsAttachedTo method.
* Improved tamed wolf pack cooperation and projectile reactionsLogicParrot2016-01-221-0/+3
|
* Spiders now friendly at daylight, new cChunk functionsLogicParrot2016-01-211-1/+0
|
* implement breedingGargaj2015-11-291-0/+2
|
* Destroy an ender crystal, damage a dragon when hit by an egg.Alexander Harkness2015-11-051-88/+88
|
* Implemented the FireResistence potion effects.bibo382015-10-311-1/+1
| | | | | This not only provides fire resistence, but also prevents blaze fireballs. See #2556
* Fixed food drain bugsTiger Wang2015-08-201-22/+22
|
* Unified the doxy-comment format.Mattes D2015-07-311-66/+65
|
* Work on NetherPortalScanner. Setup portal scanner to reset PortalCooldown. Changed where player is spawned. Added a_InitSpawn flag to CreateAndInitializeWorld.Lane Kolbly2015-06-131-11/+12
|
* Implemented nether portal scanning code.Lane Kolbly2015-06-101-8/+18
|
* Made -Weverything an error.tycho2015-05-241-2/+2
|
* More style checking.Mattes D2015-05-091-2/+2
| | | | Spaces around some operators are checked.
* Changed air drag units to 'interpolated ticks' per secondDevToaster2015-03-311-2/+4
|
* Modified physics for more vanilla-like behaviorDevToaster2015-03-311-0/+8
|
* Changed cEntity::m_UniqueID to UInt32.Mattes D2015-03-211-3/+10
|
* cPlayer should override IsOnGround()Howaner2015-02-071-2/+2
|
* Added IsOnGround() to cEntityHowaner2015-02-071-0/+3
|
* Initial convertion of a_Dt to std::chronoTycho2015-01-111-2/+2
| | | | also refactored cWorld::m_WorldAge and cWorld::m_TimeOfDay
* En masse NULL -> nullptr replaceTiger Wang2014-10-231-96/+100
|
* Merged branch 'master' of git://github.com/sriehl/MCServerMattes D2014-10-211-93/+89
|\
| * convert old style casts to fix warningsSteven Riehl2014-10-121-94/+90
| |
* | LuaState: Pushing a cEntity pushes the correct class name.Mattes D2014-10-191-5/+5
|/ | | | This makes Lua scripts easier, as they don't need to cast values from cEntity to the specific descendant.
* Float/Ciel: If it's going to use C++11, it might as well take advantage of itarchshift2014-10-091-3/+3
|
* Use static casts instead of C casts, add floor-cast functionsarchshift2014-10-091-3/+3
|
* Merge branch 'master' into EntityCustomNameHowaner2014-09-231-0/+6
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/ClientHandle.cpp src/ClientHandle.h src/Protocol/Protocol.h src/Protocol/Protocol125.cpp src/Protocol/Protocol125.h src/Protocol/Protocol17x.cpp src/Protocol/Protocol17x.h src/Protocol/ProtocolRecognizer.cpp src/Protocol/ProtocolRecognizer.h src/World.cpp src/World.h
| * Entities experience water resistanceTiger Wang2014-09-131-0/+6
| |
* | Added name tagHowaner2014-09-011-1/+1
|/
* Entity.h: Moved constants out of some unnamed enumarchshift2014-07-301-14/+14
|
* Merge branch 'master' into portalsTiger Wang2014-07-291-1/+1
|\ | | | | | | | | Conflicts: src/World.h
| * Removed redundant semicolons and re-added warningarchshift2014-07-241-1/+1
| |
* | SuggestionsTiger Wang2014-07-231-3/+5
| |
* | Speed improvements, crash fixes, & self-suggestionsTiger Wang2014-07-221-2/+4
| |
* | Merge remote-tracking branch 'origin/master' into portalsTiger Wang2014-07-221-0/+6
|\| | | | | | | | | | | | | | | Conflicts: src/Chunk.cpp src/Entities/Player.cpp src/Root.cpp src/World.cpp
| * Added m_TicksAlive to entities, allows projectiles to hit their creatorsarchshift2014-07-201-0/+6
| |
* | SuggestionsTiger Wang2014-07-211-9/+21
| |
* | Bug and crash fixesTiger Wang2014-07-201-6/+9
| | | | | | | | | | | | | | | | | | * Fixes end portals' solidity * Fixed crashes to do with multithreading and removing an entity from the wrong world * Fixed crashes due to bad merge * Fixed crashes due to an object being deleted twice * Simplified cWorld::Start() and added comments to configuration files
* | Merge branch 'master' into portalsTiger Wang2014-07-181-7/+8
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/Blocks/WorldInterface.h src/ClientHandle.cpp src/ClientHandle.h src/Entities/Player.cpp src/Entities/Player.h src/Generating/FinishGen.cpp src/Protocol/Protocol.h src/Protocol/Protocol125.cpp src/Protocol/Protocol125.h src/Protocol/Protocol16x.cpp src/Protocol/Protocol16x.h src/Protocol/Protocol17x.cpp src/Protocol/Protocol17x.h src/Protocol/ProtocolRecognizer.cpp src/Protocol/ProtocolRecognizer.h src/Root.h src/World.cpp
| * Fixed tabs used for alignment.madmaxoft2014-07-171-1/+1
| |
| * Basic style fixes.madmaxoft2014-07-171-1/+1
| |
| * Normalized comments.madmaxoft2014-07-171-1/+1
| | | | | | | | | | 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.
| * Merge branch 'master' into potionsmadmaxoft2014-07-171-1/+1
| |\
| | * Merge pull request #1193 from mc-server/deathmessagesMattes D2014-07-171-1/+1
| | |\ | | | | | | | | Death messages
| | | * Tailored death messagesTiger Wang2014-07-041-1/+1
| | | |
| * | | Merge remote-tracking branch 'origin/master' into potionsarchshift2014-07-101-2/+2
| |\| | | | | | | | | | | | | | | | | | | | | | Conflicts: src/Entities/Player.cpp src/Entities/ProjectileEntity.cpp
| | * | Some Entity.cpp style improvementsTiger Wang2014-06-221-2/+2
| | |/
| * | Cave spider now poisons its victim, added IsPawn function to Entityarchshift2014-06-171-0/+1
| | |
| * | Player: made healing instantaneousarchshift2014-06-171-1/+1
| |/
* | Merge branch 'master' into portalsTiger Wang2014-06-211-10/+25
|\| | | | | | | | | | | | | Conflicts: src/Chunk.cpp src/Entities/Entity.h src/Entities/Player.h
| * Merge branch 'master' of github.com:mc-server/MCServerTycho2014-06-161-10/+25
| |
* | Fixed invalid iteratorsTiger Wang2014-06-211-1/+9
| |
* | Implemented PR suggestionsarchshift2014-06-161-1/+1
| | | | | | | | | | | | | | Furnace.txt: newline BlockID: removed extraneous dimension mapping cEntity: fixed typo cPlayer: WorldPtr typedef
* | Reverted portal creation codeTiger Wang2014-06-141-3/+0
| | | | | | | | It wasn't really working and needs more development
* | Portals animate and delay correctlyTiger Wang2014-06-121-2/+8
| |
* | Merge branch 'master' into portalsTiger Wang2014-06-101-4/+6
|\| | | | | | | | | | | | | | | | | Conflicts: src/ClientHandle.cpp src/Entities/Player.cpp src/Entities/Player.h src/Protocol/Protocol125.cpp src/Protocol/Protocol17x.cpp
| * Fixed deadlock when moving players to other worlds.Mattes D2014-06-081-2/+3
| | | | | | | | Fixes #1039, fixes #851
| * Added queue for adding entities to cWorld.Mattes D2014-06-081-2/+3
| | | | | | | | This alone doesn't work properly yet, further changes to cPlayer are needed.
* | Portal improvements and suggestionsTiger Wang2014-06-101-0/+3
| |
* | Implemented end and nether portalsTiger Wang2014-05-311-0/+6
|/
* Merge pull request #1010 from mc-server/cactidamageAlexander Harkness2014-05-191-0/+3
|\ | | | | Implemented cacti damage
| * Implemented cacti damageTiger Wang2014-05-181-0/+3
| | | | | | | | | | + Implemented cacti damage * Fixed pickup tossing (PR #994 bug)
* | cEntity::Killed(cEntity *) Handler; Achievement triggers; cPlayer::AwardAchievement()andrew2014-05-121-0/+3
|/
* A bit of reformatting.madmaxoft2014-05-021-5/+10
|
* Merge branch 'master' into fixes.madmaxoft2014-05-021-10/+25
|\
| * Merge pull request #940 from Howaner/GlobalFixesMattes D2014-04-281-10/+22
| |\ | | | | | | Add entity invulnerable
| | * FixesHowaner2014-04-261-10/+13
| | |
| | * Change m_InvulnerableTicks description again again :DHowaner2014-04-261-1/+1
| | |
| | * Change m_InvulnerableTicks description again.Howaner2014-04-261-1/+1
| | |
| | * Change m_InvulnerableTicks descriptionHowaner2014-04-261-1/+1
| | |
| | * Add entity invulnerableHowaner2014-04-261-4/+13
| | |
| * | Further refactored, Reverted Minecart changearchshift2014-04-261-1/+1
| | | | | | | | | | | | Other small changes.
| * | Moved switch{} out of GetArmorCoverAgainst().archshift2014-04-261-0/+3
| |/
* | More comments!Tiger Wang2014-04-271-2/+9
| | | | | | | | | | * Also fixed a potential issue with position sending - if someone moved slowly enough, their position would never be updated.
* | Merge branch 'master' into fixesTiger Wang2014-04-241-0/+8
|\| | | | | | | | | Conflicts: src/World.h
| * Renamed getter and setter for IsFireproof.archshift2014-04-231-2/+2
| |
| * Fireproof status getter and setter.archshift2014-04-231-0/+5
| |
| * Fixed indentation and changed m_Fireproof to m_IsFireproof.archshift2014-04-221-2/+2
| |
| * Lay foundation for fireproof entities.archshift2014-04-221-0/+3
| | | | | | | | Prevent any entities with the m_Fireproof flag from taking fire or lava damage.
* | Some change to Entity.cppTiger Wang2014-04-231-7/+4
|/ | | | * Added comments to BroadcastMovementUpdate() and the collision tracer
* Merge pull request #891 from mc-server/fixesMattes D2014-04-171-15/+36
|\ | | | | Fixes to redstone & general
| * Entities handle chunks properly againTiger Wang2014-04-121-15/+36
| | | | | | | | | | * Entities properly handle chunks * Changed EntityStatus enums to be less shouty
* | Added new AI rulesTiger Wang2014-04-171-1/+2
|/ | | | | | | + Added new AI rules handling cacti and large heights * Fixed cIniFile not recognising comments in cIniFile::ReadFile() * Fixed users.ini not being properly generated * Changed all instances of (int)floor(GetPosXXX()) to POSXXX_TOINT
* Documented the units and range for entity rotations.madmaxoft2014-04-031-7/+7
|
* Ender crystalsandrew2014-03-251-11/+13
|
* Merge branch 'master' into awesometntTiger Wang2014-03-181-3/+1
|\ | | | | | | | | Conflicts: src/ChunkMap.cpp
| * Unified Vector classesandrew2014-03-111-3/+1
| |
* | Added extra awesomeness to TNTTiger Wang2014-03-051-0/+1
|/ | | | | | | + 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
* Merge branch 'master' into itemframesTiger Wang2014-02-181-0/+2
|\ | | | | | | | | | | Conflicts: src/Entities/Entity.h src/WorldStorage/NBTChunkSerializer.cpp
| * Implemented paintings, fixes #689Tiger Wang2014-02-181-0/+2
| | | | | | | | + Implemented paintings
* | Implemented item frames, a part of #689Tiger Wang2014-02-181-0/+2
|/ | | | | + Implemented Item Frames * Fixed Pitch and Yaw being wrongly flipped in the protocol (XOFT!)
* Implemented fall damage for mobsTiger Wang2014-01-251-0/+5
| | | | | | + Implemented mobile fall damage * Formatting fixes + Defined new Position->Integer macros
* All mobs now drown (fixes #54)Tiger Wang2014-01-251-1/+22
| | | | | * Implemented mob drowning * Iron Golems and squids are excluded
* Removed unused ReferenceManagerTiger Wang2014-01-241-9/+1
|
* Removed internal cEntity::GetRot() usage.madmaxoft2014-01-171-2/+2
|
* Removed obsoleted functionsTiger Wang2014-01-161-3/+1
|
* OBSOLETE'd obsolete functionsTiger Wang2014-01-151-2/+2
|
* Detaching improvementsTiger Wang2014-01-131-1/+1
| | | | | * Players now search for an area around themselves to teleport to when detaching from something
* Fixed compilation in VC2008.madmaxoft2013-12-301-2/+4
| | | | Also removed an unused inline header file (yuck).
* converted commneted paramater names to the unused macroTycho Bickerstaff2013-12-221-3/+7
|
* ChunkSender is now warnings cleanTycho Bickerstaff2013-12-211-4/+4
|
* Sorted a few constructors to remove warnings.madmaxoft2013-12-201-1/+1
|
* Added cFloater class.STRWarrior2013-12-191-0/+3
|
* Added HandleSpeedFromAttachee so an entity can override the function.STRWarrior2013-12-161-0/+1
|
* Merge remote-tracking branch 'origin/master' into foldermove2Alexander Harkness2013-11-261-0/+1
| | | | | Conflicts: VC2008/MCServer.vcproj
* Moved source to srcAlexander Harkness2013-11-241-0/+445