|
|
1.1 ! root 1: #ifndef lint ! 2: static char sccsid[] = "@(#)setwarp.c 4.2 (Berkeley) 5/27/83"; ! 3: #endif not lint ! 4: ! 5: # include "trek.h" ! 6: # include "getpar.h" ! 7: ! 8: /* ! 9: ** SET WARP FACTOR ! 10: ** ! 11: ** The warp factor is set for future move commands. It is ! 12: ** checked for consistancy. ! 13: */ ! 14: ! 15: setwarp() ! 16: { ! 17: double warpfac; ! 18: ! 19: warpfac = getfltpar("Warp factor"); ! 20: if (warpfac < 0.0) ! 21: return; ! 22: if (warpfac < 1.0) ! 23: return (printf("Minimum warp speed is 1.0\n")); ! 24: if (warpfac > 10.0) ! 25: return (printf("Maximum speed is warp 10.0\n")); ! 26: if (warpfac > 6.0) ! 27: printf("Damage to warp engines may occur above warp 6.0\n"); ! 28: Ship.warp = warpfac; ! 29: Ship.warp2 = Ship.warp * warpfac; ! 30: Ship.warp3 = Ship.warp2 * warpfac; ! 31: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.