Changeset - r21361:216581a1db53
[Not reviewed]
master
0 4 0
planetmaker - 10 years ago 2014-04-12 15:59:56
planetmaker@openttd.org
(svn r26458) -Doc: Correct a few spelling mistakes (__ln__)
4 files changed with 4 insertions and 4 deletions:
0 comments (0 inline, 0 general)
config.lib
Show inline comments
 
@@ -841,49 +841,49 @@ check_params() {
 
	detect_icu
 
	detect_pspconfig
 
	detect_libtimidity
 

	
 
	if [ "$with_direct_music" != "0" ]; then
 
		if [ "$os" != "MINGW" ] && [ "$os" != "CYGWIN" ]; then
 
			if [ "$with_direct_music" != "1" ]; then
 
				log 1 "configure: error: direct-music is only supported on Win32 targets"
 
				exit 1
 
			fi
 
			with_direct_music="0"
 

	
 
			log 1 "checking direct-music... not Windows, skipping"
 
		else
 
			check_direct_music
 
		fi
 
	fi
 

	
 
	detect_sort
 

	
 
	if [ "$os" = "OSX" ] && [ "$endian" = "AUTO" ]; then
 
		endian="PREPROCESSOR"
 
	fi
 

	
 
	log 1 "checking endianess... $endian"
 
	log 1 "checking endianness... $endian"
 

	
 
	# Suppress language errors when there is a version defined, indicating a release
 
	#  It just isn't pretty if any release produces warnings in the languages.
 
	if [ -f "$ROOT_DIR/version" ]; then
 
		lang_suppress="yes"
 
		log 1 "suppress language errors... yes"
 
	else
 
		lang_suppress=""
 
		log 1 "suppress language errors... no"
 
	fi
 

	
 
	if [ "$enable_debug" = "0" ] && [ "$enable_profiling" = "0" ] && [ "$enable_strip" != "0" ]; then
 
		if [ "$os" = "MORPHOS" ]; then
 
			strip_arg="--strip-all --strip-unneeded --remove-section .comment"
 
		elif [ "$os" = "OSX" ]; then
 
			strip_arg=""
 
		elif [ "$os" = "OS2" ]; then
 
			strip_arg=""
 
			# OS2 uses strip via gcc, because it needs to be feed to emxbind
 
			LDFLAGS="$LDFLAGS -s"
 
		elif [ "$os" = "SUNOS" ]; then
 
			# The GNU strip does know -s, the non-GNU doesn't
 
			#  So try to detect it (in a bit of an ugly way)
 
			strip_arg="`$strip -s strip.test 2>/dev/null && echo \"-s\"`"
docs/desync.txt
Show inline comments
 
@@ -85,49 +85,49 @@ 1.2) What is a Desync and how is it dete
 
  occurs. The desync client will continue to simulate the gamestate
 
  and execute commands from the server. Once the gamestate differs
 
  it will increasingly spiral out of control: If a vehicle picks a
 
  different route, it will arrive at a different time at a station,
 
  which will load different cargo, which causes other vehicles to
 
  load other stuff, which causes industries to notice different
 
  servicing, which causes industries to change production, ...
 
  the client could run all day in a different universe.
 

	
 
  To limit how long a Desync can remain unnoticed, the server
 
  transfers some checksums every now and then for the gamestate.
 
  Currently this checksum is the state of the random number
 
  generator of the game logic. A lot of things in OpenTTD depend
 
  on the RNG, and if the gamestate differs, it is likely that the
 
  RNG is called at different times, and the state differs when
 
  checked.
 

	
 
  The clients compare this 'checksum' with the checksum of their
 
  own gamestate at the specific network frame. If they differ,
 
  the client disconnects with a Desync error.
 

	
 
  The important thing here is: The detection of the Desync is
 
  only an ultimate failure detection. It does not give any
 
  indication on when the Desync happened. The Desync may after
 
  all have occured long ago, and just did not affect the checksum
 
  all have occurred long ago, and just did not affect the checksum
 
  up to now. The checksum may have matched 10 times or more
 
  since the Desync happend, and only now the Desync has spiraled
 
  enough to finally affect the checksum. (There was once a desync
 
  which was only noticed by the checksum after 20 game years.)
 

	
 
1.3) Typical causes of Desyncs
 
---- -------------------------
 
  Desyncs can be caused by the following scenarios:
 
   - The savegame does not describe the complete gamestate.
 
      - Some information which affects the progression of the
 
        gamestate is not saved in the savegame.
 
      - Some information which affects the progression of the
 
        gamestate is not loaded from the savegame.
 
        This includes the case that something is not completely
 
        reset before loading the savegame, so data from the
 
        previous game is carried over to the new one.
 
   - The gamestate does not behave deterministic.
 
      - Cache mismatch: The game logic depends on some cached
 
        values, which are not invalidated properly. This is
 
        the usual case for NewGRF-specific Desyncs.
 
      - Undefined behaviour: The game logic performs multiple
 
        things in an undefined order or with an undefined
 
        result. E.g. when sorting something with a key while
 
        some keys are equal. Or some computation that depends
