.float damageextraradius;
.void(entity this, float thisdmg, int hittype, vector org, vector thisforce) event_damage;
-// only for Porto
-float angles_held_status;
-vector angles_held;
-
// weapons
.bool silent;
spectatorbutton_zoom = (f & 4);
- if(f & 8)
- {
- angles_held_status = 1;
- angles_held.x = ReadAngle();
- angles_held.y = ReadAngle();
- angles_held.z = 0;
- }
- else
- angles_held_status = 0;
-
if(f & 16)
{
num_spectators = ReadByte();
vector pos = view_origin;
vector dir = view_forward;
- if (angles_held_status)
+ if (wepent.angles_held_status)
{
- makevectors(angles_held);
+ makevectors(wepent.angles_held);
dir = v_forward;
}
}
else
{
- if(actor.porto_v_angle_held)
+ if(actor.(weaponentity).porto_v_angle_held)
{
if(!(fire & 2))
- {
- actor.porto_v_angle_held = 0;
-
- ClientData_Touch(actor);
- }
+ actor.(weaponentity).porto_v_angle_held = 0;
}
else
{
if(fire & 2)
{
- actor.porto_v_angle = actor.v_angle;
- actor.porto_v_angle_held = 1;
-
- ClientData_Touch(actor);
+ actor.(weaponentity).porto_v_angle = actor.v_angle;
+ actor.(weaponentity).porto_v_angle_held = 1;
}
}
- if(actor.porto_v_angle_held)
- makevectors(actor.porto_v_angle); // override the previously set angles
+ if(actor.(weaponentity).porto_v_angle_held)
+ makevectors(actor.(weaponentity).porto_v_angle); // override the previously set angles
if(fire & 1)
if(!actor.porto_current)
var = strzone(x); \
MACRO_END
-.int w_sv_entnum;
-.Weapon w_m_switchweapon;
-.Weapon w_m_switchingweapon;
-.Weapon w_m_weapon;
-//.float w_weapon_nextthink;
-.float w_m_alpha;
-.float w_vortex_charge;
-.int w_m_gunalign;
+#ifdef SVQC
+ .int w_sv_entnum;
+ .Weapon w_m_switchweapon;
+ .Weapon w_m_switchingweapon;
+ .Weapon w_m_weapon;
+ //.float w_weapon_nextthink;
+ .float w_m_alpha;
+ .float w_vortex_charge;
+ .int w_m_gunalign;
+ .bool w_porto_v_angle_held;
+#endif
// #define PROP(public, fld, set, sv, cl)
#define WEPENT_NETPROPS(PROP) PROP(false, sv_entnum, WEPENT_SET_NORMAL, {}, {}) /* sentinel */ \
PROP(false, m_gunalign, WEPENT_SET_NORMAL, \
{ WriteByte(chan, this.m_gunalign); }, \
{ (viewmodels[this.m_wepent_slot]).m_gunalign = ReadByte(); }) \
+ \
+ PROP(false, porto_v_angle_held, WEPENT_SET_NORMAL, \
+ { WriteByte(chan, this.porto_v_angle_held); if(this.porto_v_angle_held) { \
+ WriteAngle(chan, this.porto_v_angle.x); WriteAngle(chan, this.porto_v_angle.y); \
+ } }, \
+ { (viewmodels[this.m_wepent_slot]).angles_held_status = ReadByte(); if((viewmodels[this.m_wepent_slot]).angles_held_status) { \
+ (viewmodels[this.m_wepent_slot]).angles_held_x = ReadAngle(); (viewmodels[this.m_wepent_slot]).angles_held_y = ReadAngle(); (viewmodels[this.m_wepent_slot]).angles_held_z = 0; } \
+ else { (viewmodels[this.m_wepent_slot]).angles_held = '0 0 0'; } }) \
\
/**/
.Weapon activeweapon;
.Weapon switchingweapon;
.Weapon switchweapon;
+
+ // only for Porto
+ .bool angles_held_status;
+ .vector angles_held;
#endif
if (e.race_completed) sf |= 1; // forced scoreboard
if (to.spectatee_status) sf |= 2; // spectator ent number follows
if (e.zoomstate) sf |= 4; // zoomed
- if (e.porto_v_angle_held) sf |= 8; // angles held
if (autocvar_sv_showspectators) sf |= 16; // show spectators
WriteHeader(MSG_ENTITY, ENT_CLIENT_CLIENTDATA);
{
WriteByte(MSG_ENTITY, to.spectatee_status);
}
- if (sf & 8)
- {
- WriteAngle(MSG_ENTITY, e.v_angle.x);
- WriteAngle(MSG_ENTITY, e.v_angle.y);
- }
if(sf & 16)
{