diff options
| author | oroborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e> | 2008-07-01 17:53:41 +0000 |
|---|---|---|
| committer | oroborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e> | 2008-07-01 17:53:41 +0000 |
| commit | 38b98c9ecd0c300d40ae6db05ab9dc2b9189df8d (patch) | |
| tree | 2c13c890e75f95c778f4ed8c9933a3852cac2907 /src/screen/screen_world.c | |
| parent | 62cdf2b04aa8d0162da8e024d9901ba5743bf5e3 (diff) | |
- 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
Diffstat (limited to 'src/screen/screen_world.c')
| -rw-r--r-- | src/screen/screen_world.c | 26 |
1 files changed, 13 insertions, 13 deletions
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 ) |