Created
May 16, 2013 17:44
-
-
Save SymbolixDEV/5593581 to your computer and use it in GitHub Desktop.
Rign of valor toggle visual gameobject accordingly
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
@@ -65,8 +65,6 @@ void BattlegroundRV::PostUpdateImpl(uint32 diff) | |
SwitchDynLos(); | |
break; | |
case BG_RV_STATE_SWITCH_PILLARS: | |
- for (uint8 i = BG_RV_OBJECT_PILAR_1; i <= BG_RV_OBJECT_PULLEY_2; ++i) | |
- DoorOpen(i); | |
TogglePillarCollision(); | |
setTimer(BG_RV_PILLAR_SWITCH_TIMER); | |
break; | |
@@ -222,6 +220,13 @@ void BattlegroundRV::TogglePillarCollision() | |
{ | |
bool apply = GetPillarCollision(); | |
+ // Toggle visual pillars, pulley, gear, and collision based on previous state | |
+ for (uint8 i = BG_RV_OBJECT_PILAR_1; i <= BG_RV_OBJECT_GEAR_2; ++i) | |
+ apply ? DoorOpen(i) : DoorClose(i); | |
+ | |
+ for (uint8 i = BG_RV_OBJECT_PILAR_2; i <= BG_RV_OBJECT_PULLEY_2; ++i) | |
+ apply ? DoorClose(i) : DoorOpen(i); | |
+ | |
for (uint8 i = BG_RV_OBJECT_PILAR_1; i <= BG_RV_OBJECT_PILAR_COLLISION_4; ++i) | |
{ | |
if (GameObject* gob = GetBgMap()->GetGameObject(BgObjects[i])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment