From 4919e623c6695a80aaf96187253756dcbb72bf87 Mon Sep 17 00:00:00 2001 From: oroborus Date: Sun, 8 Jun 2008 21:43:44 +0000 Subject: - 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 --- src/shot.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/shot.c') diff --git a/src/shot.c b/src/shot.c index f19e99c..2db8424 100644 --- a/src/shot.c +++ b/src/shot.c @@ -269,11 +269,14 @@ void transformOnlyLasser(shot_t *shot) void eventMoveListShot(list_t *listShot) { + arena_t *arena; shot_t *thisShot; int i; assert( listShot != NULL ); + arena = getCurrentArena(); + for( i = 0 ; i < listShot->count ; i++ ) { thisShot = (shot_t *)listShot->list[i]; @@ -298,8 +301,8 @@ void eventMoveListShot(list_t *listShot) } } */ - if( thisShot->x+thisShot->w < 0 || thisShot->x > WINDOW_SIZE_X || - thisShot->y+thisShot->h < 0 || thisShot->y > WINDOW_SIZE_Y ) + if( thisShot->x+thisShot->w < 0 || thisShot->x > arena->w || + thisShot->y+thisShot->h < 0 || thisShot->y > arena->h ) { delListItem(listShot, i, destroyShot); i--; -- cgit v1.2.3