remove unnecessary check

This commit is contained in:
Martin Michelsen
2024-01-24 21:51:37 -08:00
parent 6ac2ceca45
commit 82854604b8
+1 -2
View File
@@ -1275,8 +1275,7 @@ static void on_npc_control(shared_ptr<Client> c, uint8_t command, uint8_t flag,
throw runtime_error("cannot create or modify NPC in the lobby");
}
if ((cmd.command == 0 || cmd.command == 3) &&
((cmd.param2 >= 0) && (cmd.param2 < 4) && l->clients[cmd.param2])) {
if ((cmd.command == 0 || cmd.command == 3) && ((cmd.param2 < 4) && l->clients[cmd.param2])) {
throw runtime_error("cannot create NPC in existing player slot");
}