From 38b98c9ecd0c300d40ae6db05ab9dc2b9189df8d Mon Sep 17 00:00:00 2001 From: oroborus Date: Tue, 1 Jul 2008 17:53:41 +0000 Subject: - oprava chyby pri teleportacii lasserov - skutocne opravena chybya s neinicializovany audiom, a strielanim pri chodeni - ZeXxove patche pre spojenie s master serverom - client zobrazuje hlasku ak sa nepodarilo spojit zo serverom alebo sppojenie nasilne ukoncilo git-svn-id: http://opensvn.csie.org/tuxanci_ng@81 0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e --- src/screen/screen_world.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'src/screen/screen_world.c') diff --git a/src/screen/screen_world.c b/src/screen/screen_world.c index 296c31f..3c656f5 100644 --- a/src/screen/screen_world.c +++ b/src/screen/screen_world.c @@ -230,6 +230,13 @@ static void control_keyboard_right(tux_t *tux) if( mapa[(SDLKey)getKey(KEY_TUX_RIGHT_MOVE_LEFT)] == SDL_PRESSED )countKey++; if( mapa[(SDLKey)getKey(KEY_TUX_RIGHT_MOVE_DOWN)] == SDL_PRESSED )countKey++; + if( mapa[(SDLKey)getKey(KEY_TUX_RIGHT_SHOOT)] == SDL_PRESSED && tux->isCanShot == TRUE ) + { + netAction(tux, TUX_SHOT); + actionTux(tux, TUX_SHOT); + return; + } + if( mapa[(SDLKey)getKey(KEY_TUX_RIGHT_MOVE_UP)] == SDL_PRESSED ) { if(countKey > 1 && lastKey == getKey(KEY_TUX_RIGHT_MOVE_UP) )goto tuUp; @@ -279,13 +286,6 @@ static void control_keyboard_right(tux_t *tux) tuDown:; } - if( mapa[(SDLKey)getKey(KEY_TUX_RIGHT_SHOOT)] == SDL_PRESSED && tux->isCanShot == TRUE ) - { - netAction(tux, TUX_SHOT); - actionTux(tux, TUX_SHOT); - return; - } - if( mapa[(SDLKey)getKey(KEY_TUX_RIGHT_SWITCH_WEAPON)] == SDL_PRESSED ) { if( tux->isCanSwitchGun == TRUE ) @@ -314,6 +314,12 @@ static void control_keyboard_left(tux_t *tux) if( mapa[(SDLKey)getKey(KEY_TUX_LEFT_MOVE_LEFT)] == SDL_PRESSED )countKey++; if( mapa[(SDLKey)getKey(KEY_TUX_LEFT_MOVE_DOWN)] == SDL_PRESSED )countKey++; + if( mapa[(SDLKey)getKey(KEY_TUX_LEFT_SHOOT)] == SDL_PRESSED && tux->isCanShot == TRUE ) + { + actionTux(tux, TUX_SHOT); + return; + } + if( mapa[(SDLKey)getKey(KEY_TUX_LEFT_MOVE_UP)] == SDL_PRESSED ) { if(countKey > 1 && lastKey == getKey(KEY_TUX_LEFT_MOVE_UP) )goto tuUp; @@ -359,12 +365,6 @@ static void control_keyboard_left(tux_t *tux) tuDown:; } - if( mapa[(SDLKey)getKey(KEY_TUX_LEFT_SHOOT)] == SDL_PRESSED && tux->isCanShot == TRUE ) - { - actionTux(tux, TUX_SHOT); - return; - } - if( mapa[(SDLKey)getKey(KEY_TUX_LEFT_SWITCH_WEAPON)] == SDL_PRESSED ) { if( tux->isCanSwitchGun == TRUE ) -- cgit v1.2.3