ring_scale = autocvar_crosshair_ring_size;
- float weapon_clipload, weapon_clipsize;
- weapon_clipload = STAT(WEAPON_CLIPLOAD);
- weapon_clipsize = STAT(WEAPON_CLIPSIZE);
-
entity wepent = viewmodels[0]; // TODO: unhardcode
+ int weapon_clipload = wepent.clip_load;
+ int weapon_clipsize = wepent.clip_size;
+
float arc_heat = wepent.arc_heat_percent;
float vcharge = wepent.vortex_charge;
float vchargepool = wepent.vortex_chargepool_ammo;
/** compressShotOrigin */
REGISTER_STAT(SHOTORG, int)
REGISTER_STAT(LEADLIMIT, float, autocvar_leadlimit)
-REGISTER_STAT(WEAPON_CLIPLOAD, int)
-REGISTER_STAT(WEAPON_CLIPSIZE, int)
REGISTER_STAT(LAST_PICKUP, float)
REGISTER_STAT(HUD, int)
PROP(false, vortex_chargepool_ammo, WEPENT_SET_NORMAL, \
{ WriteByte(chan, this.vortex_chargepool_ammo * 16); }, \
{ (viewmodels[this.m_wepent_slot]).vortex_chargepool_ammo = ReadByte() / 16; }) \
+ \
+ PROP(false, clip_load, WEPENT_SET_NORMAL, \
+ { WriteShort(chan, this.clip_load); }, \
+ { (viewmodels[this.m_wepent_slot]).clip_load = ReadShort(); }) \
+ \
+ PROP(false, clip_size, WEPENT_SET_NORMAL, \
+ { WriteShort(chan, this.clip_size); }, \
+ { (viewmodels[this.m_wepent_slot]).clip_size = ReadShort(); }) \
\
/**/
.int minelayer_mines;
.float arc_heat_percent;
.int hagar_load;
+.int clip_load;
+.int clip_size;
#ifdef SVQC
this.ammo_nails = spectatee.ammo_nails;
this.ammo_rockets = spectatee.ammo_rockets;
this.ammo_fuel = spectatee.ammo_fuel;
- this.clip_load = spectatee.clip_load;
- this.clip_size = spectatee.clip_size;
this.effects = spectatee.effects & EFMASK_CHEAP; // eat performance
this.health = spectatee.health;
CS(this).impulse = 0;
{
.entity weaponentity = weaponentities[slot];
W_WeaponFrame(this, weaponentity);
-
- if(slot == 0)
- {
- this.clip_load = this.(weaponentity).clip_load;
- this.clip_size = this.(weaponentity).clip_size;
- }
}
this.items_added = 0;
.float weapon_load[Weapons_MAX];
.int ammo_none; // used by the reloading system, must always be 0
-.float clip_load = _STAT(WEAPON_CLIPLOAD);
+.float clip_load;
.float old_clip_load;
-.float clip_size = _STAT(WEAPON_CLIPSIZE);
+.float clip_size;
.int minelayer_mines;
.float vortex_charge;