Permalink
Browse files

When PC fails to unlock a door, torment needs to know so it can start…

… dialog
  • Loading branch information...
chilvence committed Dec 27, 2013
1 parent 3305f16 commit c7d29ab430d3ffca9c52151af896eba8ba14bc34
Showing with 2 additions and 0 deletions.
  1. +2 −0 gemrb/core/GameScript/Actions.cpp
@@ -2593,6 +2593,8 @@ void GameScript::ToggleDoor(Scriptable* Sender, Action* /*parameters*/)
actor->SetOrientation( GetOrient( *otherp, actor->Pos ), false);
if (!door->TryUnlock(actor)) {
displaymsg->DisplayConstantString(STR_DOORLOCKED, DMC_LIGHTGREY, door);
+ door->AddTrigger(TriggerEntry(trigger_failedtoopen, actor->GetGlobalID()));
+
//playsound unsuccessful opening of door
if(door->IsOpen())
core->PlaySound(DS_CLOSE_FAIL);

0 comments on commit c7d29ab

Please sign in to comment.