Created
August 12, 2012 03:31
-
-
Save e000/3329459 to your computer and use it in GitHub Desktop.
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
diff --git a/src/server/game/Entities/GameObject/GameObject.cpp b/src/server/game/Entities/GameObject/GameObject.cpp | |
index 1d9958a..ac1393f 100755 | |
--- a/src/server/game/Entities/GameObject/GameObject.cpp | |
+++ b/src/server/game/Entities/GameObject/GameObject.cpp | |
@@ -138,8 +138,8 @@ void GameObject::AddToWorld() | |
bool toggledState = GetGOData() ? GetGOData()->go_state == GO_STATE_READY : false; | |
if (m_model) | |
GetMap()->Insert(*m_model); | |
- if (startOpen ^ toggledState) | |
- EnableCollision(false); | |
+ | |
+ EnableCollision(startOpen ^ toggledState); | |
WorldObject::AddToWorld(); | |
} | |
@@ -1923,9 +1923,9 @@ void GameObject::SetLootState(LootState state, Unit* unit) | |
bool startOpen = (GetGoType() == GAMEOBJECT_TYPE_DOOR || GetGoType() == GAMEOBJECT_TYPE_BUTTON ? GetGOInfo()->door.startOpen : false); | |
// Use the current go state | |
- if (GetGoState() == GO_STATE_ACTIVE) | |
+ if (GetGoState() != GO_STATE_ACTIVE) | |
startOpen = !startOpen; | |
- | |
+ | |
if (state == GO_ACTIVATED || state == GO_JUST_DEACTIVATED) | |
EnableCollision(startOpen); | |
else if (state == GO_READY) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment