if(self.owner.iscaptured)
WaypointSprite_UpdateHealth(self.owner.sprite, self.health);
else
- WaypointSprite_UpdateBuildFinished(self.owner.sprite, time + (self.max_health - self.health) / (self.count / CP_THINKRATE));
+ WaypointSprite_UpdateBuildFinished(self.owner.sprite, time + (self.max_health - self.health) / (self.count / ONS_CP_THINKRATE));
self.pain_finished = time + 1;
// particles on every hit
pointparticles(particleeffectnum("sparks"), hitloc, force*-1, 1);
void ons_ControlPoint_Icon_Think()
{
entity oself;
- self.nextthink = time + CP_THINKRATE;
+ self.nextthink = time + ONS_CP_THINKRATE;
if(autocvar_g_onslaught_cp_proxydecap)
{
}
}
- _friendly_count = _friendly_count * (autocvar_g_onslaught_cp_proxydecap_dps * CP_THINKRATE);
- _enemy_count = _enemy_count * (autocvar_g_onslaught_cp_proxydecap_dps * CP_THINKRATE);
+ _friendly_count = _friendly_count * (autocvar_g_onslaught_cp_proxydecap_dps * ONS_CP_THINKRATE);
+ _enemy_count = _enemy_count * (autocvar_g_onslaught_cp_proxydecap_dps * ONS_CP_THINKRATE);
self.health = bound(0, self.health + (_friendly_count - _enemy_count), self.max_health);
self.SendFlags |= CPSF_STATUS;
entity oself;
float a;
- self.nextthink = time + CP_THINKRATE;
+ self.nextthink = time + ONS_CP_THINKRATE;
// only do this if there is power
a = ons_ControlPoint_CanBeLinked(self.owner, self.owner.team);
if (self.health >= self.max_health)
{
self.health = self.max_health;
- self.count = autocvar_g_onslaught_cp_regen * CP_THINKRATE; // slow repair rate from now on
+ self.count = autocvar_g_onslaught_cp_regen * ONS_CP_THINKRATE; // slow repair rate from now on
self.think = ons_ControlPoint_Icon_Think;
sound(self, CH_TRIGGER, "onslaught/controlpoint_built.wav", VOL_BASE, ATTEN_NORM);
self.owner.iscaptured = TRUE;
e.event_damage = ons_ControlPoint_Icon_Damage;
e.team = player.team;
e.colormap = 1024 + (e.team - 1) * 17;
- e.count = (e.max_health - e.health) * CP_THINKRATE / autocvar_g_onslaught_cp_buildtime; // how long it takes to build
+ e.count = (e.max_health - e.health) * ONS_CP_THINKRATE / autocvar_g_onslaught_cp_buildtime; // how long it takes to build
sound(e, CH_TRIGGER, "onslaught/controlpoint_build.wav", VOL_BASE, ATTEN_NORM);
pointparticles(particleeffectnum(sprintf("%sflag_touch", Static_Team_ColorName_Lower(player.team))), e.origin, '0 0 0', 1);
- WaypointSprite_UpdateBuildFinished(cp.sprite, time + (e.max_health - e.health) / (e.count / CP_THINKRATE));
+ WaypointSprite_UpdateBuildFinished(cp.sprite, time + (e.max_health - e.health) / (e.count / ONS_CP_THINKRATE));
WaypointSprite_UpdateRule(cp.sprite,cp.team,SPRITERULE_TEAMPLAY);
cp.sprite.SendFlags |= 16;
return;
if(!IS_PLAYER(toucher)) { return; }
+ if(toucher.frozen) { return; }
if(toucher.deadflag != DEAD_NO) { return; }
if ( SAME_TEAM(self,toucher) )
void ons_ControlPoint_Think()
{
- self.nextthink = time + CP_THINKRATE;
+ self.nextthink = time + ONS_CP_THINKRATE;
CSQCMODEL_AUTOUPDATE();
}
self.isshielded = TRUE;
self.think = ons_ControlPoint_Think;
self.ons_toucher = world;
- self.nextthink = time + CP_THINKRATE;
+ self.nextthink = time + ONS_CP_THINKRATE;
setmodel_fixsize(self, "models/onslaught/controlpoint_pad.md3");
WaypointSprite_UpdateMaxHealth(self.sprite, 0);
cp.movetype = MOVETYPE_NONE;
cp.touch = ons_ControlPoint_Touch;
cp.think = ons_ControlPoint_Think;
- cp.nextthink = time + CP_THINKRATE;
+ cp.nextthink = time + ONS_CP_THINKRATE;
cp.reset = ons_ControlPoint_Reset;
cp.colormap = 1024;
cp.iscaptured = FALSE;
{
e.ons_roundlost = TRUE;
e.player_blocked = TRUE;
+
+ nades_Clear(e);
}
-
+
return 1;
}
if ( IS_PLAYER(self) )
{
- entity source_point = ons_Nearest_ControlPoint(self.origin, autocvar_g_onslaught_teleport_radius);
-
- if ( !source_point && self.health > 0 )
- {
- sprint(self, "\nYou need to be next to a control point\n");
- return 1;
- }
-
- entity closest_target = ons_Nearest_ControlPoint_2D(pos, autocvar_g_onslaught_click_radius);
-
- if ( closest_target == world )
- {
- sprint(self, "\nNo control point found\n");
- return 1;
- }
-
- if ( self.health <= 0 )
- {
- self.ons_spawn_by = closest_target;
- self.respawn_flags = self.respawn_flags | RESPAWN_FORCE;
- }
- else
+ if ( !self.frozen )
{
- if ( source_point == closest_target )
+ entity source_point = ons_Nearest_ControlPoint(self.origin, autocvar_g_onslaught_teleport_radius);
+
+ if ( !source_point && self.health > 0 )
{
- sprint(self, "\nTeleporting to the same point\n");
+ sprint(self, "\nYou need to be next to a control point\n");
return 1;
}
-
- if ( !ons_Teleport(self,closest_target,autocvar_g_onslaught_teleport_radius,TRUE) )
- sprint(self, "\nUnable to teleport there\n");
+
+
+ entity closest_target = ons_Nearest_ControlPoint_2D(pos, autocvar_g_onslaught_click_radius);
+
+ if ( closest_target == world )
+ {
+ sprint(self, "\nNo control point found\n");
+ return 1;
+ }
+
+ if ( self.health <= 0 )
+ {
+ self.ons_spawn_by = closest_target;
+ self.respawn_flags = self.respawn_flags | RESPAWN_FORCE;
+ }
+ else
+ {
+ if ( source_point == closest_target )
+ {
+ sprint(self, "\nTeleporting to the same point\n");
+ return 1;
+ }
+
+ if ( !ons_Teleport(self,closest_target,autocvar_g_onslaught_teleport_radius,TRUE) )
+ sprint(self, "\nUnable to teleport there\n");
+ }
+
+ return 1;
}
- //sprint(self, "\nNo teleportation for you\n");
-
- return 1;
+ sprint(self, "\nNo teleportation for you\n");
}
return 1;