stratagus-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Stratagus-CVS] stratagus/src/unit ccl_unit.c


From: Jimmy Salmon
Subject: [Stratagus-CVS] stratagus/src/unit ccl_unit.c
Date: Sat, 15 Nov 2003 09:50:07 -0500

CVSROOT:        /cvsroot/stratagus
Module name:    stratagus
Branch:         
Changes by:     Jimmy Salmon <address@hidden>   03/11/15 09:50:07

Modified files:
        src/unit       : ccl_unit.c 

Log message:
        Source location for order-unit can be a point

Patches:
Index: stratagus/src/unit/ccl_unit.c
diff -u stratagus/src/unit/ccl_unit.c:1.76 stratagus/src/unit/ccl_unit.c:1.77
--- stratagus/src/unit/ccl_unit.c:1.76  Fri Nov 14 23:48:18 2003
+++ stratagus/src/unit/ccl_unit.c       Sat Nov 15 09:50:06 2003
@@ -26,7 +26,7 @@
 //      Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 //      02111-1307, USA.
 //
-//     $Id: ccl_unit.c,v 1.76 2003/11/15 04:48:18 mr-russ Exp $
+//     $Id: ccl_unit.c,v 1.77 2003/11/15 14:50:06 jsalmon3 Exp $
 
 //@{
 
@@ -994,7 +994,7 @@
     heading = SyncRand() % 256;
     playerno = TriggerGetPlayer(player);
     if (playerno == -1) {
-       printf("CreateUnit: You cannot use 'any in create unit, specify a 
player\n");
+       printf("CreateUnit: You cannot use 'any in create-unit, specify a 
player\n");
        errl("bad player", player);
        return SCM_UNSPECIFIED;
     }
@@ -1035,14 +1035,19 @@
     int j;
     char* order;
 
-    plynr=TriggerGetPlayer(gh_car(list));
+    plynr = TriggerGetPlayer(gh_car(list));
     list = gh_cdr(list);
     unittype = TriggerGetUnitType(gh_car(list));
     list = gh_cdr(list);
     x1 = gh_scm2int(gh_car(gh_car(list)));
     y1 = gh_scm2int(gh_car(gh_cdr(gh_car(list))));
-    x2 = gh_scm2int(gh_car(gh_cdr(gh_cdr(gh_car(list)))));
-    y2 = gh_scm2int(gh_car(gh_cdr(gh_cdr(gh_cdr(gh_car(list))))));
+    if (!gh_null_p(gh_cdr(gh_cdr(gh_car(list))))) {
+       x2 = gh_scm2int(gh_car(gh_cdr(gh_cdr(gh_car(list)))));
+       y2 = gh_scm2int(gh_car(gh_cdr(gh_cdr(gh_cdr(gh_car(list))))));
+    } else {
+       x2 = x1;
+       y2 = y1;
+    }
     list = gh_cdr(list);
     dx1 = gh_scm2int(gh_car(gh_car(list)));
     dy1 = gh_scm2int(gh_car(gh_cdr(gh_car(list))));




reply via email to

[Prev in Thread] Current Thread [Next in Thread]