src/newgrf.cpp
Show inline comments
 
@@ -7638,49 +7638,49 @@ static bool HandleParameterInfo(ByteRead
 
AllowedSubtags _tags_info[] = {
 
	AllowedSubtags('NAME', ChangeGRFName),
 
	AllowedSubtags('DESC', ChangeGRFDescription),
 
	AllowedSubtags('URL_', ChangeGRFURL),
 
	AllowedSubtags('NPAR', ChangeGRFNumUsedParams),
 
	AllowedSubtags('PALS', ChangeGRFPalette),
 
	AllowedSubtags('BLTR', ChangeGRFBlitter),
 
	AllowedSubtags('VRSN', ChangeGRFVersion),
 
	AllowedSubtags('MINV', ChangeGRFMinVersion),
 
	AllowedSubtags('PARA', HandleParameterInfo),
 
	AllowedSubtags()
 
};
 

	
 
/** Action14 root tags */
 
AllowedSubtags _tags_root[] = {
 
	AllowedSubtags('INFO', _tags_info),
 
	AllowedSubtags()
 
};
 

	
 

	
 
/**
 
 * Try to skip the current node and all subnodes (if it's a branch node).
 
 * @param buf Buffer.
 
 * @param type The node type to skip.
 
 * @return True if we could skip the node, false if an error occured.
 
 * @return True if we could skip the node, false if an error occurred.
 
 */
 
static bool SkipUnknownInfo(ByteReader *buf, byte type)
 
{
 
	/* type and id are already read */
 
	switch (type) {
 
		case 'C': {
 
			byte new_type = buf->ReadByte();
 
			while (new_type != 0) {
 
				buf->ReadDWord(); // skip the id
 
				if (!SkipUnknownInfo(buf, new_type)) return false;
 
				new_type = buf->ReadByte();
 
			}
 
			break;
 
		}
 

	
 
		case 'T':
 
			buf->ReadByte(); // lang
 
			buf->ReadString(); // actual text
 
			break;
 

	
 
		case 'B': {
 
			uint16 size = buf->ReadWord();
 
			buf->Skip(size);
 
			break;
src/station_cmd.cpp
Show inline comments
 
@@ -637,49 +637,49 @@ static void UpdateStationSignCoord(BaseS
 
	const StationRect *r = &st->rect;
 

	
 
	if (r->IsEmpty()) return; // no tiles belong to this station
 

	
 
	/* clamp sign coord to be inside the station rect */
 
	st->xy = TileXY(ClampU(TileX(st->xy), r->left, r->right), ClampU(TileY(st->xy), r->top, r->bottom));
 
	st->UpdateVirtCoord();
 

	
 
	if (!Station::IsExpected(st)) return;
 
	Station *full_station = Station::From(st);
 
	for (CargoID c = 0; c < NUM_CARGO; ++c) {
 
		LinkGraphID lg = full_station->goods[c].link_graph;
 
		if (!LinkGraph::IsValidID(lg)) continue;
 
		LinkGraph::Get(lg)->UpdateDistances(full_station->goods[c].node, st->xy);
 
	}
 
}
 

	
 
/**
 
 * Common part of building various station parts and possibly attaching them to an existing one.
 
 * @param [in,out] st Station to attach to
 
 * @param flags Command flags
 
 * @param reuse Whether to try to reuse a deleted station (gray sign) if possible
 
 * @param area Area occupied by the new part
 
 * @param name_class Station naming class to use to generate the new station's name
 
 * @return Command error that occured, if any
 
 * @return Command error that occurred, if any
 
 */
 
static CommandCost BuildStationPart(Station **st, DoCommandFlag flags, bool reuse, TileArea area, StationNaming name_class)
 
{
 
	/* Find a deleted station close to us */
 
	if (*st == NULL && reuse) *st = GetClosestDeletedStation(area.tile);
 

	
 
	if (*st != NULL) {
 
		if ((*st)->owner != _current_company) {
 
			return_cmd_error(STR_ERROR_TOO_CLOSE_TO_ANOTHER_STATION);
 
		}
 

	
 
		CommandCost ret = (*st)->rect.BeforeAddRect(area.tile, area.w, area.h, StationRect::ADD_TEST);
 
		if (ret.Failed()) return ret;
 
	} else {
 
		/* allocate and initialize new station */
 
		if (!Station::CanAllocateItem()) return_cmd_error(STR_ERROR_TOO_MANY_STATIONS_LOADING);
 

	
 
		if (flags & DC_EXEC) {
 
			*st = new Station(area.tile);
 

	
 
			(*st)->town = ClosestTownFromTile(area.tile, UINT_MAX);
 
			(*st)->string_id = GenerateStationName(*st, area.tile, name_class);
 

	
 
			if (Company::IsValidID(_current_company)) {
0 comments (0 inline, 0 general)