mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-26 00:40:15 +00:00
Add M2 global sequence animation, smoke UV scroll, and fix WMO floor detection
- Parse global sequence durations from M2 binary and use them in bone interpolation so torches, candles, and other env doodads animate. - Add UV scroll shader effect for smoke models (HouseSmoke, SmokeStack) as a workaround for unimplemented M2 particle emitters. - Tighten WMO floor probe heights to prevent multi-story buildings from returning the wrong floor, fixing player clipping through inn floors and camera locking onto the second floor. - Use player ground level as reference for camera orbit floor collision so the camera doesn't fight upper floors in buildings.
This commit is contained in:
parent
6ca9e9024a
commit
11a4958e84
5 changed files with 114 additions and 38 deletions
|
|
@ -422,6 +422,13 @@ M2Model M2Loader::load(const std::vector<uint8_t>& m2Data) {
|
|||
core::Logger::getInstance().debug(" Animation sequences: ", model.sequences.size());
|
||||
}
|
||||
|
||||
// Read global sequence durations (used by environmental animations: smoke, fire, etc.)
|
||||
if (header.nGlobalSequences > 0 && header.ofsGlobalSequences > 0) {
|
||||
model.globalSequenceDurations = readArray<uint32_t>(m2Data,
|
||||
header.ofsGlobalSequences, header.nGlobalSequences);
|
||||
core::Logger::getInstance().debug(" Global sequences: ", model.globalSequenceDurations.size());
|
||||
}
|
||||
|
||||
// Read bones with full animation track data
|
||||
if (header.nBones > 0 && header.ofsBones > 0) {
|
||||
// Verify we have enough data for the full bone structures
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue