sendflags = sendflags & 0x7F;
- if (g_nexball)
- sendflags &= ~0x80;
- else if (self.max_health || (self.pain_finished && (time < self.pain_finished + 0.25)))
+ if (self.max_health || (self.pain_finished && (time < self.pain_finished + 0.25)))
sendflags |= 0x80;
+ int f = 0;
+ if(self.currentammo)
+ f |= 1; // hideable
+ if(self.exteriormodeltoclient == to)
+ f |= 2; // my own
+
+ MUTATOR_CALLHOOK(SendWaypoint, this, to, sendflags, f);
+
WriteByte(MSG_ENTITY, sendflags);
WriteByte(MSG_ENTITY, self.wp_extra);
WriteCoord(MSG_ENTITY, self.fade_time);
WriteCoord(MSG_ENTITY, self.teleport_time);
WriteShort(MSG_ENTITY, self.fade_rate); // maxdist
- float f = 0;
- if (self.currentammo)
- f |= 1; // hideable
- if (self.exteriormodeltoclient == to)
- f |= 2; // my own
- if (g_onslaught)
- {
- if (self.owner.classname == "onslaught_controlpoint")
- {
- entity wp_owner = self.owner;
- entity e = WaypointSprite_getviewentity(to);
- if (SAME_TEAM(e, wp_owner) && wp_owner.goalentity.health >= wp_owner.goalentity.max_health) { f |= 2; }
- if (!ons_ControlPoint_Attackable(wp_owner, e.team)) { f |= 2; }
- }
- if (self.owner.classname == "onslaught_generator")
- {
- entity wp_owner = self.owner;
- if (wp_owner.isshielded && wp_owner.health >= wp_owner.max_health) { f |= 2; }
- if (wp_owner.health <= 0) { f |= 2; }
- }
- }
WriteByte(MSG_ENTITY, f);
}
{SELFPARAM();
// if a WP wants to time out, let it time out immediately; other WPs ought to be reset/killed by their owners
- if (self.fade_time) // there was there before: || g_keyhunt, do we really need this?
+ if (self.fade_time)
WaypointSprite_Kill(self);
}
entity e = WaypointSprite_Spawn(spr, 0, 0, carrier, '0 0 64', world, carrier.team, carrier, waypointsprite_attachedforcarrier, false, icon);
if (e)
{
- WaypointSprite_UpdateMaxHealth(e, '1 0 0' * healtharmor_maxdamage(start_health, start_armorvalue, autocvar_g_balance_armor_blockpercent, DEATH_WEAPON) * 2);
- WaypointSprite_UpdateHealth(e, '1 0 0' * healtharmor_maxdamage(carrier.health, carrier.armorvalue, autocvar_g_balance_armor_blockpercent, DEATH_WEAPON));
+ WaypointSprite_UpdateMaxHealth(e, '1 0 0' * healtharmor_maxdamage(start_health, start_armorvalue, autocvar_g_balance_armor_blockpercent, DEATH_WEAPON.m_id) * 2);
+ WaypointSprite_UpdateHealth(e, '1 0 0' * healtharmor_maxdamage(carrier.health, carrier.armorvalue, autocvar_g_balance_armor_blockpercent, DEATH_WEAPON.m_id));
}
return e;
}