mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-07 01:23:52 +00:00
fix(sql): wander_distance is 0 for non-Wander NPCs
Stationary and Patrol creatures should have wander_distance=0; only Wander behaviour uses it. Previously the editor's wanderRadius template default of 10.0 was being written for every spawn, making stationary guards drift around in-game.
This commit is contained in:
parent
2d41e560f2
commit
70366dc5f6
1 changed files with 3 additions and 1 deletions
|
|
@ -116,7 +116,9 @@ bool SQLExporter::exportCreatures(const std::vector<CreatureSpawn>& spawns,
|
|||
<< wowX << ", " << wowY << ", " << wowZ << ", "
|
||||
<< orientRad << ", "
|
||||
<< (s.respawnTimeMs / 1000) << ", "
|
||||
<< s.wanderRadius << ", "
|
||||
// wander_distance only meaningful for Wander behaviour; Patrol uses
|
||||
// waypoint_data and Stationary doesn't move at all.
|
||||
<< (s.behavior == CreatureBehavior::Wander ? s.wanderRadius : 0.0f) << ", "
|
||||
<< static_cast<int>(movementType)
|
||||
<< ") ON DUPLICATE KEY UPDATE `position_x`=" << wowX << ";\n";
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue