LURE: Partial fix for #3008511 Goewin getting stuck

This workaround prevents the Weregate from closing whilst Goewin is still within it

svn-id: r52971
This commit is contained in:
Paul Gilbert 2010-10-02 00:08:13 +00:00
parent 1177692701
commit f94752f752
2 changed files with 11 additions and 1 deletions

View File

@ -236,7 +236,6 @@ private:
BarPlaceResult getBarPlace();
bool findClearBarPlace();
bool characterWalkingCheck(uint16 id);
bool doorCloseCheck(uint16 doorId);
void resetDirection();
// Action set
@ -450,6 +449,7 @@ public:
void updateMovement();
void updateMovement2(CharacterMode value);
void resetPosition();
bool doorCloseCheck(uint16 doorId);
void doAction();
void doAction(Action action, HotspotData *hotspot);

View File

@ -901,6 +901,16 @@ uint16 Script::execute(uint16 startOffset) {
uint16 offset = startOffset;
bool breakFlag = false;
// WORKAROUND: Prevents the Weregate door closing prematurely
if (startOffset == 3941) {
Hotspot *goewinHotspot = r.getActiveHotspot(GOEWIN_ID);
if (!goewinHotspot->doorCloseCheck(10025)) {
// Goewin is still blocking the door, so reschedule the closing
r.delayList().add(1, startOffset, false);
return 0;
}
}
param = 0;
fields.setField(SEQUENCE_RESULT, 0);