diff options
| author | oroborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e> | 2008-03-25 21:23:08 +0000 |
|---|---|---|
| committer | oroborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e> | 2008-03-25 21:23:08 +0000 |
| commit | ca324c005d511752b2bcdc21fdc7d6c46597469b (patch) | |
| tree | 050b5b836f26390ef44f67a2208fe47c161e8b62 /src/gun.c | |
| parent | 6d43cfd6df88e1b6e94c63f9e8e9eb6775bdbf42 (diff) | |
- drobne upravy v kode
- vymazanie duplivitneho kodu pri "hre s GUI" a "public serverom"
git-svn-id: http://opensvn.csie.org/tuxanci_ng@36 0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e
Diffstat (limited to 'src/gun.c')
| -rw-r--r-- | src/gun.c | 13 |
1 files changed, 5 insertions, 8 deletions
@@ -58,11 +58,8 @@ static void addShotTrivial(tux_t *tux, int x, int y, int px, int py, int gun) { int dest_x = 0, dest_y = 0; int dest_px = 0, dest_py = 0; - arena_t *arena; shot_t *shot; - arena = getWorldArena(); - modificiationCopuse(tux->position, px, py, &dest_px, &dest_py); modificiationCopuse(tux->position, x, y, &dest_x, &dest_y); @@ -81,7 +78,7 @@ static void addShotTrivial(tux_t *tux, int x, int y, int px, int py, int gun) } shot = newShot(tux->x + dest_x, tux->y + dest_y, dest_px, dest_py, gun, tux); - addList( arena->listShot, shot ); + addList( getCurrentArena()->listShot, shot ); } static void addShot(tux_t *tux,int x, int y, int px, int py) @@ -155,7 +152,7 @@ static void timer_addShotTimer(void *p) id = * ((int *)p); free(p); - tux = getTuxID(getWorldArena()->listTux, id); + tux = getTuxID(getCurrentArena()->listTux, id); if( tux == NULL )return; @@ -184,7 +181,7 @@ static void timer_addLaserTimer(void *p) id = * ((int *)p); free(p); - tux = getTuxID(getWorldArena()->listTux, id); + tux = getTuxID(getCurrentArena()->listTux, id); if( tux == NULL )return; @@ -229,9 +226,9 @@ static void putInGunMine(tux_t *tux) break; } - arena = getWorldArena(); + arena = getCurrentArena(); - if( isFreeSpace(x, y, ITEM_MINE_WIDTH, ITEM_MINE_HEIGHT) ) + if( isFreeSpace(getCurrentArena(), x, y, ITEM_MINE_WIDTH, ITEM_MINE_HEIGHT) ) { item_t *item; |