[refactor] Refactor groups

This commit is contained in:
gsemaj
2022-04-22 21:13:00 -04:00
committed by gsemaj
parent 4b834579c5
commit 03d28bf4e4
11 changed files with 182 additions and 160 deletions

View File

@@ -25,6 +25,7 @@ enum class AIState {
};
class Chunk;
struct Group;
struct Entity {
EntityKind kind = EntityKind::INVALID;
@@ -130,6 +131,7 @@ struct CombatNPC : public BaseNPC, public ICombatant {
int level = 0;
int speed = 300;
AIState state = AIState::INACTIVE;
Group* group = nullptr;
int playersInView = 0; // for optimizing away AI in empty chunks
std::map<AIState, void (*)(CombatNPC*, time_t)> stateHandlers;