float edgedamage, coredamage, edgeradius, recipricoledgeradius, d;
float selfdamage, teamdamage, enemydamage;
edgedamage = WEP_CVAR(devastator, edgedamage);
float edgedamage, coredamage, edgeradius, recipricoledgeradius, d;
float selfdamage, teamdamage, enemydamage;
edgedamage = WEP_CVAR(devastator, edgedamage);
d = bound(0, edgedamage + (coredamage - edgedamage) * sqrt(1 - d * recipricoledgeradius), 10000);
// count potential damage according to type of target
if(targ == self)
d = bound(0, edgedamage + (coredamage - edgedamage) * sqrt(1 - d * recipricoledgeradius), 10000);
// count potential damage according to type of target
if(targ == self)
- if(missile.realowner != self)
- {
- missile = find(missile, classname, "rocket");
- continue;
- }
- makevectors(missile.v_angle);
+ if(it.classname != "rocket") continue;
+
+ makevectors(it.v_angle);
float distance; distance= bound(300,vlen(self.origin-self.enemy.origin),30000);
//As the distance gets larger, a correct detonation gets near imposible
//Bots are assumed to use the rocket spawnfunc_light to see if the rocket gets near a player
float distance; distance= bound(300,vlen(self.origin-self.enemy.origin),30000);
//As the distance gets larger, a correct detonation gets near imposible
//Bots are assumed to use the rocket spawnfunc_light to see if the rocket gets near a player
if(IS_PLAYER(self.enemy))
if(desirabledamage >= 0.1*coredamage)
if(random()/distance*300 > frametime*bound(0,(10-skill)*0.2,1))
self.BUTTON_ATCK2 = true;
// dprint(ftos(random()/distance*300),">");dprint(ftos(frametime*bound(0,(10-skill)*0.2,1)),"\n");
}
if(IS_PLAYER(self.enemy))
if(desirabledamage >= 0.1*coredamage)
if(random()/distance*300 > frametime*bound(0,(10-skill)*0.2,1))
self.BUTTON_ATCK2 = true;
// dprint(ftos(random()/distance*300),">");dprint(ftos(frametime*bound(0,(10-skill)*0.2,1)),"\n");
}
// if we would be doing at X percent of the core damage, detonate it
// but don't fire a new shot at the same time!
if(desirabledamage >= 0.75 * coredamage) //this should do group damage in rare fortunate events
// if we would be doing at X percent of the core damage, detonate it
// but don't fire a new shot at the same time!
if(desirabledamage >= 0.75 * coredamage) //this should do group damage in rare fortunate events