Vanilla Development Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CVS update: Vanilla/robots



Date:	Monday July 12, 1999 @ 19:20
Author:	unbelver

Update of /home/netrek/cvsroot/Vanilla/robots
In directory cvs.castle.real-time.com:/var/tmp/cvs-serv11595

Modified Files:
	puckmove.c 
Log Message:

Covered a loophole found by xyzzy where the puck didn't bounce off the
sides/back of the goal, but went through.

--Carlos V.




****************************************

Index: Vanilla/robots/puckmove.c
diff -u Vanilla/robots/puckmove.c:1.2 Vanilla/robots/puckmove.c:1.3
--- Vanilla/robots/puckmove.c:1.2	Fri Apr 30 15:19:07 1999
+++ Vanilla/robots/puckmove.c	Mon Jul 12 19:20:26 1999
@@ -416,13 +416,13 @@
 
     if (((me->p_y > ORI_G) && (me->p_y < ORI_E)) ||
 	((me->p_y < KLI_G) && (me->p_y > KLI_E))) {
-	if ((me->p_x < G_RGT) && (lastx > G_RGT)) {
+	if ((me->p_x <= G_RGT) && (lastx >= G_RGT)) {
 	    if (me->p_speed > 0)
 		messAll(anncer->p_no,roboname,"Boing!  Off right side of goal.");
 	    me->p_x = G_RGT + (G_RGT - me->p_x);
 	    me->p_dir = me->p_desdir = 64 - (me->p_dir - 192);
 	    shotby = -2;
-	} else if ((me->p_x > G_LFT) && (lastx < G_LFT)) {
+	} else if ((me->p_x >= G_LFT) && (lastx <= G_LFT)) {
 	    if (me->p_speed > 0)
 		messAll(anncer->p_no,roboname,"Boing!  Off left side of goal.");
 	    me->p_x = G_LFT - (me->p_x - G_LFT);
@@ -431,7 +431,7 @@
 	}
     }
     if ((me->p_x > G_LFT) && (me->p_x < G_RGT)) {
-	if ((me->p_y > KLI_E) && (lasty < KLI_E)) {
+	if ((me->p_y >= KLI_E) && (lasty <= KLI_E)) {
 	    if (me->p_speed > 0)
 		messAll(anncer->p_no,roboname,"Boing!  Off back of Kli goal.");
 	    me->p_dir = me->p_desdir = 0 - (me->p_dir - 128);