summaryrefslogtreecommitdiffstats
path: root/src/Mobs/PassiveMonster.cpp (unfollow)
Commit message (Collapse)AuthorFilesLines
2021-04-12Update entity sizesTiger Wang1-1/+1
2021-01-02Fix potential destruction crashes (#5095)Tiger Wang1-9/+0
* 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
2020-12-21Monsters: improve targetingTiger Wang1-1/+1
* Replace DoWithNearestPlayer with bounding box search (avoid iterating through all players in world). * Do line-of-sight checks from eye-to-eye. + Added LOS and LOS lost timer to target lost checks, in addition to distance.
2020-10-09Adding wolf breading and moving breeding functionality to cMonster (#4951)12xx121-185/+3
* added wolf breading * mpoved breeding to monster * checkstyle * fixed my IDE "helping" * removed magic number and fixed faster aging * added flooring to age manipulation * fixed copiler error * fixed typo * moved tps to Defines.h * removed the TPS constant from the lua API exposure * added inline constexpr added explanation * fixed broken build * "fixed" build Co-authored-by: 12xx12 <12xx12100@gmail.com>
2020-09-05Add more statistic tracking (#4837)12xx121-0/+12
+ Added possible 1.8 stats + Added stat tracking for 1.8.2 + Added stat tracking for 1.9 + Added the breed cow achievement Co-authored-by: 12xx12 <12xx12100@gmail.com>
2020-05-15Enable some more clang-tidy linter checks (#4738)peterbell101-1/+1
* 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
2020-04-16Using Super.Mattes D1-5/+5
2020-03-22Add ambient mob sounds (#4521)Mat1-2/+2
2018-08-29Force all headers other than "Globals.h" to be included with relative paths (#4269)peterbell101-1/+1
Closes #4236 CMake now creates a header file in the build directory under the path "include/Globals.h" which just includes "src/Globals.h" with an absolute path. Then instead of adding "src/" to the include directories, it adds "include/". #include "Globals.h" still works by including the build generated file and any other src-relative path will not work.
2018-08-02Experience orb (#4259)changyong guo1-5/+6
* Replace cWorld::FindClosesPlayer with cWorld::DoWithClosestPlayer * Implement experience reward splitting into the orb sizes used in vanilla * Modified speed calculation in cExpOrb::Tick to make the orbs fly towards the player Fixes #4216
2017-09-11Replace ItemCallbacks with lambdas (#3993)peterbell101-33/+16
2017-09-02Revert "Replace ItemCallbacks with lambdas (#3948)"LogicParrot1-16/+33
This reverts commit 496c337cdfa593654018c171f6a74c28272265b5.
2017-09-01Replace ItemCallbacks with lambdas (#3948)peterbell101-33/+16
2017-08-21Fully implemented leashes (#3798)Pablo Beltrán1-1/+1
2017-07-12Added basic ocelot behavior (#3829)Bond-0091-1/+1
2017-07-02When right-clicking on a passive mob with 'his' spawn egg spawn a babyBond_0091-2/+20
2017-06-13FastRandom rewrite (#3754)peterbell101-2/+1
2016-09-03Entities now bail out of ticks if destroyed (#3363)LogicParrot1-0/+5
2016-03-28Fix passive mob destruction crashesLogicParrot1-0/+1
2016-02-19Proper entity destruction in non-ticking chunksLogicParrot1-4/+12
2016-02-04Prevent interspecies breedingLogicParrot1-11/+25
2015-12-13sheep color inheritanceGargaj1-1/+20
2015-11-30Added documentation for breeding codeSafwat Halaby1-4/+9
2015-11-29implement breedingGargaj1-11/+138
2015-11-23change from single followable item to multipleGargaj1-3/+5
2015-05-24Made -Weverything an error.tycho1-1/+1
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-2/+2
2014-10-20En masse NULL -> nullptr replaceTiger Wang1-2/+2
2014-09-17Added first test to show the object can be createdTycho1-1/+1
2014-04-26Add entity invulnerableHowaner1-2/+6
2014-01-29Did what xoft saidtonibm191-1/+1
2014-01-29Rewritten code.tonibm191-1/+15
Implemented xoft suggestion. Using MoveToPosition as tigerw suggested.
2014-01-24Large reworking of mob code [SEE DESC]Tiger Wang1-14/+2
+ Implemented better pathfinding - Removed lots of unused variables, functions, etc. * Changed some variable types * Other miscellaneous fixes, and also completes the previous PRs
2013-11-24Moved source to srcAlexander Harkness1-0/+0
2013-10-20Fixed loading allowed mobs in world.madmaxoft1-2/+2
2013-09-10Inside cMonster::getMobFamily() : replacing Polymorphism by Map, in order to remove redundancymgueydan1-6/+0
2013-09-07Adding Family for monsters : Hostile/Passive/Water/Ambientmgueydan1-0/+7
2013-08-16Replaced E_ENTITY_TYPE_XXX with cMonster::mtXXX.madmaxoft1-0/+1
Also slightly improved the spawning algorithm.
2013-07-01Rewritten entity-on-fire management ("forever on fire" bugs)madmaxoft@gmail.com1-2/+2
Fixes FS #297 and part of FS #403. Added sizes to all entities. Moved all damage-related functions from cPawn to cEntity API change: renamed cPawn:TeleportTo() to cEntity:TeleportToCoords() git-svn-id: http://mc-server.googlecode.com/svn/trunk@1635 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-04-13Rewritten entities so that they are owned by individual chunks and ticked within their chunk's Tick()madmaxoft@gmail.com1-4/+4
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1385 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-12-22MTRand reference is now passed as a Tick() parameter so that it isn't created and destroyed over and over again. All entities will handle physics (empty callback for now)madmaxoft@gmail.com1-5/+4
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1096 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-12-22Reduced most mobs' constructors to oneliners by passing parameters to superclassesmadmaxoft@gmail.com1-2/+3
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1095 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-12-21Refactored the TakeDamage API to take equipped weapon and armor into consideration (PvP untested)madmaxoft@gmail.com1-12/+23
http://forum.mc-server.org/showthread.php?tid=625 git-svn-id: http://mc-server.googlecode.com/svn/trunk@1087 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-09-23Source files cleanup: Mobs-related files in a separate subfolder, renamed.madmaxoft@gmail.com1-2/+2
git-svn-id: http://mc-server.googlecode.com/svn/trunk@883 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-14Attempt to bring sanity to newlines across systems.cedeel@gmail.com1-45/+45
git-svn-id: http://mc-server.googlecode.com/svn/trunk@606 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-01-29VC2008 / VC2010: Enabled precompiled header through Globals.h; the header included in every module in the project. Compilation optimization.madmaxoft@gmail.com1-0/+6
git-svn-id: http://mc-server.googlecode.com/svn/trunk@188 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-12-26- improved Simulator system lapayo94@gmail.com1-1/+2
-> Manager handles all ticks -> advantage: Much easier to add new simulators, because you only have to register them in the manager - moved sand and gravel simulation to a Simulator-class (cSandSimulator) - Made Squid a little bit more funny and realistic, because it dies now when it´s not in water -Escaping mobs run now faster than normal (They just walked away before :D) git-svn-id: http://mc-server.googlecode.com/svn/trunk@125 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-12-26 - Linux compatible fixes including updated makefilemtilden@gmail.com1-1/+3
- Mersenne Twister still says uint32 but it's now signed for compatibility with random uses needing negative values - Server seed is sent to clients, but needs to be able to be signed long long later on for authentic reasons - Protocol Version is required to match to ensure client compatibility, this should probably have a settings.ini check as well as store the value there git-svn-id: http://mc-server.googlecode.com/svn/trunk@121 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-12-25- Fixed Bug #99 -> Mobs no longer bother you in creative modelapayo94@gmail.com1-0/+37
- refactored many things in the Monster system git-svn-id: http://mc-server.googlecode.com/svn/trunk@112 0a769ca7-a7f5-676a-18bf-c427514a06d6