Last active
December 10, 2015 07:58
-
-
Save eilo/4404984 to your computer and use it in GitHub Desktop.
IntersectRay crashfix old patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From d6ba840ac16aca012f9f7d225ad766d3f844726c Mon Sep 17 00:00:00 2001 | |
From: Eilo <[email protected]> | |
Date: Sat, 21 Nov 2012 01:33:34 -0500 | |
Subject: [PATCH] 1.60 GameObject: Avoiding crashes on IntersectRay due to duplicated models | |
--- | |
src/server/game/Entities/GameObject/GameObject.cpp | 17 +++++++++++------ | |
1 file changed, 11 insertions(+), 6 deletions(-) | |
diff --git a/src/server/game/Entities/GameObject/GameObject.cpp b/src/server/game/Entities/GameObject/GameObject.cpp | |
index f7c4f49..3a03aa8 100755 | |
--- a/src/server/game/Entities/GameObject/GameObject.cpp | |
+++ b/src/server/game/Entities/GameObject/GameObject.cpp | |
@@ -221,6 +221,11 @@ bool GameObject::Create(uint32 guidlow, uint32 name_id, Map* map, uint32 phaseMa | |
SetDisplayId(goinfo->displayId); | |
+ if (m_model && m_goInfo) | |
+ if (GetMap()->ContainsGameObjectModel(*m_model)) | |
+ GetMap()->RemoveGameObjectModel(*m_model); | |
+ delete m_model; | |
+ | |
m_model = GameObjectModel::Create(*this); | |
// GAMEOBJECT_BYTES_1, index at 0, 1, 2 and 3 | |
SetGoType(GameobjectTypes(goinfo->type)); | |
-- | |
1.7.11.msysgit.1 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment