Merge pull request #7759 from Goober5000/feature/remove_weapon_class_limits

Remove the weapon class limit
This commit is contained in:
Goober5000 authored and GitHub committed 2026-09-10 16:29:51 -04:00
commit aee08e2bc8
3 files changed
+2 -9

No files matched your search

+1 -3
View File
@@ -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
+1 -1
View File
@@ -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++) {
-5
View File
@@ -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();