home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / alt / sources / 2611 / control_robot.c < prev    next >
Encoding:
C/C++ Source or Header  |  1992-11-23  |  616 b   |  44 lines

  1. #ifndef lint
  2. static    char    sccsid[] = "@(#)control_robot.c 1.1 92/05/28 SMI" ;
  3.     /* from control_robot.c 1.2 88/10/19 SMI */
  4. #endif
  5.  
  6. /*
  7.  * this file contains specific control stuff:
  8.  *
  9.  * control_ship()
  10.  *    read control inputs and act accordingly
  11.  *
  12.  */
  13.  
  14.  
  15. #include <stdio.h>
  16. #include <math.h>
  17. #include "dstar.h"
  18. #include "object_types.h"
  19.  
  20.  
  21.  
  22. extern    int    debug_level ;
  23.  
  24.  
  25.  
  26.  
  27. /****
  28.  *
  29.  * read control inputs, update ship's position/velocity/"up" vectors
  30.  *
  31.  ****/
  32.  
  33.  
  34. control_ship()
  35. {
  36.      
  37.     if(!auto_pilot)
  38.       adjust_vector(Me, &Me->Delta) ;
  39.     else
  40.       auto_control(Me, AUTO_RANGE, MAX_TURN, MAX_SLEW) ;
  41.  
  42.     adjust_vectors(Me) ;
  43. }
  44.