Exemple #1
0
//Wyrmgus start
//void MapMarkTileSight(const CPlayer &player, const unsigned int index)
void MapMarkTileSight(const CPlayer &player, const unsigned int index, int z)
//Wyrmgus end
{
	//Wyrmgus start
//	CMapField &mf = *Map.Field(index);
	CMapField &mf = *Map.Field(index, z);
	//Wyrmgus end
	unsigned short *v = &(mf.playerInfo.Visible[player.Index]);
	if (*v == 0 || *v == 1) { // Unexplored or unseen
		// When there is no fog only unexplored tiles are marked.
		if (!Map.NoFogOfWar || *v == 0) {
			//Wyrmgus start
//			UnitsOnTileMarkSeen(player, mf, 0);
			UnitsOnTileMarkSeen(player, mf, 0, 0);
			//Wyrmgus end
		}
		*v = 2;
		if (mf.playerInfo.IsTeamVisible(*ThisPlayer)) {
			//Wyrmgus start
//			Map.MarkSeenTile(mf);
			Map.MarkSeenTile(mf, z);
			//Wyrmgus end
		}
		return;
	}
	Assert(*v != 65535);
	++*v;
}
Exemple #2
0
/**
**  Mark a tile for cloak detection.
**
**  @param player  Player to mark sight.
**  @param index   Tile to mark.
*/
void MapMarkTileDetectCloak(const CPlayer &player, const unsigned int index)
{
	CMapField &mf = *Map.Field(index);
	unsigned char *v = &mf.playerInfo.VisCloak[player.Index];
	if (*v == 0) {
		UnitsOnTileMarkSeen(player, mf, 1);
	}
	Assert(*v != 255);
	++*v;
}
Exemple #3
0
/**
**  Mark a tile for ethereal detection.
**
**  @param player  Player to mark sight.
**  @param index   Tile to mark.
*/
void MapMarkTileDetectEthereal(const CPlayer &player, const unsigned int index, int z)
{
	CMapField &mf = *Map.Field(index, z);
	unsigned char *v = &mf.playerInfo.VisEthereal[player.Index];
	if (*v == 0) {
		UnitsOnTileMarkSeen(player, mf, 0, 1);
	}
	Assert(*v != 255);
	++*v;
}
Exemple #4
0
//Wyrmgus start
//void MapMarkTileDetectCloak(const CPlayer &player, const unsigned int index)
void MapMarkTileDetectCloak(const CPlayer &player, const unsigned int index, int z)
//Wyrmgus end
{
	//Wyrmgus start
//	CMapField &mf = *Map.Field(index);
	CMapField &mf = *Map.Field(index, z);
	//Wyrmgus end
	unsigned char *v = &mf.playerInfo.VisCloak[player.Index];
	if (*v == 0) {
		//Wyrmgus start
//		UnitsOnTileMarkSeen(player, mf, 1);
		UnitsOnTileMarkSeen(player, mf, 1, 0);
		//Wyrmgus end
	}
	Assert(*v != 255);
	++*v;
}