[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Stratagus-CVS] stratagus/src/clone unit.c
From: |
Jimmy Salmon |
Subject: |
[Stratagus-CVS] stratagus/src/clone unit.c |
Date: |
Tue, 21 Oct 2003 17:31:41 -0400 |
CVSROOT: /cvsroot/stratagus
Module name: stratagus
Branch:
Changes by: Jimmy Salmon <address@hidden> 03/10/21 17:31:41
Modified files:
src/clone : unit.c
Log message:
Initialize Frame to the first still animation frame
Patches:
Index: stratagus/src/clone/unit.c
diff -u stratagus/src/clone/unit.c:1.312 stratagus/src/clone/unit.c:1.313
--- stratagus/src/clone/unit.c:1.312 Mon Oct 20 21:57:02 2003
+++ stratagus/src/clone/unit.c Tue Oct 21 17:31:41 2003
@@ -26,7 +26,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
//
-// $Id: unit.c,v 1.312 2003/10/21 01:57:02 jsalmon3 Exp $
+// $Id: unit.c,v 1.313 2003/10/21 21:31:41 jsalmon3 Exp $
//@{
@@ -335,6 +335,8 @@
}
}
+ unit->Frame = unit->Type->Animations->Still[0].Frame +
+ (type->Building ? 0 : type->NumDirections / 2 + 1 - 1);
if (!type->Building && type->Sprite &&
VideoGraphicFrames(type->Sprite) > 5) {
unit->Direction = (MyRand() >> 8) & 0xFF; // random heading
@@ -535,6 +537,7 @@
// fancy buildings: mirror buildings (but shadows not correct)
//
if (FancyBuildings && unit->Rs > 50) {
+ // FIXME: doesn't work if Frame is 0
unit->Frame = -unit->Frame;
}
}
@@ -3731,7 +3734,7 @@
int RunStart;
CLprintf(file, "\n;;; -----------------------------------------\n");
- CLprintf(file, ";;; MODULE: units $Id: unit.c,v 1.312 2003/10/21 01:57:02
jsalmon3 Exp $\n\n");
+ CLprintf(file, ";;; MODULE: units $Id: unit.c,v 1.313 2003/10/21 21:31:41
jsalmon3 Exp $\n\n");
//
// Local variables