summaryrefslogtreecommitdiffstats
path: root/src/Entities/ProjectileEntity.cpp (unfollow)
Commit message (Collapse)AuthorFilesLines
2020-04-20Delet SpawnObject paramsTiger Wang1-8/+1
* Fix #4679 awkward...
2020-04-19More arrow patchesTiger Wang1-6/+1
* Further reduce instances of appearing black * Fix packet send and get arrows to more reliably lodge in blocks clientside * Fix hit detection failing at chunk boundaries + Use delegating constructors
2020-04-16Using Super.Mattes D1-3/+3
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
2019-09-29Refactored more of Entities and BlockEntities to use Vector3. (#4403)Mattes D1-15/+21
2018-09-24Add a formatting function for Vector3 (#4282)peterbell101-14/+9
* Vector3: Add custom fmt compatible formatter. * cLuaState: Add fmt version of ApiParamError * Use vector formatting in manual bindings * Always log vectors with FLOG
2018-02-05Deal with covered switches consistently (#4161)peterbell101-4/+1
* Fixes a number of "<function>: not all control paths return a value" warnings on MSVC. * Introduces the UNREACHABLE global macro and uses it instead of conditionally compiled switch defaults. * Move cNBTParseErrorCategory from FastNBT.h into FastNBT.cpp to prevent bad calls to message()
2017-09-11Replace ItemCallbacks with lambdas (#3993)peterbell101-24/+16
2017-09-07Changed some int parameters to vector parameters (#3937)Bond-0091-2/+2
2017-09-02Revert "Replace ItemCallbacks with lambdas (#3948)"LogicParrot1-16/+24
This reverts commit 496c337cdfa593654018c171f6a74c28272265b5.
2017-09-01Replace ItemCallbacks with lambdas (#3948)peterbell101-24/+16
2017-08-28Cleanup Vector3 constructors and Abspeterbell101-1/+1
2017-08-07Changed entity ownership model to use smart pointersTiger Wang1-11/+11
2017-05-11Tracer replacement (#3704)Mattes D1-1/+1
* Replaced cTracer usage with cLineBlockTracer. * Exported new cLineBlockTracer utility functions to Lua API.
2016-10-12Spectators added (#2852)bibo381-1/+9
2016-10-09Fixed cProjectileEntity double destroy bug (#3397)LogicParrot1-0/+4
2016-09-03Entities now bail out of ticks if destroyed (#3363)LogicParrot1-0/+5
2016-08-04Fixed RasPi builds of unit tests.Mattes D1-1/+3
On RasPi with gcc 4.8.2, the asserts wouldn't compile when tests were enabled. Enforced the assumption that ASSERT code is generated only in Debug builds.
2016-01-22Improved tamed wolf pack cooperation and projectile reactionsLogicParrot1-10/+8
2016-01-16Fix crash when tamed wolf is hit by arrowsLogicParrot1-3/+4
2016-01-12Tamed wolf assists owner (attack / defence)LogicParrot1-20/+49
2015-07-31Unified the doxy-comment format.Mattes D1-4/+4
2015-05-24Made -Weverything an error.tycho1-3/+3
2015-05-19Make -Werror disabling file onlytycho1-0/+1
Ad fix a load of warnings
2015-03-31Changed air drag units to 'interpolated ticks' per secondDevToaster1-3/+3
2015-03-31Adjusted projectile physicsDevToaster1-4/+6
2015-03-31Modified physics for more vanilla-like behaviorDevToaster1-0/+4
2015-03-21Changed cEntity::m_UniqueID to UInt32.Mattes D1-1/+1
2015-03-20Improved arrow in-flight and block-hit appearanceTiger Wang1-6/+1
* Fixes #1495
2015-01-11Initial convertion of a_Dt to std::chronoTycho1-2/+2
also refactored cWorld::m_WorldAge and cWorld::m_TimeOfDay
2014-10-23En masse NULL -> nullptr replaceTiger Wang1-8/+8
2014-10-20En masse NULL -> nullptr replaceTiger Wang1-8/+8
2014-10-15Functions in cPluginManager get references instead of pointers.Mattes D1-1/+5
2014-08-19FixesJaume Aloy1-2/+3
- Changed m_TicksLeftBurning > 0 for IsOnFire() - Tried to do the changes in BlockHandler.cpp - Removed m_Creator in ArrowEntity - Added m_Enchantments in ProjectileEntity CreatorData - Added blank lines between functions
2014-07-26Moved potion static functions to EntityEffect to create splash potions through worldarchshift1-0/+2
2014-07-20Added m_TicksAlive to entities, allows projectiles to hit their creatorsarchshift1-3/+5
2014-07-17Normalized comments.madmaxoft1-3/+3
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-13Made CreateProjectile a pointerworktycho1-3/+4
2014-07-12Added splash potions to NBT serialization and retrievalarchshift1-1/+1
2014-07-07Added extra space before commentsTiger Wang1-6/+6
2014-07-05Changed everything to callbacksTiger Wang1-71/+1
2014-07-04Crash and compile fixTiger Wang1-3/+8
2014-07-04Various fixedTiger Wang1-3/+72
* Fixed potential invalid pointer dereferencing, fixes #1117 * Fixed ender pearls not being loaded properly
2014-06-28An unification of code styleTiger Wang1-1/+1
2014-06-22Fixed multiple issues with projectilesTiger Wang1-27/+34
* Fixed arrows not being collectable/not truly hitting a block/not lodging into blocks/not going in far enough * Fixed projectiles not playing their block hit animation owning to being destroyed too quickly
2014-06-17Added splash potion functionalityarchshift1-2/+0
2014-06-17Added classes for splash potions and wither skullsarchshift1-0/+4
2014-05-31Used recommendationsSTRWarrior1-2/+1
2014-04-28Fixed projectile source filenames, indentationsarchshift1-8/+8
2014-04-27Fixed ToLua errors, added newlinesarchshift1-1/+1
2014-04-27Moved cFireworkEntity out of ProjectileEntity.harchshift1-71/+1
2014-04-27Moved cGhastFireballEntity out of ProjectileEntity.harchshift1-43/+1
2014-04-27Moved cFireChargeEntity out of ProjectileEntity.harchshift1-54/+2
2014-04-27Moved cThrownSnowballEntity out of ProjectileEntity.harchshift1-47/+1
2014-04-27Moved cExpBottleEntity out of ProjectileEntity.harchshift1-26/+1
2014-04-27Moved cThrownEnderPearl out of ProjectileEntity.harchshift1-54/+1
2014-04-27Moved cThrownEggEntity out of ProjectileEntity.harchshift1-58/+1
2014-04-27Moved cArrowEntity out of ProjectileEntity.harchshift1-192/+3
2014-04-25Creator not user.archshift1-3/+3
2014-04-25Rename spawn chicken method, Initialize m_HasTeleported.archshift1-3/+4
2014-04-25Chicken eggs and ender pearls can hit entities.archshift1-6/+56
Fixed warning by adding dedicated m_HasTeleported for fired arrows.
2014-04-12Entities handle chunks properly againTiger Wang1-1/+1
* Entities properly handle chunks * Changed EntityStatus enums to be less shouty
2014-04-05Removed debugging log from entity physics handling.madmaxoft1-1/+2
2014-03-30Using recommendations (I think)STRWarrior1-1/+2
2014-03-30Added a BlockHitPos parameter to OnProjectileHitBlockSTRWarrior1-2/+2
2014-03-30Added a blockface parameter to the OnProjectileHitBlock hook.STRWarrior1-1/+1
2014-03-29Fixed the OnProjectileHitBlock hook not stopping projectiles.STRWarrior1-1/+1
2014-03-29Added HOOK_PROJECTILE_HIT_BLOCK.STRWarrior1-0/+5
2014-03-29Fixed error when the hook gets called.STRWarrior1-1/+0
2014-03-29Added HOOK_PROJECTILE_HIT_ENTITYSTRWarrior1-0/+6
2014-03-11TakeDamage now has the cThrownSnowballEntity instead of the creator's object.STRWarrior1-1/+1
2014-03-11Snowballs now actualy hurt other entities.STRWarrior1-2/+24
3 damage for blazes and 1 for the ender dragon. Otherwise 0
2014-03-01g_BlockXXX => cBlockInfo::XXXandrew1-2/+2
2014-02-27Implemented ballistic missiles (fireworks)Tiger Wang1-40/+47
+ Added fireworks
2014-02-16Replace random Float Generation and broadcast the Exp Pickup SoundHowaner1-3/+1
2014-02-16Add Exp Bottle EffectsHowaner1-0/+3
2014-02-04Improved Type safety of eBlockFaceTycho1-11/+11
May Fix #640
2014-01-29Removed debug message when a firework entity hit a solid block.STRWarrior1-2/+0
2014-01-29Bottle o' Enchanting spawns an experience orb.STRWarrior1-1/+2
2014-01-17Removed internal cEntity::GetRot() usage.madmaxoft1-3/+3
2014-01-16Removed obsoleted functionsTiger Wang1-6/+6
2013-12-20More reordering fixes.madmaxoft1-2/+2
2013-12-20Sorted a few constructors to remove warnings.madmaxoft1-2/+2
2013-12-06Tools make a sound when breaking, fixes #266Tiger Wang1-1/+1
2013-11-24Moved source to srcAlexander Harkness1-0/+0
2013-11-16General fixes [SEE DESC]Tiger Wang1-15/+105
* Fixed faulty block face enumeration and functions + Added fireworks and exp bottle spawning * Fixed arrows again
2013-11-15Switchified If, ElseIf statementTiger Wang1-11/+16
Also updated comments
2013-11-14Fixed arrow bugsTiger Wang1-24/+41
* Fixed arrows hitting blocks wrong
2013-11-12Bundled fixes [SEE DESC]Tiger Wang1-3/+104
* BoundingBox now returns FACE_NONE + Arrows can be picked up * Arrows dug up resume physics simulations * Added sound effects for bows, lava to stone, and arrows * Fixed SoundParticleEffect on <1.7 protocols
2013-11-10Bundled fixes [SEE DESC]Tiger Wang1-0/+3
* Fixed pickups spawning in an incorrect position from a JukeBox * Pickups make a popping sound in Prtcl1.7 * Arrows make a *what sort of sound does an arrow make anyway‽* when hitting a block, and a popping sound when fired * Mobs again have metadata * Fixed Prtcl1.7 not using valid JSON to kick a client * Minecarts and arrows again have metadata
2013-10-29Using tabstonibm191-2/+2
2013-10-28fixed indentationtonibm191-1/+1
2013-10-28extra linetonibm191-0/+1
2013-10-28attempt at fixing indentationtonibm191-3/+2
2013-10-28Extra linetonibm191-0/+1
2013-10-28Fixed indentationtonibm191-5/+2
2013-10-28Added random chicken spawn when throwing an eggtonibm191-2/+13
2013-09-07Added a (disabled) block logging to projectile path-tracing.madmaxoft1-0/+10
2013-09-07Implemented ghast fireball and firecharge projectilesmadmaxoft1-7/+102
2013-09-07Arrows have proper yaw and pitch when shot, and stop when they hit a block.madmaxoft1-7/+30
2013-09-03Implemented exact block hit position.madmaxoft1-21/+26
Arrows now stick out of blocks at the exact position where they hit.
2013-09-03Arrows deal damage based on their speed.madmaxoft1-4/+10
2013-09-02Projectiles slow down in water and lava.madmaxoft1-3/+14
2013-09-02Projectiles don't collide with their creators.madmaxoft1-2/+6
2013-09-01Arrows deal damage.madmaxoft1-4/+123
Still needs some tweaks, they hit the shooter most of the time.
2013-08-30Thrown ender pearls now teleport and hurt.madmaxoft1-1/+7
2013-08-30Basic support for thrown items - eggs, snowballs and ender pearls.madmaxoft1-3/+88
They can be thrown, but they don't do anything on impact. Also they don't save to nor load from MCA.
2013-08-30Moved throw pos and speed calculation from cProjectileEntity into cPlayer.madmaxoft1-31/+1
2013-08-30Shooting a bow kinda works.madmaxoft1-0/+41
The arrow is released, but sometimes hits wrong blocks or disappears completely.
2013-08-27Implemented basic physics for projectiles.madmaxoft1-18/+129
2013-08-26Debug logging for arrows improvedmadmaxoft1-1/+8
2013-08-26Debug: arrow log their position in each tickmadmaxoft1-0/+12
2013-08-25Added a few API accessors to cArrowEntity.madmaxoft1-0/+17
2013-08-22Added a few basic fields to cProjectileEntity and cArrowEntity.madmaxoft1-1/+29
2013-08-22Arrows can spawn on the client.madmaxoft1-1/+2
2013-08-22Added skeleton code for projectile spawning.madmaxoft1-0/+79