mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 07:40:14 +00:00
Disable collision for carpet and rug M2 models
- Add carpet/rug name detection in model loading - Set collisionNoBlock flag for carpet and rug models - Prevents slipping/sliding on decorative floor coverings - Player can now walk through carpets without collision
This commit is contained in:
parent
b222b78734
commit
0c590ac952
1 changed files with 5 additions and 1 deletions
|
|
@ -913,6 +913,9 @@ bool M2Renderer::loadModel(const pipeline::M2Model& model, uint32_t modelId) {
|
|||
(lowerName.find("well") != std::string::npos) ||
|
||||
(lowerName.find("base") != std::string::npos);
|
||||
bool lowPlatformLikeShape = lowWideShape || lowPlatformShape;
|
||||
bool carpetOrRug =
|
||||
(lowerName.find("carpet") != std::string::npos) ||
|
||||
(lowerName.find("rug") != std::string::npos);
|
||||
gpuModel.collisionSmallSolidProp =
|
||||
!gpuModel.collisionSteppedFountain &&
|
||||
!gpuModel.collisionSteppedLowPlatform &&
|
||||
|
|
@ -921,7 +924,8 @@ bool M2Renderer::loadModel(const pipeline::M2Model& model, uint32_t modelId) {
|
|||
!curbLikeName &&
|
||||
!lowPlatformLikeShape &&
|
||||
(smallSolidPropName || (genericSolidPropShape && !foliageName && !softTree));
|
||||
gpuModel.collisionNoBlock = ((foliageName || softTree) &&
|
||||
// Disable collision for foliage, soft trees, and decorative carpets/rugs
|
||||
gpuModel.collisionNoBlock = ((foliageName || softTree || carpetOrRug) &&
|
||||
!forceSolidCurb);
|
||||
}
|
||||
gpuModel.boundMin = tightMin;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue