Skip to content

Commit

Permalink
KOTOR: Separate character selection and exit script
Browse files Browse the repository at this point in the history
  • Loading branch information
Nostritius committed Sep 13, 2018
1 parent 8182ecc commit 467c1e5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
4 changes: 1 addition & 3 deletions src/engines/kotor/module.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -799,7 +799,7 @@ void Module::switchPlayerCharacter(int npc) {
}
}

void Module::showPartySelectionGUI(const Common::UString &exitScript, int forceNPC1, int forceNPC2) {
void Module::showPartySelectionGUI(int forceNPC1, int forceNPC2) {
if (_inDialog)
_dialog->hide();
else
Expand Down Expand Up @@ -846,8 +846,6 @@ void Module::showPartySelectionGUI(const Common::UString &exitScript, int forceN

if (npc1 != -1)
addToParty(new Creature(_availableParty[npc1]));

runScript(exitScript);
}

void Module::addAvailablePartyMember(int slot, const Common::UString &templ) {
Expand Down
2 changes: 1 addition & 1 deletion src/engines/kotor/module.h
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ class Module : public KotOR::Object, public KotOR::ObjectContainer {
/** Switch the player character. */
void switchPlayerCharacter(int npc);
/** Show the party selection GUI. */
void showPartySelectionGUI(const Common::UString &exitScript, int forceNPC1 = -1, int forceNPC2 = -1);
void showPartySelectionGUI(int forceNPC1, int forceNPC2);
/** Add available party member by template. */
void addAvailablePartyMember(int slot, const Common::UString &templ);
/** Check if there is a party member available for this id. */
Expand Down
3 changes: 2 additions & 1 deletion src/engines/kotor/script/functions_party.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ void Functions::showPartySelectionGUI(Aurora::NWScript::FunctionContext &ctx) {
int forceNPC1 = ctx.getParams()[1].getInt();
int forceNPC2 = ctx.getParams()[2].getInt();

_game->getModule().showPartySelectionGUI(exitScript, forceNPC1, forceNPC2);
_game->getModule().showPartySelectionGUI(forceNPC1, forceNPC2);
ScriptContainer::runScript(exitScript, ctx.getCaller(), ctx.getTriggerer());
}

void Functions::isAvailableCreature(Aurora::NWScript::FunctionContext &ctx) {
Expand Down

0 comments on commit 467c1e5

Please sign in to comment.