From: Holger Schemel Date: Wed, 6 Jun 2018 21:07:18 +0000 (+0200) Subject: added support for keys 1 to 4 to select network player in request dialog X-Git-Tag: 4.1.1.0~118 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=9d4635941641ae191aa2fac35e8f89052ca07fa8;p=rocksndiamonds.git added support for keys 1 to 4 to select network player in request dialog --- diff --git a/src/tools.c b/src/tools.c index 24fecfb3..5c259419 100644 --- a/src/tools.c +++ b/src/tools.c @@ -4215,7 +4215,29 @@ static int RequestHandleEvents(unsigned int req_state) } if (req_state & REQ_PLAYER) - result = 0; + { + int old_player_nr = setup.network_player_nr; + + if (result != -1) + result = old_player_nr + 1; + + switch (key) + { + case KSYM_space: + result = old_player_nr + 1; + break; + + case KSYM_1: + case KSYM_2: + case KSYM_3: + case KSYM_4: + result = key - KSYM_1 + 1; + break; + + default: + break; + } + } break; }