mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2025-09-29 19:20:17 +00:00
Summoned mobs are now actually treated as mobs.
Unfortunetly, this necessitated keeping around yet more JSON objects for the duration of the server's runtime. It also involved unifying the way NPC IDs are handled, such that they may be allocated and deallocated out of order. If any NPCID-related bugs occour, this commit should be regarded as the prime suspect.
This commit is contained in:
@@ -8,7 +8,7 @@ public:
|
||||
NPCClass npcClass;
|
||||
|
||||
BaseNPC() {};
|
||||
BaseNPC(int x, int y, int z, int type) {
|
||||
BaseNPC(int x, int y, int z, int type, int id) {
|
||||
appearanceData.iX = x;
|
||||
appearanceData.iY = y;
|
||||
appearanceData.iZ = z;
|
||||
@@ -17,11 +17,9 @@ public:
|
||||
appearanceData.iAngle = 0;
|
||||
appearanceData.iConditionBitFlag = 0;
|
||||
appearanceData.iBarkerType = 0;
|
||||
|
||||
// hopefully no collisions happen :eyes:
|
||||
appearanceData.iNPC_ID = (int32_t)rand();
|
||||
appearanceData.iNPC_ID = id;
|
||||
};
|
||||
BaseNPC(int x, int y, int z, int type, NPCClass classType) : BaseNPC(x, y, z, type) {
|
||||
BaseNPC(int x, int y, int z, int type, int id, NPCClass classType) : BaseNPC(x, y, z, type, id) {
|
||||
npcClass = classType;
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user