mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2026-02-07 13:00:04 +00:00
[WIP] Convert most of Chunking to Entity-based system
Player and all NPCs now have a common superclass, with virtual functions so smooth over shared behavior. EntityRef is a simple class that points to an arbitrary Entity. This commit is not yet functional.
This commit is contained in:
14
src/Eggs.hpp
14
src/Eggs.hpp
@@ -1,19 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "core/Core.hpp"
|
||||
#include "NPC.hpp"
|
||||
|
||||
struct Egg : public BaseNPC {
|
||||
bool summoned;
|
||||
bool dead = false;
|
||||
time_t deadUntil;
|
||||
|
||||
Egg(int x, int y, int z, uint64_t iID, int type, int32_t id, bool summon)
|
||||
: BaseNPC(x, y, z, 0, iID, type, id) {
|
||||
summoned = summon;
|
||||
npcClass = NPCClass::NPC_EGG;
|
||||
}
|
||||
};
|
||||
#include "Entities.hpp"
|
||||
|
||||
struct EggType {
|
||||
int dropCrateId;
|
||||
|
||||
Reference in New Issue
Block a user