File:  [Research Unix] / researchv10no / games / trek / rest.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:21:35 2018 UTC (8 years, 1 month ago) by root
Branches: belllabs, MAIN
CVS tags: researchv10, HEAD
researchv10 Norman

# include	"trek.h"

/**
 **	rest for repairs
 **/

rest()
{
	float			t;
	register int		percent;

	if(getfltpar("How long", &t)==0) return;
	if (t <= 0.0)
		return;
	percent = 100 * t / Status.time + 0.5;
	if (percent >= 70)
	{
		printf("Spock: That would take %d%% of our remaining time.\n",
			percent);
		if (!getynpar("Are you sure that is wise"))
			return;
	}
	Move.delta = t;
	t = Etc.eventptr[E_LRTB]->date - Status.date;
	if (Status.cond != DOCKED && Move.delta > t)
		Move.delta = t + 0.0001;
	Move.free = 0;
	Move.resting = 1;
}

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.