mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2025-12-16 10:00:05 +00:00
Implemented static paths for mobs (like Don Doom and Bad Max).
* Mobs now retreat to where they were when they were roaming; not their spawn point * /toggleai still sends them back to their spawn point however * Fixed a bug where mobs would respawn where they were killed instead of their proper spawn point * Fixed mobs roaming despite simulatemobs being set to false * Updated tdata submodule
This commit is contained in:
@@ -40,6 +40,7 @@ struct Mob : public BaseNPC {
|
||||
// combat
|
||||
CNSocket *target = nullptr;
|
||||
time_t nextAttack = 0;
|
||||
int roamX, roamY, roamZ;
|
||||
|
||||
// temporary; until we're sure what's what
|
||||
nlohmann::json data;
|
||||
@@ -57,9 +58,9 @@ struct Mob : public BaseNPC {
|
||||
if (regenTime >= 300000000)
|
||||
regenTime = 1500;
|
||||
|
||||
spawnX = appearanceData.iX;
|
||||
spawnY = appearanceData.iY;
|
||||
spawnZ = appearanceData.iZ;
|
||||
roamX = spawnX = appearanceData.iX;
|
||||
roamY = spawnY = appearanceData.iY;
|
||||
roamZ = spawnZ = appearanceData.iZ;
|
||||
|
||||
appearanceData.iConditionBitFlag = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user