Merge remote-tracking branch 'origin/master'

This commit is contained in:
Sebastian Lenzlinger 2022-04-21 08:22:12 +02:00
commit cee9f136c6
2 changed files with 11 additions and 4 deletions

View File

@ -104,7 +104,11 @@ public class ServerGameInfoHandler {
*/
public static void ghostNpcParser(GhostNPC npc, String msg, Game game) {
switch (msg) {
case ClientGameInfoHandler.noiseNotification:
case ClientGameInfoHandler.noiseNotification + 1 + " time(s)":
case ClientGameInfoHandler.noiseNotification + 2 + " time(s)":
case ClientGameInfoHandler.noiseNotification + 3 + " time(s)":
case ClientGameInfoHandler.noiseNotification + 4 + " time(s)":
case ClientGameInfoHandler.noiseNotification + 5 + " time(s)":
String outMsg = npc.getName() + ": " + noiseRandomizer();
game.getLobby().getAdmin().broadcastNpcChatMessageToLobby(outMsg);
break;
@ -122,9 +126,12 @@ public class ServerGameInfoHandler {
*/
public static void humanNpcParser(HumanNPC npc, String msg, Game game) {
switch (msg) {
case ClientGameInfoHandler.noiseNotification:
case ClientGameInfoHandler.noiseNotification + 1 + " time(s)":
case ClientGameInfoHandler.noiseNotification + 2 + " time(s)":
case ClientGameInfoHandler.noiseNotification + 3 + " time(s)":
case ClientGameInfoHandler.noiseNotification + 4 + " time(s)":
case ClientGameInfoHandler.noiseNotification + 5 + " time(s)":
String outMsg = npc.getName() + ": " + noiseRandomizer();
;
game.getLobby().getAdmin().broadcastNpcChatMessageToLobby(outMsg);
break;
case ClientGameInfoHandler.humanVoteRequest:

View File

@ -101,7 +101,7 @@ public class VoteHandler {
}
}
for (int i = 0; i < passengers.length; i++) {
if (!passengers[i].getIsGhost() && noiseAmount[i] != 0) { // passenger is human and someone walked by him
if (noiseAmount[i] != 0) { // someone walked by this player
passengers[i].send(ClientGameInfoHandler.noiseNotification + noiseAmount[i] + " time(s)", game);
}
}