mirror of
https://github.com/correl/mage.git
synced 2024-11-14 19:19:32 +00: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
|
@ -151,11 +151,13 @@ public class HumanPlayer extends PlayerImpl {
|
|||
|
||||
protected void waitResponseOpen() {
|
||||
// wait response open for answer process
|
||||
while (!responseOpenedForAnswer && canRespond()) {
|
||||
int numTimesWaiting = 0;
|
||||
while (!responseOpenedForAnswer && canRespond() && numTimesWaiting < 300) {
|
||||
numTimesWaiting ++;
|
||||
try {
|
||||
Thread.sleep(100);
|
||||
} 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
|
||||
public UUID getPriorityPlayerId() {
|
||||
if (state.getPriorityPlayerId() == null) {
|
||||
return state.getActivePlayerId();
|
||||
}
|
||||
return state.getPriorityPlayerId();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue