]> de.git.xonotic.org Git - voretournament/voretournament.git/commitdiff
Damage offset for bots depending on skill. Needs to be balanced better
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Thu, 15 Mar 2012 23:52:05 +0000 (01:52 +0200)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Thu, 15 Mar 2012 23:52:05 +0000 (01:52 +0200)
data/botsVT.cfg
data/qcsrc/server/g_damage.qc
docs/Release notes.txt
docs/TODO.txt

index cf3757b06a67b5f33b55341e08be96099059996b..74349ebf6b555388f93ba4d8d3e5a1c903e4ea57 100644 (file)
@@ -7,6 +7,8 @@ set bot_god 0   "When set, all bots are god mode (take no damage)"
 seta bot_prefix ^8[BOT]^7      "Prefix in front of the bot names"\r
 seta bot_suffix ""     "Suffix behind the bot names"\r
 seta skill_auto 0      "when 1, \"skill\" gets adjusted to match the best player on the map"\r
 seta bot_prefix ^8[BOT]^7      "Prefix in front of the bot names"\r
 seta bot_suffix ""     "Suffix behind the bot names"\r
 seta skill_auto 0      "when 1, \"skill\" gets adjusted to match the best player on the map"\r
+seta skill_damage 1.1 "the greater or lower the skill, the more / less damage bots will do or take"\r
+seta skill_damage_center 5 "center skill around which to apply the damage offset"\r
 \r
 set bot_navigation_ignoreplayers 0 // FIXME remove this once the issue is solved\r
 set bot_sound_monopoly 0 "when enabled, only bots can make any noise"\r
 \r
 set bot_navigation_ignoreplayers 0 // FIXME remove this once the issue is solved\r
 set bot_sound_monopoly 0 "when enabled, only bots can make any noise"\r
index 4b304b89eb8fcc4b7da34d84ccd720786b503432..f28095d0ef6a7638b41f48a1a7f901b8e463bdf9 100644 (file)
@@ -798,6 +798,18 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, float
                        force = force * cvar("g_ctf_flagcarrier_selfforce");\r
                }\r
 \r
                        force = force * cvar("g_ctf_flagcarrier_selfforce");\r
                }\r
 \r
+               // skill-based damage offset for bots\r
+               if(skill && cvar("skill_damage"))\r
+               {\r
+                       float ofs;\r
+                       ofs = pow(skill / cvar("skill_damage_center"), cvar("skill_damage"));\r
+                       if(clienttype(attacker) == CLIENTTYPE_BOT)\r
+                               damage *= ofs;\r
+                       if(clienttype(targ) == CLIENTTYPE_BOT)\r
+                               damage /= ofs;\r
+dprint(strcat(ftos(ofs), " --------\n"));\r
+               }\r
+\r
                // count the damage\r
                if(attacker)\r
                if(!targ.deadflag)\r
                // count the damage\r
                if(attacker)\r
                if(!targ.deadflag)\r
index 8af4e482322d25cbb7ba7d935ad54d1e1596acee..0229f8c58bd1842146d08b2574fac3a4de6ee7ea 100644 (file)
@@ -300,6 +300,8 @@ Features:
 \r
 - Bootable subsystems. The crosshair, HUD, and helper voice will take 2 seconds to startup when the player spawns. Also, if armor (now considered charge) is below 5, you will not have enough energy to run your subsystems, and must wait for your armor to recharge.\r
 \r
 \r
 - Bootable subsystems. The crosshair, HUD, and helper voice will take 2 seconds to startup when the player spawns. Also, if armor (now considered charge) is below 5, you will not have enough energy to run your subsystems, and must wait for your armor to recharge.\r
 \r
+- Skill based damage for bots. The higher the skill, the more damage bots do and the less they take. At the highest skill, bots are extremely difficult to defeat. Does not apply to campaign.\r
+\r
 - The Grabber now has a screen which displays ammo count as well as weapon load.\r
 \r
 - Improvements to the vixen mesh. Models have been switched from zym to iqm (better and newer format), polygon count has been doubled, stomach bulges are more detailed, and the vixens are a bit more chubby and fluffy.\r
 - The Grabber now has a screen which displays ammo count as well as weapon load.\r
 \r
 - Improvements to the vixen mesh. Models have been switched from zym to iqm (better and newer format), polygon count has been doubled, stomach bulges are more detailed, and the vixens are a bit more chubby and fluffy.\r
index aa2f09d097a46109d00bad71c03d890c46f00341..5799fc545926790000f86962f5b9176bf3fee71c 100644 (file)
 \r
 - 0.8: Scoreboard doesn't show when HUD is disabled (sbar_hudselector is 0)\r
 \r
 \r
 - 0.8: Scoreboard doesn't show when HUD is disabled (sbar_hudselector is 0)\r
 \r
-- 0.8: Weapons menu: Center setting for the gun?
\ No newline at end of file
+- 0.8: Weapons menu: Center setting for the gun?\r
+\r
+- 0.7: Why does bot_number still get stuck at 7?
\ No newline at end of file