mirror of
https://github.com/scp-fs2open/fs2open.github.com.git
synced 2026-11-07 08:15:59 -10:00
Remove the weapon class limit
With every fixed-size weapon-class-indexed structure now converted to dynamic containers, we can finally remove the `MAX_WEAPON_TYPES` limit! Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
This commit is contained in:
1 parent
37b0b6ea82
commit
190472f77e
3 files changed
+2
-9
No files matched your search
@@ -36,7 +36,7 @@
|
||||
#define MAX_SHIPS 500 // max number of ship instances there can be.DTP; bumped from 200 to 400, then to 500 in 2022
|
||||
#define SHIPS_LIMIT 500 // what MAX_SHIPS will be at release time (for error checking in debug mode); dtp Bumped from 200 to 400, then to 500 in 2022
|
||||
|
||||
// MAX_SHIP_CLASSES is no longer needed! The effective ceiling on ship classes is now 32767, which is determined by the signed SHORT fields in multiplayer loadout sync packets.
|
||||
// MAX_SHIP_CLASSES and MAX_WEAPON_TYPES are no longer needed! The effective ceiling on both ship and weapon classes is now 32767, which is determined by the signed SHORT fields in multiplayer loadout sync packets.
|
||||
|
||||
#define MAX_WINGS 75
|
||||
|
||||
@@ -61,8 +61,6 @@
|
||||
// from weapon.h
|
||||
#define MAX_WEAPONS 3000 //Increased from 2000 to 3000 in 2022
|
||||
|
||||
#define MAX_WEAPON_TYPES 500
|
||||
|
||||
// from model.h
|
||||
#define MAX_MODEL_TEXTURES 64
|
||||
#define MAX_POLYGON_MODELS 300
|
||||
|
||||
@@ -90,7 +90,7 @@ void pilotfile::csg_read_info()
|
||||
ship_list.push_back(ilist);
|
||||
}
|
||||
|
||||
// weapon list (NOTE: may contain more than MAX_WEAPON_TYPES)
|
||||
// weapon list (NOTE: may contain more weapon classes than this mod defines)
|
||||
list_size = cfread_int(cfp);
|
||||
|
||||
for (idx = 0; idx < list_size; idx++) {
|
||||
|
||||
@@ -854,11 +854,6 @@ int parse_weapon(int subtype, bool replace, const char *filename)
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Check if there are too many weapon classes
|
||||
if (Weapon_info.size() >= MAX_WEAPON_TYPES) {
|
||||
Error(LOCATION, "Too many weapon classes before '%s'; maximum is %d.\n", fname, MAX_WEAPON_TYPES);
|
||||
}
|
||||
|
||||
w_id = weapon_info_size();
|
||||
Weapon_info.push_back(weapon_info());
|
||||
wip = &Weapon_info.back();
|
||||
|
||||
Reference in new issue
Block a user