Actually, I don't think that the suggestion above would help. What about the
next time someone changes the structure...we would have to put in a test
condition for that as well. Also, the psudeo code above would produce a
graphical warning for each and every bot in the map file.
Quote:
3- If possible, assign a "default" value for this inexistent field. And by
"default" I mean a hardcoded default ie. 'SENSOR_FEATURELESS' or something like
that. Need see defs.h.
And should that not have been done when the sensors patch was developed? The
code loads a default value when the savegame file can't be used.
From looking at the code, the test for the game file looks for the major release
value ("0.15+git" in this case) but ignores the minor release value. If the
version test passes, processing of the savegame continues. What is bothersome is
that if processing of the file fails, the user is stuck in a loop. In this case,
processing fails for a droid feature leaving the user in a loop the length of
which is every droid in the map.dat file. |