Skip to content

Commit

Permalink
Merge pull request diasurgical#2 from Songoo7/multiplayerPauseSupport
Browse files Browse the repository at this point in the history
Multiplayer pause support
  • Loading branch information
Songoo7 authored Feb 1, 2024
2 parents ef7a313 + e370503 commit 3c8164d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
11 changes: 6 additions & 5 deletions Source/diablo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1460,7 +1460,6 @@ void GameLogic()
ProcessMissiles();
}

//removethis
if (BattlePauseMode != 2) {
gGameLogicStep = GameLogicStep::None;

Expand Down Expand Up @@ -2710,10 +2709,12 @@ void diablo_pause_game()

void diablo_battle_pause_game()
{
if (BattlePauseMode != 0) {
BattlePauseMode = 0;
} else {
BattlePauseMode = 2;
if (!gbIsMultiplayer) {
if (BattlePauseMode != 0) {
BattlePauseMode = 0;
} else {
BattlePauseMode = 2;
}
}
}

Expand Down
12 changes: 12 additions & 0 deletions Source/plrmsg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,18 @@ void SendPlrMsg(Player &player, std::string_view text)
message.text = from + std::string(text);
message.prefixLength = from.size();
message.lineHeight = GetLineHeight(message.text, GameFont12) + 3;

// Check for specific messages and update BattlePauseMode accordingly
if (text == "I need help! Come here!") {
message.text = from + std::string("Pause, do commands");
BattlePauseMode = 2;
} else if (text == "Follow me.") {
message.text = from + std::string("Play");
BattlePauseMode = 0;
} else {
message.text = from + std::string(text);
}

AddMessageToChatLog(text, &player);
}

Expand Down

0 comments on commit 3c8164d

Please sign in to comment.