summaryrefslogtreecommitdiffstats
path: root/src/Mobs/PathFinder.cpp (follow)
Commit message (Collapse)AuthorAgeFilesLines
* handled the infinite loop and stylex12xx12x2022-04-201-1/+1
|
* Valid Height is now checked by vector.x12xx12x2022-04-201-35/+39
|
* Chest, weather, crash, and miscellaneous fixes (#5215)Tiger Wang2021-04-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Alpha-sort cChestEntity * Chests: use SendUpdateBlockEntity * Pathfinder: fix out of range Y * 1.13: correct weather packet ID * Chests: fix neighbour scanner + Add OnAddToWorld and overload to scan neighbours there, instead of in the constructor/OnUse. This fixes hoppers accessing newly loaded double chests and seeing a null m_Neighbour, thus thinking its a single chest. * Fix typo in cross coords computation. * Simplify hopper logic. * Block entities: ASSERT that type is correct If you match the block type first before calling DoWithBlockEntity, the corresponding block entity must either be empty or correspond to the block type. * Chunk: fix some forgotten PendingSendBE cleanup + Add cleanup in SetAllData, WriteBlockArea - Remove RemoveBlockEntity (used once), HasBlockEntity (not used) * Replace MakeIndex with MakeIndexNoCheck * Remove extraneous MarkDirty in hopper & chests
* Update entity sizesTiger Wang2021-04-121-4/+3
|
* Unify DoWithBlockEntity (#5168)Tiger Wang2021-03-281-0/+1
| | | | | | + DoWith calls now broadcast the block entity and mark the chunk dirty + Add block entity change queue to synchronise BE updates with block updates * Fixed a few incorrect assertions about BE type - Remove manual overloads
* Enable some more clang-tidy linter checks (#4738)peterbell102020-05-151-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Avoid inefficient AString -> c_str() -> AString round trip * Avoid redundant string init expressions * Avoid unnecessary return, continue, etc. * Add .clang-format to help with clang-tidy fix-its * Avoid unnecessary passing by value * Avoid unnecessary local copying * Avoid copying in range-for loops * Avoid over-complicated boolean expressions * Some violations missed by my local clang-tidy * Allow unnecessary continue statements * Add brackets * Another expression missed locally * Move BindingsProcessor call into clang-tidy.sh and add space * Fix pushd not found error * Different grouping of CheckBlockInteractionRate
* 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
* Deal with covered switches consistently (#4161)peterbell102018-02-051-7/+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()
* Fix issues below y = 0LogicParrot2016-04-181-2/+8
|
* PF - "Special blocks" handlingSafwat Halaby2015-12-241-39/+59
|
* PF - Improved mob jumpingSafwat Halaby2015-12-211-1/+5
|
* Revert "Changed cPath to have a reset method".Safwat Halaby2015-12-211-8/+8
|
* Changed cPath to have a reset method.tycho2015-12-161-8/+8
| | | | | | Also reverts "Changed raw cPath to an unique_ptr, fixes memory leak" This reverts commit 1515d37684b469f212bb9858cca6128d74e591b6.
* Changed raw cPath to an unique_ptr, fixes memory leakLukas Pioch2015-12-151-8/+8
|
* Decoupled cMonster and path recalc logic, re-implemented recalcSafwat Halaby2015-12-131-0/+261