Simplified the use of roamboxes and improved the AI for roambox pathing

This commit is contained in:
Akkadius
2019-08-16 03:25:34 -05:00
parent c149e6ca5f
commit 05e7c473df
22 changed files with 638 additions and 245 deletions
+4 -5
View File
@@ -264,7 +264,7 @@ bool Spawn2::Process() {
if (npc->DropsGlobalLoot()) {
npc->CheckGlobalLootTables();
}
npc->SetSp2(spawngroup_id_);
npc->SetSpawnGroupId(spawngroup_id_);
npc->SaveGuardPointAnim(anim);
npc->SetAppearance((EmuAppearance) anim);
entity_list.AddNPC(npc);
@@ -274,9 +274,7 @@ bool Spawn2::Process() {
/**
* Roambox init
*/
if (spawn_group->roamdist && spawn_group->roambox[0] && spawn_group->roambox[1] && spawn_group->roambox[2] &&
spawn_group->roambox[3] && spawn_group->delay && spawn_group->min_delay) {
if (spawn_group->roamdist > 0) {
npc->AI_SetRoambox(
spawn_group->roamdist,
spawn_group->roambox[0],
@@ -298,7 +296,8 @@ bool Spawn2::Process() {
npcid,
x,
y,
z);
z
);
LoadGrid();
}