From: terencehill Date: Sun, 23 Aug 2015 15:33:36 +0000 (+0200) Subject: Merge branch 'master' into terencehill/bot_fixes X-Git-Tag: xonotic-v0.8.2~1891^2 X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=commitdiff_plain;h=867ce0406b74601b6d74a4ac412ac30063490d88;hp=-c Merge branch 'master' into terencehill/bot_fixes --- 867ce0406b74601b6d74a4ac412ac30063490d88 diff --combined qcsrc/server/cl_client.qc index 154a306043,81ea03e0eb..6034923ca7 --- a/qcsrc/server/cl_client.qc +++ b/qcsrc/server/cl_client.qc @@@ -25,7 -25,7 +25,7 @@@ #include "bot/bot.qh" #include "bot/navigation.qh" - #include "../common/vehicles/sv_vehicles.qh" + #include "../common/vehicles/all.qh" #include "weapons/hitplot.qh" #include "weapons/weaponsystem.qh" @@@ -204,7 -204,6 +204,7 @@@ void PutObserverInServer (void } self.frags = FRAGS_SPECTATOR; + self.bot_attack = false; MUTATOR_CALLHOOK(MakePlayerObserver); diff --combined qcsrc/server/g_damage.qc index 61fe6ef87b,9791bbd293..45c6ba1254 --- a/qcsrc/server/g_damage.qc +++ b/qcsrc/server/g_damage.qc @@@ -6,9 -6,8 +6,8 @@@ #include "scores.qh" #include "waypointsprites.qh" #include "spawnpoints.qh" - #include "tturrets/include/turrets_early.qh" #include "t_items.qh" - #include "../common/vehicles/sv_vehicles.qh" + #include "../common/vehicles/all.qh" #include "weapons/accuracy.qh" #include "weapons/csqcprojectile.qh" #include "weapons/selection.qh" @@@ -566,7 -565,6 +565,7 @@@ void Freeze (entity targ, float freeze_ targ.revive_progress = ((frozen_type == 3) ? 1 : 0); targ.health = ((frozen_type == 3) ? targ_maxhealth : 1); targ.revive_speed = freeze_time; + self.bot_attack = false; entity ice, head; ice = spawn(); @@@ -602,9 -600,6 +601,9 @@@ void Unfreeze (entity targ) { + if(!targ.frozen) + return; + if(targ.frozen && targ.frozen != 3) // only reset health if target was frozen targ.health = ((IS_PLAYER(targ)) ? start_health : targ.max_health); @@@ -612,7 -607,6 +611,7 @@@ targ.frozen = 0; targ.revive_progress = 0; targ.revival_time = time; + self.bot_attack = true; WaypointSprite_Kill(targ.waypointsprite_attached); @@@ -850,7 -844,7 +849,7 @@@ void Damage (entity targ, entity inflic else victim = targ; - if(IS_PLAYER(victim) || IS_TURRET(victim) || IS_MONSTER(victim)) + if(IS_PLAYER(victim) || (IS_TURRET(victim) && victim.active == ACTIVE_ACTIVE) || IS_MONSTER(victim) || MUTATOR_CALLHOOK(PlayHitsound, victim)) { if(DIFF_TEAM(victim, attacker) && !victim.frozen) {