home *** CD-ROM | disk | FTP | other *** search
- #ifndef lint
- static char sccsid[] = "@(#)fighter.c 1.1 92/05/28 SMI" ;
- /* from fighter.c 1.2 88/10/19 SMI */
- #endif
-
- /*
- * Copyright (c) 1986 by Sun Microsystems, Inc.
- */
-
- /*
- * special routines for driving a fighter (not myself)
- */
-
-
-
- #include <stdio.h>
- #include <sys/time.h>
-
- #include "dstar.h"
- #include "object_types.h"
-
-
- extern new_status() ;
- extern control_object() ;
- static fighter_killed() ;
-
-
- fptr fighter_vector[VECTOR_LENGTH] = {
- new_status, /* new status */
- control_object, /* control */
- fighter_killed, /* when killed */
- NULL, /* when kills */
- } ;
-
-
-
-
-
-
-
-
-
-
-
- static
- fighter_killed(object,victim,killer)
- register Object *object ;
- register Object *victim ;
- register Object *killer ;
- {
- if(victim->status == OBJ_ACTIVE)
- {
- killer->score += SCORE_KILL ;
- victim->score -= SCORE_KILL ;
- }
-
- if(victim == Me)
- {
- victim->status = OBJ_DEAD ;
- victim->flags &= ~(LASER_FLAG) ;
- victim->Delta.x = 0.0 ;
- victim->Delta.y = 0.0 ;
- victim->Delta.z = 0.5 ;
- victim->Pointing = Me->Forward ;
- victim->Speed *= 0.7 ;
- victim->description = BLAST_DESC ;
- special_got_blasted(object) ;
- net_start_message( NULL ) ;
- send_status(Me) ;
- }
-
- special_someone_got_blasted(object,victim) ;
- }
-