[comp.sources.d] play.c> and a fix

erict@flatline.UUCP (j eric townsend) (06/14/88)

Ok, this compiled, but I haven't got to the link stage, so...

In play.c around line 930 or so...:

		/* put torpedo into the universe */
		pcrft->cr_dir[0] = 1.0;
		sptort(pcrft->cr_dir,tmpvec);
		for (i=0;i<3;++i) {
	    *       ptorp->tp_pstn[i] = ADD(pcrft->cr_pstn[i],
	    *       ptorp->tp_thr[i]=MUL(tmpvec[i],50.));
		    ptorp->tp_vel[i] = ADD(pcrft->cr_vel[i],MUL(tmpvec[i],10.));
		}
		etc.etc.

The *'d lines cause a compiler error, of course.  I'm not sure what
the author wanted to do, so I replaced the two *'d lines with:

	   ptorp->tp_pstn[i]=ADD(pcrft->cr_pstn[i],MUL(tmpvec[i],50.));

I know that this ignores ptorp->tp_thr[i].  Maybe it doesn't matter? :-)

What did you do to fix this?
-- 
Skate UNIX or go home, boogie boy...
Spelling errors are directly related to how little time I have...
J. Eric Townsend ->uunet!nuchat!flatline!erict smail:511Parker#2,Hstn,Tx,77007
             ..!bellcore!tness1!/