-#ifndef WEAPONS_ALL_H
-#define WEAPONS_ALL_H
+#pragma once
-#include <common/command/all.qh>
+#include <common/command/_mod.qh>
#include <common/stats.qh>
#include "config.qh"
-// weapon sets
-USING(WepSet, vector);
+#include "weapon.qh"
+
#ifdef SVQC
void WriteWepSet(float dest, WepSet w);
#endif
WepSet ReadWepSet();
#endif
-#include "weapon.qh"
-
-#ifndef MENUQC
+#ifdef GAMEQC
#include "calculations.qh"
+#include "projectiles.qh"
#include <common/models/all.qh>
#endif
#include <common/util.qh>
-#ifdef SVQC
-#include <server/bot/aim.qh>
-#endif
-
REGISTRY(Weapons, 72) // Increase as needed. Can be up to 72.
#define Weapons_from(i) _Weapons_from(i, WEP_Null)
REGISTER_REGISTRY(Weapons)
STATIC_INIT(WeaponPickup) { FOREACH(Weapons, true, it.m_pickup = NEW(WeaponPickup, it)); }
+#ifdef SVQC
+#include <server/bot/api.qh>
+#endif
+
.WepSet m_wepset;
#define WEPSET(id) (WEP_##id.m_wepset)
#define WepSet_FromWeapon(it) ((it).m_wepset)
X(weaponstartoverride, float)
X(weaponstart, float)
X(weaponthrowable, float)
+#ifdef SVQC
X(reload_ammo, float)
.float reloading_ammo = reload_ammo;
X(reload_time, float)
.float reloading_time = reload_time;
+#endif
#undef X
else
inaccessible = strcat(inaccessible, "\n", it.netname);
});
- if (inaccessible) LOG_TRACEF("Impulse limit exceeded, weapon(s) will not be directly accessible: %s\n", inaccessible);
+ if (inaccessible) LOG_TRACEF("Impulse limit exceeded, weapon(s) will not be directly accessible: %s", inaccessible);
#ifdef CSQC
FOREACH(Weapons, true, it.wr_init(it));
#endif
weaponorder_byid = strzone(substring(weaponorder_byid, 1, -1));
}
-#ifndef MENUQC
+#ifdef GAMEQC
.entity weaponchild;
.entity exteriorweaponentity;
-vector weaponentity_glowmod(Weapon wep, int c)
+vector weaponentity_glowmod(Weapon wep, entity actor, int c, entity wepent)
{
vector g;
- if (!(g = wep.wr_glow(wep))) g = colormapPaletteColor(c & 0x0F, true) * 2;
+ if (!(g = wep.wr_glow(wep, actor, wepent))) g = colormapPaletteColor(c & 0x0F, true) * 2;
return g;
}
+.int m_gunalign;
+
//.int weapon; // current weapon
.string weaponname; // name of .weapon
vector shotorg_adjust_values(vector vecs, bool y_is_right, bool visual, int algn);
void CL_WeaponEntity_SetModel(entity this, string name, bool _anim);
#endif
-
-#endif