mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2025-12-16 10:00:05 +00:00
added basework for instancing
This commit is contained in:
@@ -42,8 +42,8 @@ struct Mob : public BaseNPC {
|
||||
// temporary; until we're sure what's what
|
||||
nlohmann::json data;
|
||||
|
||||
Mob(int x, int y, int z, int type, int hp, int angle, nlohmann::json d, int32_t id)
|
||||
: BaseNPC(x, y, z, type, id), maxHealth(hp) {
|
||||
Mob(int x, int y, int z, int iID, int type, int hp, int angle, nlohmann::json d, int32_t id)
|
||||
: BaseNPC(x, y, z, iID, type, id), maxHealth(hp) {
|
||||
state = MobState::ROAMING;
|
||||
|
||||
data = d;
|
||||
@@ -68,8 +68,8 @@ struct Mob : public BaseNPC {
|
||||
}
|
||||
|
||||
// constructor for /summon
|
||||
Mob(int x, int y, int z, int type, nlohmann::json d, int32_t id)
|
||||
: Mob(x, y, z, type, 0, 0, d, id) {
|
||||
Mob(int x, int y, int z, int iID, int type, nlohmann::json d, int32_t id)
|
||||
: Mob(x, y, z, iID, type, 0, 0, d, id) {
|
||||
summoned = true; // will be despawned and deallocated when killed
|
||||
appearanceData.iHP = maxHealth = d["m_iHP"];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user