Add NewGRF object property/flag to use land as object ground sprite

This handles variable ground densities, snow/desert, etc.
This commit is contained in:
Jonathan G Rennison
2021-12-04 21:45:33 +00:00
parent 906fde15c7
commit 924ffb013f
11 changed files with 289 additions and 8 deletions

View File

@@ -4296,6 +4296,11 @@ static ChangeInfoResult ObjectChangeInfo(uint id, int numinfo, int prop, const G
spec->generate_amount = buf->ReadByte();
break;
case A0RPI_OBJECT_USE_LAND_GROUND:
if (MappedPropertyLengthMismatch(buf, 1, mapping_entry)) break;
SB(spec->ctrl_flags, OBJECT_CTRL_FLAG_USE_LAND_GROUND, 1, (buf->ReadByte() != 0 ? 1 : 0));
break;
default:
ret = HandleAction0PropertyDefault(buf, prop);
break;