-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move map cache to monster #4788
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if it was clear, but the map cache is used only for monsters due to the overriding of this method. We can move it to the monster class in that case.
@@ -218,7 +231,17 @@ class Monster final : public Creature | |||
uint32_t getDamageImmunities() const override { return mType->info.damageImmunities; } | |||
uint32_t getConditionImmunities() const override { return mType->info.conditionImmunities; } | |||
void getPathSearchParams(const Creature* creature, FindPathParams& fpp) const override; | |||
bool useCacheMap() const override { return !randomStepping; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Override here. (monster)
@@ -355,19 +354,12 @@ class Creature : virtual public Thing | |||
decltype(auto) getStorageMap() const { return storageMap; } | |||
|
|||
protected: | |||
virtual bool useCacheMap() const { return false; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Virtual creature function.
Pull Request Prelude
See above.