From: mand1nga Date: Wed, 17 Aug 2011 00:44:55 +0000 (-0300) Subject: Remove unused stuff X-Git-Tag: xonotic-v0.5.0~122^2^2~2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=f2866476a126f45184f29922737d3e6a1e6c6b3a;p=xonotic%2Fxonotic-data.pk3dir.git Remove unused stuff --- diff --git a/qcsrc/server/bot/havocbot/role_assault.qc b/qcsrc/server/bot/havocbot/role_assault.qc index e662a3500..6471e5865 100644 --- a/qcsrc/server/bot/havocbot/role_assault.qc +++ b/qcsrc/server/bot/havocbot/role_assault.qc @@ -12,118 +12,11 @@ void() havocbot_role_ast_defense; void() havocbot_role_ast_offense; .entity havocbot_ast_target; -entity havocbot_ast_core; -float havocbot_ast_core_unreachable; - void(entity bot) havocbot_ast_reset_role; void(float ratingscale, vector org, float sradius) havocbot_goalrating_items; void(float ratingscale, vector org, float sradius) havocbot_goalrating_enemyplayers; -void havocbot_ast_find_core() -{ - entity are, to1, to2, to3; - - if(havocbot_ast_core_unreachable) - return; - - are = findchain(classname, "target_assault_roundend"); - - for (; are; are = are.chain) - { - for(to1 = world; (to1 = find(to1, target, are.targetname)); ) - { - if(to1.classname == "func_assault_destructible") - { - havocbot_ast_core = to1; - return; - } - - for(to2 = world; (to2 = find(to2, target, to1.targetname)); ) - { - if(to2.classname == "func_assault_destructible") - { - havocbot_ast_core = to2; - return; - } - - for(to3 = world; (to3 = find(to3, target, to2.targetname)); ) - { - if(to3.classname == "func_assault_destructible") - { - havocbot_ast_core = to3; - return; - } - } - } - } - } - - dprint("ERROR: Power core unreachable\n"); - havocbot_ast_core_unreachable = TRUE; -} - -void havocbot_goalrating_ast_core(float ratingscale) -{ - entity best, wp; - float radius, found, bestvalue, c; - vector p; - - havocbot_ast_find_core(); - - if not(havocbot_ast_core) - return; - - if not(havocbot_ast_core.takedamage) - havocbot_ast_core.takedamage = TRUE; - - p = 0.5 * (havocbot_ast_core.absmin + havocbot_ast_core.absmax); -// dprint(vtos(ad.origin), " ", vtos(ad.absmin), " ", vtos(ad.absmax),"\n"); - te_knightspike(p); - te_lightning2(world, '0 0 0', p); - - // Find and rate waypoints around it - found = FALSE; - best = world; - bestvalue = 99999999999; - for(radius=0; radius<1000 && !found; radius+=500) - { - for(wp=findradius(p, radius); wp; wp=wp.chain) - { - if(!(wp.wpflags & WAYPOINTFLAG_GENERATED)) - if(wp.classname=="waypoint") - if(checkpvs(wp.origin, havocbot_ast_core)) - { - found = TRUE; - if(wp.cnt