Always use int[] for matcen robot flags
This commit is contained in:
parent
56e621c062
commit
ccc6bc5d95
|
@ -799,7 +799,7 @@ void fuelcen_check_for_hoard_goal(segment *segp)
|
||||||
*/
|
*/
|
||||||
void old_matcen_info_read(old_matcen_info *mi, PHYSFS_file *fp)
|
void old_matcen_info_read(old_matcen_info *mi, PHYSFS_file *fp)
|
||||||
{
|
{
|
||||||
mi->robot_flags = PHYSFSX_readInt(fp);
|
mi->robot_flags[0] = PHYSFSX_readInt(fp);
|
||||||
mi->hit_points = PHYSFSX_readFix(fp);
|
mi->hit_points = PHYSFSX_readFix(fp);
|
||||||
mi->interval = PHYSFSX_readFix(fp);
|
mi->interval = PHYSFSX_readFix(fp);
|
||||||
mi->segnum = PHYSFSX_readShort(fp);
|
mi->segnum = PHYSFSX_readShort(fp);
|
||||||
|
|
|
@ -115,7 +115,7 @@ typedef struct FuelCenter {
|
||||||
extern int Num_robot_centers;
|
extern int Num_robot_centers;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int robot_flags; // Up to 32 different robots
|
int robot_flags[1]; // Up to 32 different robots
|
||||||
fix hit_points; // How hard it is to destroy this particular matcen
|
fix hit_points; // How hard it is to destroy this particular matcen
|
||||||
fix interval; // Interval between materialogrifizations
|
fix interval; // Interval between materialogrifizations
|
||||||
short segnum; // Segment this is attached to.
|
short segnum; // Segment this is attached to.
|
||||||
|
|
|
@ -977,7 +977,7 @@ int load_game_data(PHYSFS_file *LoadFile)
|
||||||
if (game_top_fileinfo_version < 27) {
|
if (game_top_fileinfo_version < 27) {
|
||||||
old_matcen_info m;
|
old_matcen_info m;
|
||||||
old_matcen_info_read(&m, LoadFile);
|
old_matcen_info_read(&m, LoadFile);
|
||||||
RobotCenters[i].robot_flags[0] = m.robot_flags;
|
RobotCenters[i].robot_flags[0] = m.robot_flags[0];
|
||||||
RobotCenters[i].robot_flags[1] = 0;
|
RobotCenters[i].robot_flags[1] = 0;
|
||||||
RobotCenters[i].hit_points = m.hit_points;
|
RobotCenters[i].hit_points = m.hit_points;
|
||||||
RobotCenters[i].interval = m.interval;
|
RobotCenters[i].interval = m.interval;
|
||||||
|
|
Loading…
Reference in a new issue