Hard Light Productions Forums
Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Mobius on April 28, 2009, 12:36:35 pm
-
I heard somewhere that there's a max number of waypoints (maybe it was waypoint paths) FSO can handle in a mission. I tried with the Wiki, but there aren't any references in this (http://www.hard-light.net/wiki/index.php/Engine_Limitations) Wiki article.
Is the maximum number of waypoints and/or waypoint paths unlimited? If so, it seems a bit strange giving the limits both Retail FS2 and FSO have.
-
#define MAX_WAYPOINTS_PER_LIST 20
#define MAX_WAYPOINT_LISTS 32
-
It's in the wiki now.
-
Another question - what kind of oddities are known to occur if someone goes well beyond the limit? Does the mission crash upon clicking on "Commit"?
-
Another question - what kind of oddities are known to occur if someone goes well beyond the limit? Does the mission crash upon clicking on "Commit"?
As these are used to define fixed sized arrays in a number of oft used structs, I believe that if you manually added too many waypoints manually to the mission using Notepad then trying to play the mission could cause all kinds of bad out-of-array memory corruption. Probably.
typedef struct waypoint_list {
char name[NAME_LENGTH];
int count;
char flags[MAX_WAYPOINTS_PER_LIST];
vec3d waypoints[MAX_WAYPOINTS_PER_LIST];
} waypoint_list;
But that's just from looking at the code and using the well known mark 1 human brain compiler. Give it a test.
-
...I believe that if you manually added too many waypoints manually to the mission...
The Department of Redundancy Department issues you a fine.
-
I'm asking because I have a mission featuring a great many waypoints and waypoints paths crashing upon clicking on Commit. FRED2 Open let me place the waypoints, I did not need Notepad to hack the mission, but still... :nervous:
Also, I edited the Wiki article to replace "list" and "lists" with "path" and "paths", respectively. I thought it was more appropriate. :)
-
FRED also allowed you to place far too many ships in a mission as well (and maybe still does if you're insane enough to add 401 ships to a mission).
FRED frequently uses a different array to hold data in from the one that is used in-game so hitting the limit in one doesn't always mean you'll hit it in the other.
-
FRED frequently uses a different array to hold data in from the one that is used in-game so hitting the limit in one doesn't always mean you'll hit it in the other.
What do you mean?
-
FRED frequently uses a different array to hold data in from the one that is used in-game so hitting the limit in one doesn't always mean you'll hit it in the other.
What do you mean?
If i understand that correctly, it means FRED allows you to exceed the limit of waypoints and probably ships.
The game engine doesn't.
It seems i have to cheat to make my mission work.
-
Oh right, I didn't get what "other" stands for in that post. :)