One instance, messed up blittling?

Linux Outdoor Hunter is getting close to be a playable alpha release. But in
this one instance where you shoot at nothing, i belive it cylces threw the loop
and declares the shot dead for not hitting anything. Once that happens, the
site you shoot from becomes a moving image area following the elk I imagne. I
can’t figure out why. I called refresh screen after all drawing, but my images
flicker. I’f i cal it once to restore the background then just DrawObject()
everything else, it works better, but the moving image area happens. Here’s the
code, It’s probably something simple. Thanks for your time!

while ( site.alive ) {

	/* Wait for the next frame */
	WaitFrame();

	/* Poll input queue, run keyboard loop */
	while ( SDL_PollEvent(&event) ) {
		if ( event.type == SDL_QUIT )
			return;
	}
	keys = SDL_GetKeyState(NULL);

	/* Erase everything from the screen */
	for ( i=0; i<MAX_SHOTS; ++i ) {
		if ( shots[i].alive ) {
                             EraseObject(&shots[i]);
                         
		}
	}

	for ( i=0; i<MAX_ELK; ++i ) {
		if ( elk[i].alive ) {
			EraseObject(&elk[i]);
		}
	}
	EraseObject(&site);
	
	
	/* Create new elk */
	
               
		CreateElk();
                 
	       

	/* Create new shots */
	if ( ! reloading ) {
		if ( keys[SDLK_SPACE] == SDL_PRESSED ) {
			for ( i=0; i<MAX_SHOTS; ++i ) {
				if ( ! shots[i].alive ) {
					break;
				}
			}
			if ( i != MAX_SHOTS ) {
				shots[i].x = site.x +
				 (site.image->w-shots[i].image->w)/2;
				shots[i].y = site.y -
				shots[i].image->h;
				shots[i].alive = 1;
				
			}
		}
	}
	reloading = (keys[SDLK_SPACE] == SDL_PRESSED);

	/* Move the site */
	site.facing = 0;
	if ( keys[SDLK_RIGHT] ) {
		++site.facing;
	}
	if ( keys[SDLK_LEFT] ) {
		--site.facing;
	}
	site.x += site.facing*SITE_SPEED;
	if ( site.x < 0 ) {
		site.x = 0;
	} else
	if ( site.x >= (screen->w-site.image->w) ) {
		site.x = (screen->w-site.image->w)-1;
	}

	/* Move the elk */
	for ( i=0; i<MAX_ELK; ++i ) {
		if ( elk[i].alive ) {
			elk[i].x += elk[i].facing*ELK_SPEED;
			if ( elk[i].x < 0 ) {
				elk[i].x = 0;
				elk[i].y += elk[i].image->h;
				elk[i].facing = 1;
			} else
			if ( elk[i].x >=
				   (screen->w-elk[i].image->w) ) {
				elk[i].x =
				   (screen->w-elk[i].image->w)-1;
				elk[i].y += elk[i].image->h;
				elk[i].facing = -1;
			}
		}
	}

	/* Move the shots */
	for ( i=0; i<MAX_SHOTS; ++i ) {
		if ( shots[i].alive ) {
			shots[i].y -= SHOT_SPEED;
			if ( shots[i].y < 420) {
				shots[i].alive = 0;
			}
		}
	}

	/* Detect collisions */
	for ( j=0; j<MAX_SHOTS; ++j ) {
		for ( i=0; i<MAX_ELK; ++i ) {
			if ( shots[j].alive && elk[i].alive &&
				  Collide(&shots[j], &elk[i]) ) {
				elk[i].alive = 0;
				shots[j].alive = 0;
				break;
			}
		}
	}
	

	/* Draw the elk, shots, site, and 

explosions */

        SDL_Rect dst;
	dst.x = 0;
	dst.y = 0;
	dst.w = background->w;
	dst.h = background->h;
	SDL_BlitSurface(background, NULL, screen, &dst);
           	UpdateScreen();

	for ( i=0; i<MAX_ELK; ++i ) {
		if ( elk[i].alive ) {
			DrawObject(&elk[i]);
		}
	}

           for ( i=0; i<MAX_SHOTS; ++i ) {
		if ( shots[i].alive ) {
			DrawObject(&shots[i]);
		}
	}

	
	if ( site.alive ) {
		DrawObject(&site);
	}
	
	
            

      /* Check for keyboard abort */
	if ( keys[SDLK_ESCAPE] == SDL_PRESSED ) {
		site.alive = 0;
	}

}

return;

}