Created
March 9, 2012 21:20
-
-
Save edsrzf/2008760 to your computer and use it in GitHub Desktop.
This file contains 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 ac5cfa9da4c66efecc2864f96ae0c6e9fa677c01 Mon Sep 17 00:00:00 2001 | |
From: Evan Shaw <edsrzf@gmail.com> | |
Date: Sat, 10 Mar 2012 10:18:11 +1300 | |
Subject: [PATCH] Only first selected actor speaks on command | |
Previously all selected actors would speak when given a command, which | |
made for a noisy experience. Now only the first selected actor speaks. | |
Don't call CommandActor on TryToAttack. | |
This is consistent with the original engine. | |
--- | |
gemrb/core/GUI/GameControl.cpp | 6 +++--- | |
1 file changed, 3 insertions(+), 3 deletions(-) | |
diff --git a/gemrb/core/GUI/GameControl.cpp b/gemrb/core/GUI/GameControl.cpp | |
index 5f148bb..b8f76aa 100644 | |
--- a/gemrb/core/GUI/GameControl.cpp | |
+++ b/gemrb/core/GUI/GameControl.cpp | |
@@ -273,7 +273,6 @@ void GameControl::CreateMovement(Actor *actor, const Point &p) | |
} | |
actor->AddAction( action ); | |
- actor->CommandActor(); | |
// force action so that we get target reticles immediately | |
// FIXME | |
actor->ProcessActions(); | |
@@ -1572,7 +1571,6 @@ void GameControl::TryToAttack(Actor *source, Actor *tgt) | |
source->ClearActions(); | |
strncpy(Tmp,"NIDSpecial3()",sizeof(Tmp) ); | |
source->AddAction( GenerateActionDirect( Tmp, tgt) ); | |
- source->CommandActor(); | |
} | |
//generate action code for source actor to try to defend a target | |
@@ -1585,7 +1583,6 @@ void GameControl::TryToDefend(Actor *source, Actor *tgt) | |
source->SetModal(MS_NONE); | |
strncpy(Tmp,"NIDSpecial4()",sizeof(Tmp) ); | |
source->AddAction( GenerateActionDirect( Tmp, tgt) ); | |
- source->CommandActor(); | |
} | |
//generate action code for source actor to try to pick pockets of a target | |
@@ -2112,6 +2109,7 @@ void GameControl::OnMouseUp(unsigned short x, unsigned short y, unsigned short B | |
pc->ClearPath(); | |
pc->ClearActions(); | |
CreateMovement(pc, p); | |
+ pc->CommandActor(); | |
if (DoubleClick) Center(x,y); | |
//p is a searchmap travel region | |
if ( pc->GetCurrentArea()->GetCursor(p) == IE_CURSOR_TRAVEL) { | |
@@ -2160,6 +2158,7 @@ void GameControl::OnMouseUp(unsigned short x, unsigned short y, unsigned short B | |
move = GetFormationPoint(map, i, src, p); | |
CreateMovement(actor, move); | |
} | |
+ core->GetFirstSelectedActor()->CommandActor(); | |
if (DoubleClick) Center(x,y); | |
//p is a searchmap travel region | |
@@ -2306,6 +2305,7 @@ void GameControl::PerformActionOn(Actor *actor) | |
for(i=0;i<game->selected.size();i++) { | |
TryToDefend(game->selected[i], actor); | |
} | |
+ core->GetFirstSelectedActor()->CommandActor(); | |
break; | |
case ACT_THIEVING: | |
if (game->selected.size()==1) { | |
-- | |
1.7.9.3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment