diff --git a/src/game/Object.cpp b/src/game/Object.cpp index 2c318cce2..8386721ea 100644 --- a/src/game/Object.cpp +++ b/src/game/Object.cpp @@ -124,9 +124,6 @@ void Object::_Create( uint32 guidlow, uint32 entry, HighGuid guidhigh ) void Object::SetObjectScale(float newScale) { - if (newScale <= 0.0f) - newScale = DEFAULT_OBJECT_SCALE; - SetFloatValue(OBJECT_FIELD_SCALE_X, newScale); } diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp index 0dd4cd59d..e6f9a0168 100644 --- a/src/game/ObjectMgr.cpp +++ b/src/game/ObjectMgr.cpp @@ -6000,6 +6000,14 @@ void ObjectMgr::LoadGameobjectInfo() if (!goInfo) continue; + + if (goInfo->size <= 0.0f) // prevent use too small scales + { + ERROR_DB_STRICT_LOG("Gameobject (Entry: %u GoType: %u) have too small size=%f", + goInfo->id, goInfo->type, goInfo->size); + const_cast(goInfo)->size = DEFAULT_OBJECT_SCALE; + } + // some GO types have unused go template, check goInfo->displayId at GO spawn data loading or ignore switch(goInfo->type) diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 36d31d2f3..b3a11ffc3 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "10117" + #define REVISION_NR "10118" #endif // __REVISION_NR_H__