diff options
| author | oroborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e> | 2008-06-08 21:43:44 +0000 |
|---|---|---|
| committer | oroborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e> | 2008-06-08 21:43:44 +0000 |
| commit | 4919e623c6695a80aaf96187253756dcbb72bf87 (patch) | |
| tree | 948fbcc211b1a8f13e3830853edef6505234bab2 /src/screen_world.c | |
| parent | a8110d0786e7931715a0d7116ed7d4c23697bdb6 (diff) | |
- kod bol prepisany tak aby dokazal pracovat aj s arenami vascimi ako je obrazovka okna
( ako pozadie na arenu sa da pouzit aj tepeta aj textura )
git-svn-id: http://opensvn.csie.org/tuxanci_ng@62 0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e
Diffstat (limited to 'src/screen_world.c')
| -rw-r--r-- | src/screen_world.c | 41 |
1 files changed, 22 insertions, 19 deletions
diff --git a/src/screen_world.c b/src/screen_world.c index 4f1e8d8..de2d591 100644 --- a/src/screen_world.c +++ b/src/screen_world.c @@ -110,24 +110,6 @@ void countRoundInc() } } -static tux_t* getControlTux(int control_type) -{ - tux_t *thisTux; - int i; - - for( i = 0 ; i < arena->listTux->count ; i++ ) - { - thisTux = (tux_t *)(arena->listTux->list[i]); - - if( thisTux->control == control_type ) - { - return thisTux; - } - } - - return NULL; -} - void prepareArena() { tux_t *tux; @@ -201,7 +183,7 @@ static void netAction(tux_t *tux, int action) { if( getSettingGameType() == NET_GAME_TYPE_SERVER ) { - proto_send_event_server(PROTO_SEND_ALL, NULL, tux , action); + proto_send_event_server(PROTO_SEND_ALL_SEES_TUX, NULL, tux , action); } if( getSettingGameType() == NET_GAME_TYPE_CLIENT ) @@ -409,6 +391,27 @@ static void eventEnd() } } +tux_t* getControlTux(int control_type) +{ + arena_t *arena; + tux_t *thisTux; + int i; + + arena = getCurrentArena(); + + for( i = 0 ; i < arena->listTux->count ; i++ ) + { + thisTux = (tux_t *)(arena->listTux->list[i]); + + if( thisTux->control == control_type ) + { + return thisTux; + } + } + + return NULL; +} + void tuxControl(tux_t *p) { assert( p != NULL ); |