summaryrefslogtreecommitdiff
path: root/src/actormanager.cpp
AgeCommit message (Collapse)AuthorFilesLines
10 daysReformat ActorManager::checkForPickup for (visual) consistency with similar ↵Fedja Beader1-6/+14
blocks in pickup search functions This block repeats many times.. but cannot be de-duplicated without that pesky search for empty string. perhaps I should make an (inline) function that takes allowAll and the item or a scoped functor that does the lookup in constructor. **** mana/plus!166
2025-04-06Refactor ActorManager::validateBeing()Fedja Beader1-6/+26
Squashed with: * More docs for validateBeing * addendum documentation for validateBeing **** mana/plus!154
2025-04-06findNearestLivingBeing: do cheap bb check before set lookups or pathfinderFedja Beader1-14/+20
bb= bounding box **** mana/plus!145
2025-04-06findNearestLivingBeing: move (unknown) cheap check before set lookupFedja Beader1-6/+6
seems to skip beings with info if stopattack is active or if they are marked as unselectable (like hammocks in ML)... huh? **** mana/plus!145
2025-04-06findNearestLivingBeing: remove redundant branchFedja Beader1-16/+6
as without filtering, priority and closestPriority are always the same **** mana/plus!145
2025-04-06findNearestLivingBeing: closest* are always set to something sensible,Fedja Beader1-14/+3
making special handling before first suitable being is found unnecessary. **** mana/plus!145
2025-04-06findNearestLivingBeing: search priorityMobsMap at most once per being (down ↵Fedja Beader1-19/+15
from 3x) Note: the filter used priorityMobs (instead of priorityMobsMap). The former seems to be the std::set variant of the latter, but I can't find where either are filled. It does work in practice, however... **** mana/plus!145
2025-04-06findNearestLivingBeing: rename index -> closestPriorityFedja Beader1-6/+6
**** mana/plus!145
2025-04-06findNearestLivingBeing: only update closestBeing if it satisfiesFedja Beader1-20/+17
distance criteria. This should also resolve a theoretical bug if there is a non-ignored being within range, but something out of range has priority Cleanup addednum: rename d to distSq **** mana/plus!145
2025-04-06Clean-up ActorManager::findNearestLivingBeingFedja Beader1-13/+16
This resolves at least three instances where squared distance was compared with non-squared one, two cases of maxDist and no squaring of getDistance result (which was then compared with squared distance). **** mana/plus!145
2025-03-13Clean-up and optimise ActorManager::findMostDamagedPlayerFedja Beader1-15/+21
Cheaper checks reordered to be checked first, removed squared root. **** mana/plus!144
2025-03-10Speedup ActorManager::findNearestByName by testing cheap bounding box ↵Fedja Beader1-9/+8
distance before (potentially) asking pathfinder. Pathfinder may get called in the validateBeing() call, can't tell yet. Squashed with: * Fix linter This test and the below static_cast looks like dynamic_cast should've been used. **** mana/plus!143
2025-03-10Cosmetic cleanup of ActorManager::pickUpNearestFedja Beader1-12/+12
Squashed with: * Fix lint.. just revert previous state, I'll deal with it when I make things pass Positions **** mana/plus!142
2025-01-28Fix typo chec -> checkFedja Beader1-1/+1
**** mana/plus!113
2024-08-28Fix off-by-one causing archer attack mode to approach to within attack range - 1Fedja Beader1-1/+1
**** mana/plus!96
2024-08-24Simplify itempickup codeFedja Beader1-3/+4
**** mana/plus!94
2024-08-18Make code more readableFedja Beader1-17/+29
g **** mana/plus!77
2024-02-09Update copyright headers up to 2023Jesusalva Jesusalva1-1/+2
2019-06-24Fix code styleAndrei Karas1-3/+1
2019-03-21Add missing check in ActorManager::addCharAndrei Karas1-1/+2
2019-03-05Remove extra includes.Andrei Karas1-2/+0
2019-03-04Fix player names in guild in new packets.Andrei Karas1-0/+10
2019-01-01Update copyright year.Andrei Karas1-1/+1
2018-11-27Remove extra ; from different code.Andrei Karas1-17/+17
2018-11-05Fix code style.Andrei Karas1-4/+2
2018-02-23Replace some empty strings to std::string().Andrei Karas1-7/+9
2018-01-04Update copyrights year.Andrei Karas1-1/+1
2017-12-11Remove default parameters from ChatTab::chatLog.Andrei Karas1-8/+28
2017-10-06remove extra includes if build without tmwa support.Andrei Karas1-3/+8
2017-08-22Remove some parentheses.Andrei Karas1-3/+3
2017-08-21Remove useless else.Andrei Karas1-113/+105
2017-08-14Replace static members usage from pointers to direct classes.Andrei Karas1-1/+1
clang-tidy warning: readability-static-accessed-through-instance
2017-07-30Add option to show player name at top or at bottom.Andrei Karas1-2/+8
Add also enum for badge draw type.
2017-07-14Replace std::vector into macro STD_VECTOR.Andrei Karas1-5/+5
In most case it equal to std::vector except debug modes. Now it can be also mse::mstd::vector, but sadly this class not support all required features.
2017-06-29Move foreach macroses into separate file.Andrei Karas1-0/+1
2017-06-13Move virtual methods from Being constructor to postInit.Andrei Karas1-1/+4
2017-06-11Rename player_relations into playerRelations.Andrei Karas1-2/+2
2017-06-08Improve strings concatination performance.Andrei Karas1-3/+3
2017-06-08Replace size() to empty() where is possibleAndrei Karas1-1/+1
2017-06-07Fix clang-tidy check readability-implicit-bool-cast.Andrei Karas1-89/+93
2017-06-04Fix code style.Andrei Karas1-1/+1
2017-05-08Fix wrong checks after removing some server features.Andrei Karas1-1/+1
2017-05-01Remove ServerFeatures haveMonsterName because it depend only on server type.Andrei Karas1-1/+5
2017-04-03Replace string::append with pathJoin.Andrei Karas1-4/+3
2017-02-21Move other fs related files into fs directory.Andrei Karas1-1/+2
2017-01-17Add missing A_DEFAULT_COPY / A_DELETE_COPY into other files.Andrei Karas1-0/+6
2017-01-03Update copyright year.Andrei Karas1-1/+1
2016-12-10Fix some issues found by automatic checks.Andrei Karas1-1/+1
2016-09-23Add missing comments into defines.Andrei Karas1-3/+3
2016-08-24First step of removing local pets (tmwa only).Andrei Karas1-6/+0