From 0195e23f2d2a70eaa305d07e5fe9da4a6fc1e225 Mon Sep 17 00:00:00 2001 From: Jbleezy Date: Wed, 22 Mar 2023 20:49:46 -0700 Subject: [PATCH] Zombies: all body shot kills award 50 points --- README.md | 3 ++- scripts/zm/_zm_reimagined.gsc | 1 + scripts/zm/replaced/_zm_score.gsc | 36 +++++++++++++++++++++++++++++++ 3 files changed, 39 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index add7072d..8662a16b 100644 --- a/README.md +++ b/README.md @@ -72,6 +72,7 @@ * Removed walkers in high rounds * Removed headless zombies * Neck counts as headshot +* All body shot kills award 50 points ### Denizens * Decreased maximum amount that can be spawned at once from 2 to 1 @@ -471,7 +472,7 @@ * Zombies spawn in the Docks zone when in the Docks Gates zone * Zombies spawn in the Docks Gates zone when in the Docks zone * Grief: added Smoke Grenades to the Mystery Box -* Grief: added Richtofen Head meat powerup model +* Grief: added Richtofen's Head meat powerup model * Grief: Brutus spawns every 4-6 minutes * Grief: Brutus can lock perks and the Mystery Box * Fixed being able to hit a death barrier when jumping off the Upper Docks diff --git a/scripts/zm/_zm_reimagined.gsc b/scripts/zm/_zm_reimagined.gsc index fe2fd056..e96885a0 100644 --- a/scripts/zm/_zm_reimagined.gsc +++ b/scripts/zm/_zm_reimagined.gsc @@ -44,6 +44,7 @@ main() replaceFunc(maps\mp\zombies\_zm_utility::create_zombie_point_of_interest_attractor_positions, scripts\zm\replaced\_zm_utility::create_zombie_point_of_interest_attractor_positions); replaceFunc(maps\mp\zombies\_zm_score::add_to_player_score, scripts\zm\replaced\_zm_score::add_to_player_score); replaceFunc(maps\mp\zombies\_zm_score::minus_to_player_score, scripts\zm\replaced\_zm_score::minus_to_player_score); + replaceFunc(maps\mp\zombies\_zm_score::player_add_points_kill_bonus, scripts\zm\replaced\_zm_score::player_add_points_kill_bonus); replaceFunc(maps\mp\zombies\_zm_laststand::revive_do_revive, scripts\zm\replaced\_zm_laststand::revive_do_revive); replaceFunc(maps\mp\zombies\_zm_laststand::revive_give_back_weapons, scripts\zm\replaced\_zm_laststand::revive_give_back_weapons); replaceFunc(maps\mp\zombies\_zm_laststand::revive_hud_think, scripts\zm\replaced\_zm_laststand::revive_hud_think); diff --git a/scripts/zm/replaced/_zm_score.gsc b/scripts/zm/replaced/_zm_score.gsc index 55eff4a7..687b9532 100644 --- a/scripts/zm/replaced/_zm_score.gsc +++ b/scripts/zm/replaced/_zm_score.gsc @@ -1,6 +1,7 @@ #include maps\mp\_utility; #include common_scripts\utility; #include maps\mp\zombies\_zm_utility; +#include maps\mp\zombies\_zm_score; add_to_player_score( points, add_to_total ) { @@ -31,4 +32,39 @@ minus_to_player_score( points ) points = int(points); // points must be an int self.score -= points; self.pers[ "score" ] = self.score; +} + +player_add_points_kill_bonus( mod, hit_location ) +{ + if ( mod == "MOD_MELEE" ) + { + self score_cf_increment_info( "death_melee" ); + return level.zombie_vars["zombie_score_bonus_melee"]; + } + + if ( mod == "MOD_BURNED" ) + { + self score_cf_increment_info( "death_torso" ); + return level.zombie_vars["zombie_score_bonus_burn"]; + } + + score = 0; + + if ( isdefined( hit_location ) ) + { + switch ( hit_location ) + { + case "helmet": + case "head": + case "neck": + self score_cf_increment_info( "death_head" ); + score = level.zombie_vars["zombie_score_bonus_head"]; + break; + default: + self score_cf_increment_info( "death_normal" ); + break; + } + } + + return score; } \ No newline at end of file