]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/defs.qh
Improve registry API by adding REGISTRY_MAX and REGISTRY_COUNT macros
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / defs.qh
index 9d7421987c1ce254c5ce4da58139214d594a6d53..a8ec77959af89a584a3b4f03b2806a04e2cb37b2 100644 (file)
@@ -195,7 +195,7 @@ void FixClientCvars(entity e);
 
 float bot_waypoints_for_items;
 
-.float attack_finished_for[Weapons_MAX * MAX_WEAPONSLOTS];
+.float attack_finished_for[REGISTRY_MAX(Weapons) * MAX_WEAPONSLOTS];
 .float attack_finished_single[MAX_WEAPONSLOTS];
 #if INDEPENDENT_ATTACK_FINISHED
 #define ATTACK_FINISHED_FOR(ent, w, slot) ((ent).(attack_finished_for[((w) - WEP_FIRST) * MAX_WEAPONSLOTS + (slot)]))
@@ -296,7 +296,7 @@ string matchid;
 
 bool radar_showennemies;
 
-.float weapon_load[Weapons_MAX];
+.float weapon_load[REGISTRY_MAX(Weapons)];
 .int ammo_none; // used by the reloading system, must always be 0
 .int clip_load;
 .int old_clip_load;