From 900568f374a7b1b6bce3e57ff75c4950b0ef4dc7 Mon Sep 17 00:00:00 2001
From: cade <>
Date: Sun, 25 Jun 2000 23:39:20 +0000
Subject: [PATCH] *** empty log message ***

---
 src/stratagus/spells.cpp | 16 ++++++++--------
 src/unit/unit.cpp        |  4 ++++
 2 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/src/stratagus/spells.cpp b/src/stratagus/spells.cpp
index 640c2672f..ecfd5141b 100644
--- a/src/stratagus/spells.cpp
+++ b/src/stratagus/spells.cpp
@@ -254,8 +254,8 @@ global int SpellWhirlwindController( void* missile )
     do
       {
       // find new destination in the map
-      nx = x  +  rand() % 5 - 2;
-      ny = y  +  rand() % 5 - 2;
+      nx = x  +  SyncRand() % 5 - 2;
+      ny = y  +  SyncRand() % 5 - 2;
       }
     while(  nx < 0 && ny < 0 && nx >= TheMap.Width && ny >= TheMap.Height );
     mis->X = mis->DX;
@@ -580,12 +580,12 @@ global int SpellCast( int SpellId, Unit* unit, Unit* target, int x, int y )
 	   do
 	     {
 	     // find new destination in the map
-	     dx = x  +  rand() % 5 - 2;
-	     dy = y  +  rand() % 5 - 2;
+	     dx = x  +  SyncRand() % 5 - 2;
+	     dy = y  +  SyncRand() % 5 - 2;
 	     }
 	   while(  dx < 0 && dy < 0 && dx >= TheMap.Width && dy >= TheMap.Height );
-           sx = dx - 1 - rand() % 4;
-	   sy = dy - 1 - rand() % 4;
+           sx = dx - 1 - SyncRand() % 4;
+	   sy = dy - 1 - SyncRand() % 4;
  	 
 	   PlayGameSound(SoundIdForName(spell->SoundIdent),MaxSampleVolume); \
 	   mis = MakeMissile( MissileTypeByIdent( "missile-blizzard" ), 
@@ -756,8 +756,8 @@ global int SpellCast( int SpellId, Unit* unit, Unit* target, int x, int y )
 	   do
 	     {
 	     // find new destination in the map
-	     dx = x  +  rand() % 5 - 2;
-	     dy = y  +  rand() % 5 - 2;
+	     dx = x  +  SyncRand() % 5 - 2;
+	     dy = y  +  SyncRand() % 5 - 2;
 	     }
 	   while(  dx < 0 && dy < 0 && dx >= TheMap.Width && dy >= TheMap.Height );
  	 
diff --git a/src/unit/unit.cpp b/src/unit/unit.cpp
index 6112576cd..12f5fb0fa 100644
--- a/src/unit/unit.cpp
+++ b/src/unit/unit.cpp
@@ -2556,6 +2556,10 @@ local void SaveCommand(const Command* command,FILE* file)
 	    fprintf(file,"'demolish");
 	    fprintf(file," \"FIXME:\"");
 	    break;
+	case UnitActionSpellCast:
+	    fprintf(file,"'spell-cast");
+	    fprintf(file," \"FIXME:\"");
+	    break;
     }
     fprintf(file,")\n");
 }