diff options
| author | oroborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e> | 2008-03-19 19:32:50 +0000 |
|---|---|---|
| committer | oroborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e> | 2008-03-19 19:32:50 +0000 |
| commit | 01d613a7ccf695090262c9e22c396251146f00bd (patch) | |
| tree | 3f176dd05944d108259f02d968e5b221704fb274 /src/screen_world.c | |
| parent | 11239bc45b51f9cc9eaec8272e58a0dea0e10b93 (diff) | |
- upravy v kode
git-svn-id: http://opensvn.csie.org/tuxanci_ng@27 0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e
Diffstat (limited to 'src/screen_world.c')
| -rw-r--r-- | src/screen_world.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/src/screen_world.c b/src/screen_world.c index 45daee5..60260b9 100644 --- a/src/screen_world.c +++ b/src/screen_world.c @@ -241,7 +241,7 @@ static void netAction(tux_t *tux, int action) { if( getSettingGameType() == NET_GAME_TYPE_SERVER ) { - proto_send_event_server(tux , action, NULL); + proto_send_event_server(PROTO_SEND_ALL, NULL, tux , action); } if( getSettingGameType() == NET_GAME_TYPE_CLIENT ) @@ -290,8 +290,11 @@ static void control_keyboard_right(tux_t *tux) if( mapa[(SDLKey)SDLK_KP1] == SDL_PRESSED ) { - netAction(tux, TUX_SWITCH_GUN); - actionTux(tux, TUX_SWITCH_GUN); + if( tux->isCanSwitchGun == TRUE ) + { + netAction(tux, TUX_SWITCH_GUN); + actionTux(tux, TUX_SWITCH_GUN); + } } } @@ -308,7 +311,15 @@ static void control_keyboard_left(tux_t *tux) if( mapa[(SDLKey)SDLK_a] == SDL_PRESSED )actionTux(tux, TUX_LEFT); if( mapa[(SDLKey)SDLK_s] == SDL_PRESSED )actionTux(tux, TUX_DOWN); if( mapa[(SDLKey)SDLK_q] == SDL_PRESSED )actionTux(tux, TUX_SHOT); - if( mapa[(SDLKey)SDLK_TAB] == SDL_PRESSED )actionTux(tux, TUX_SWITCH_GUN); + + if( mapa[(SDLKey)SDLK_TAB] == SDL_PRESSED ) + { + if( tux->isCanSwitchGun == TRUE ) + { + netAction(tux, TUX_SWITCH_GUN); + actionTux(tux, TUX_SWITCH_GUN); + } + } } static void eventEsc() |