summaryrefslogtreecommitdiff
path: root/src/shot.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/shot.c')
-rw-r--r--src/shot.c7
1 files changed, 5 insertions, 2 deletions
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--;