Add transport system, fix NPC spawning, and improve water rendering

Transport System (Phases 1-7):
- Implement TransportManager with Catmull-Rom spline path interpolation
- Add WMO dynamic transforms for moving transport instances
- Implement player attachment via world position composition
- Add test transport with circular path around Stormwind harbor
- Add /transport board and /transport leave console commands
- Reuse taxi flight spline system and external follow camera mode

NPC Spawn Fixes:
- Add smart ocean spawn filter: blocks land creatures at high altitude over water (Z>50)
- Allow legitimate water creatures at sea level (Z≤50) to spawn correctly
- Fixes Elder Grey Bears, Highland Striders, and Plainscreepers spawning over ocean
- Snap online creatures to terrain height when valid ground exists

NpcManager Removal:
- Remove deprecated NpcManager (offline mode no longer supported)
- Delete npc_manager.hpp and npc_manager.cpp
- Simplify NPC animation callbacks to use only creatureInstances_ map
- Move NPC callbacks to game initialization in application.cpp

Water Rendering:
- Fix tile seam gaps caused by per-vertex wave randomization
- Add distance-based blending: seamless waves up close (<150u), grid effect far away (>400u)
- Smooth transition between seamless and grid modes (150-400 unit range)
- Preserves aesthetic grid pattern at horizon while eliminating gaps when swimming
This commit is contained in:
Kelsi 2026-02-10 21:29:10 -08:00
parent c91e0bb916
commit 2e923311d0
13 changed files with 711 additions and 1079 deletions

View file

@ -1,4 +1,5 @@
#include "game/game_handler.hpp"
#include "game/transport_manager.hpp"
#include "game/opcodes.hpp"
#include "network/world_socket.hpp"
#include "network/packet.hpp"
@ -28,6 +29,9 @@ namespace game {
GameHandler::GameHandler() {
LOG_DEBUG("GameHandler created");
// Initialize transport manager
transportManager_ = std::make_unique<TransportManager>();
// Default spells always available
knownSpells.push_back(6603); // Attack
knownSpells.push_back(8690); // Hearthstone
@ -305,6 +309,11 @@ void GameHandler::update(float deltaTime) {
auto taxiEnd = std::chrono::high_resolution_clock::now();
taxiTime += std::chrono::duration<float, std::milli>(taxiEnd - taxiStart).count();
// Update transport manager
if (transportManager_) {
transportManager_->update(deltaTime);
}
// Distance check timing
auto distanceStart = std::chrono::high_resolution_clock::now();
@ -6767,5 +6776,13 @@ void GameHandler::loadCharacterConfig() {
}
}
glm::vec3 GameHandler::getComposedWorldPosition() {
if (playerTransportGuid_ != 0 && transportManager_) {
return transportManager_->getPlayerWorldPosition(playerTransportGuid_, playerTransportOffset_);
}
// Not on transport, return normal movement position
return glm::vec3(movementInfo.x, movementInfo.y, movementInfo.z);
}
} // namespace game
} // namespace wowee