Codechange: Store objectspecs in std::vector instead of flat array.

(cherry picked from commit 1ae263c5467105820e4d770b3d57d25ba01e22b1)
This commit is contained in:
Peter Nelson
2022-11-06 19:21:03 +00:00
committed by Jonathan G Rennison
parent d34e1bbbc1
commit 74e4556a85
8 changed files with 27 additions and 17 deletions

View File

@@ -2885,7 +2885,7 @@ static ChangeInfoResult GlobalVarChangeInfo(uint gvid, int numinfo, int prop, co
case A0RPI_GLOBALVAR_LIGHTHOUSE_GENERATE_AMOUNT:
case A0RPI_GLOBALVAR_TRANSMITTER_GENERATE_AMOUNT: {
if (MappedPropertyLengthMismatch(buf, 1, mapping_entry)) break;
extern ObjectSpec _object_specs[NUM_OBJECTS];
extern std::vector<ObjectSpec> _object_specs;
ObjectType type = (prop == A0RPI_GLOBALVAR_LIGHTHOUSE_GENERATE_AMOUNT) ? OBJECT_LIGHTHOUSE : OBJECT_TRANSMITTER;
_object_specs[type].generate_amount = buf->ReadByte();
break;