mirror of https://github.com/OpenTTD/OpenTTD
(svn r4539) - NewGRF: always check that the action 0x2 feature matches the action 0x1, not just on 'normal' sprite groups.
parent
f74a683f90
commit
c77f77304a
13
newgrf.c
13
newgrf.c
|
@ -1333,6 +1333,14 @@ static void NewSpriteGroup(byte *buf, int len)
|
||||||
_cur_grffile->spritegroups[_cur_grffile->spritegroups_count] = NULL;
|
_cur_grffile->spritegroups[_cur_grffile->spritegroups_count] = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (feature != _cur_grffile->spriteset_feature) {
|
||||||
|
grfmsg(GMS_WARN, "NewSpriteGroup: sprite set feature 0x%02X does not match action feature 0x%02X, skipping.",
|
||||||
|
_cur_grffile->spriteset_feature, feature);
|
||||||
|
/* Clear this group's reference */
|
||||||
|
_cur_grffile->spritegroups[setid] = NULL;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
/* Deterministic Sprite Group */
|
/* Deterministic Sprite Group */
|
||||||
case 0x81: // Self scope, byte
|
case 0x81: // Self scope, byte
|
||||||
|
@ -1449,11 +1457,6 @@ static void NewSpriteGroup(byte *buf, int len)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_cur_grffile->spriteset_feature != feature) {
|
|
||||||
grfmsg(GMS_ERROR, "NewSpriteGroup: Group feature 0x%02X doesn't match set feature 0x%X! Playing it risky and trying to use it anyway.", feature, _cur_grffile->spriteset_feature);
|
|
||||||
// return; // XXX: we can't because of MB's newstats.grf --pasky
|
|
||||||
}
|
|
||||||
|
|
||||||
if (_cur_grffile->first_spriteset == 0)
|
if (_cur_grffile->first_spriteset == 0)
|
||||||
_cur_grffile->first_spriteset = _cur_grffile->spriteset_start;
|
_cur_grffile->first_spriteset = _cur_grffile->spriteset_start;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue