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