@@ -131,24 +131,29 @@ static void ObjectSetTriggers(const Reso
* @param tile TileIndex of the tile to query
* @param cur_grfid GRFID of the current callback chain
* @return value encoded as per NFO specs
*/
static uint32 GetObjectIDAtOffset(TileIndex tile, uint32 cur_grfid)
{
if (!IsTileType(tile, MP_OBJECT)) {
return 0xFFFF;
}
const ObjectSpec *spec = ObjectSpec::GetByTile(tile);
/* Default objects have no associated NewGRF file */
if (spec->grf_prop.grffile == NULL) {
return 0xFFFE; // Defined in another grf file
if (spec->grf_prop.grffile->grfid == cur_grfid) { // same object, same grf ?
return spec->grf_prop.local_id;
/**
* Based on newhouses equivalent, but adapted for newobjects
* @param parameter from callback. It's in fact a pair of coordinates
* @param tile TileIndex from which the callback was initiated
* @param index of the object been queried for
Status change: