summaryrefslogtreecommitdiff
path: root/src/shot.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/shot.c')
-rw-r--r--src/shot.c160
1 files changed, 0 insertions, 160 deletions
diff --git a/src/shot.c b/src/shot.c
index cb07bda..50e6e9a 100644
--- a/src/shot.c
+++ b/src/shot.c
@@ -353,169 +353,9 @@ void checkShotIsInTuxScreen(arena_t *arena)
thisClient = getClientFromTux(thisTux);
proto_send_shot_server(PROTO_SEND_ONE, thisClient, thisShot);
}
-#if 0
- for( j = 0 ; j <listHelp->count ; j++ )
- {
- thisShot = (shot_t *)listHelp->list[j];
-
- speed = getSppedShot(thisShot);
-
- if( conflictSpace(thisShot->x, thisShot->y, thisShot->w, thisShot->h,
- screen_x-speed, screen_y, speed, WINDOW_SIZE_Y) )
- {
- client_t *thisClient;
- thisClient = getClientFromTux(thisTux);
- proto_send_shot_server(PROTO_SEND_ONE, thisClient, thisShot);
- }
-
- if( conflictSpace(thisShot->x, thisShot->y, thisShot->w, thisShot->h,
- screen_x+WINDOW_SIZE_X, screen_y, speed, WINDOW_SIZE_Y) )
- {
- client_t *thisClient;
- thisClient = getClientFromTux(thisTux);
- proto_send_shot_server(PROTO_SEND_ONE, thisClient, thisShot);
- }
-
- if( conflictSpace(thisShot->x, thisShot->y, thisShot->w, thisShot->h,
- screen_x, screen_y-speed, WINDOW_SIZE_X, speed) )
- {
- client_t *thisClient;
- thisClient = getClientFromTux(thisTux);
- proto_send_shot_server(PROTO_SEND_ONE, thisClient, thisShot);
- }
-
- if( conflictSpace(thisShot->x, thisShot->y, thisShot->w, thisShot->h,
- screen_x, screen_y+WINDOW_SIZE_Y, WINDOW_SIZE_X, speed) )
- {
- client_t *thisClient;
- thisClient = getClientFromTux(thisTux);
- proto_send_shot_server(PROTO_SEND_ONE, thisClient, thisShot);
- }
- }
-#endif
}
}
-/*
-static int getSppedShot(shot_t *shot)
-{
- return ( myAbs(shot->px) > myAbs(shot->py) ? myAbs(shot->px) : myAbs(shot->py) );
-}
-
-void transformOnlyLasser(shot_t *shot)
-{
- switch( shot->position )
- {
- case TUX_RIGHT :
- case TUX_LEFT :
- shot->w = GUN_LASSER_HORIZONTAL;
- shot->h = GUN_SHOT_VERTICAL;
-#ifndef PUBLIC_SERVER
- shot->img = g_shot_lasserX;
-#endif
- break;
- case TUX_UP :
- case TUX_DOWN :
- shot->w = GUN_SHOT_VERTICAL;
- shot->h = GUN_LASSER_HORIZONTAL;
-#ifndef PUBLIC_SERVER
- shot->img = g_shot_lasserY;
-#endif
- break;
- }
-}
-
-static void transformShot(shot_t *shot, int position)
-{
- int speed;
-
- speed = getSppedShot(shot);
-
- switch( position )
- {
- case TUX_UP :
- shot->px = 0;
- shot->py = -speed;
- break;
-
- case TUX_LEFT :
- shot->px = -speed;
- shot->py = 0;
- break;
-
- case TUX_RIGHT :
- shot->px = speed;
- shot->py = 0;
- break;
-
- case TUX_DOWN :
- shot->px = 0;
- shot->py = +speed;
- break;
- }
-
- shot->position = position;
- shot->isCanKillAuthor = TRUE;
-
- if( shot->gun == GUN_LASSER )
- {
- transformOnlyLasser(shot);
- }
-}
-
-void moveShot(shot_t *shot, int position, int src_x, int src_y,
- int dist_x, int dist_y, int dist_w, int dist_h)
-{
- int offset = 0;
-
- switch( shot->position )
- {
- case TUX_UP :
- case TUX_DOWN :
- offset = shot->x - src_x;
- break;
-
- case TUX_RIGHT :
- case TUX_LEFT :
- offset = shot->y - src_y;
- break;
- }
-
- transformShot(shot, position);
-
- switch( shot->position )
- {
- case TUX_UP :
- shot->x = dist_x + offset;
- shot->y = dist_y;
- break;
-
- case TUX_LEFT :
- shot->x = dist_x;
- shot->y = dist_y + offset;
- break;
-
- case TUX_RIGHT :
- shot->x = dist_x + dist_w;
- shot->y = dist_y + offset;
- break;
-
- case TUX_DOWN :
- shot->x = dist_x + offset;
- shot->y = dist_y + dist_h;
- break;
- }
-
- shot->x += shot->px;
- shot->y += shot->py;
-
- if( getNetTypeGame() == NET_GAME_TYPE_SERVER )
- {
- proto_send_shot_server(PROTO_SEND_ALL, NULL, shot);
- }
-
-}
-*/
void destroyShot(shot_t *p)
{
assert( p != NULL );