mirror of
https://github.com/correl/mage.git
synced 2025-04-08 09:11:04 -09:00
Merge pull request #4476 from spjspj/master
Scenario I was testing for this fix:
This commit is contained in:
commit
aebc16dc82
2 changed files with 7 additions and 2 deletions
Mage.Server.Plugins/Mage.Player.Human/src/mage/player/human
Mage/src/main/java/mage/game
|
@ -151,11 +151,13 @@ public class HumanPlayer extends PlayerImpl {
|
||||||
|
|
||||||
protected void waitResponseOpen() {
|
protected void waitResponseOpen() {
|
||||||
// wait response open for answer process
|
// wait response open for answer process
|
||||||
while (!responseOpenedForAnswer && canRespond()) {
|
int numTimesWaiting = 0;
|
||||||
|
while (!responseOpenedForAnswer && canRespond() && numTimesWaiting < 300) {
|
||||||
|
numTimesWaiting ++;
|
||||||
try {
|
try {
|
||||||
Thread.sleep(100);
|
Thread.sleep(100);
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
logger.warn("Response waiting interrapted for " + getId());
|
logger.warn("Response waiting interrupted for " + getId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2452,6 +2452,9 @@ public abstract class GameImpl implements Game, Serializable {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public UUID getPriorityPlayerId() {
|
public UUID getPriorityPlayerId() {
|
||||||
|
if (state.getPriorityPlayerId() == null) {
|
||||||
|
return state.getActivePlayerId();
|
||||||
|
}
|
||||||
return state.getPriorityPlayerId();
|
return state.getPriorityPlayerId();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue