Changeset - r21228:ac79e2c078e8
[Not reviewed]
master
0 1 0
frosch - 10 years ago 2014-02-07 22:55:33
frosch@openttd.org
(svn r26316) -Feature [FS#5696]: Extend object variable 0x60 to also return the view.
1 file changed with 3 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/newgrf_object.cpp
Show inline comments
 
@@ -158,7 +158,8 @@ static uint32 GetObjectIDAtOffset(TileIn
 
		return 0xFFFF;
 
	}
 

	
 
	const ObjectSpec *spec = ObjectSpec::GetByTile(tile);
 
	const Object *o = Object::GetByTile(tile);
 
	const ObjectSpec *spec = ObjectSpec::Get(o->type);
 

	
 
	/* Default objects have no associated NewGRF file */
 
	if (spec->grf_prop.grffile == NULL) {
 
@@ -166,7 +167,7 @@ static uint32 GetObjectIDAtOffset(TileIn
 
	}
 

	
 
	if (spec->grf_prop.grffile->grfid == cur_grfid) { // same object, same grf ?
 
		return spec->grf_prop.local_id;
 
		return spec->grf_prop.local_id | o->view << 16;
 
	}
 

	
 
	return 0xFFFE; // Defined in another grf file
0 comments (0 inline, 0 general)