[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Stratagus-CVS] stratagus/src/map map_fog.c
From: |
Jimmy Salmon |
Subject: |
[Stratagus-CVS] stratagus/src/map map_fog.c |
Date: |
Mon, 20 Oct 2003 18:24:56 -0400 |
CVSROOT: /cvsroot/stratagus
Module name: stratagus
Branch:
Changes by: Jimmy Salmon <address@hidden> 03/10/20 18:24:56
Modified files:
src/map : map_fog.c
Log message:
Fixed shared vision
Patches:
Index: stratagus/src/map/map_fog.c
diff -u stratagus/src/map/map_fog.c:1.110 stratagus/src/map/map_fog.c:1.111
--- stratagus/src/map/map_fog.c:1.110 Mon Oct 20 13:56:34 2003
+++ stratagus/src/map/map_fog.c Mon Oct 20 18:24:55 2003
@@ -27,7 +27,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
//
-// $Id: map_fog.c,v 1.110 2003/10/20 17:56:34 jsalmon3 Exp $
+// $Id: map_fog.c,v 1.111 2003/10/20 22:24:55 jsalmon3 Exp $
//@{
@@ -201,11 +201,14 @@
visible = TheMap.Fields[y * TheMap.Width + x].Visible;
visiontype = visible[player->Player];
- if (visiontype != 1) {
+ if (visiontype > 1) {
return visiontype;
}
if (!player->SharedVision) {
- return visiontype + TheMap.NoFogOfWar;
+ if (visiontype) {
+ return visiontype + TheMap.NoFogOfWar;
+ }
+ return 0;
}
for (i = 0; i < PlayerMax ; ++i) {
@@ -214,9 +217,13 @@
if (visible[i] > 1) {
return 2;
}
+ visiontype |= visible[i];
}
}
- return visiontype + TheMap.NoFogOfWar;
+ if (visiontype) {
+ return visiontype + TheMap.NoFogOfWar;
+ }
+ return 0;
}
/**