value instead of var reference to `bmove'
[unix-history] / usr / src / games / trek / setwarp.c
CommitLineData
6ce8f7c1 1#ifndef lint
06d69904 2static char sccsid[] = "@(#)setwarp.c 4.2 (Berkeley) %G%";
6ce8f7c1
KM
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
15setwarp()
16{
06d69904 17 double warpfac;
6ce8f7c1
KM
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}