1
0
mirror of https://github.com/JezuzLizard/BO2-Reimagined.git synced 2025-06-11 15:48:05 -05:00

Encounter: improve headstomp code

This commit is contained in:
Jbleezy
2022-02-08 15:00:57 -08:00
parent fb324e04e3
commit bb89ffb3d1
2 changed files with 9 additions and 15 deletions

View File

@ -458,8 +458,8 @@
* Landing on top of an enemy player downs only the bottom player
* Landing on top of an enemy player can be done at any stance
* Increased max radius for landing on top of an enemy player by 16.67%
* Decreased max height for landing on top of an enemy player that is crouched by 13%
* Decreased max height for landing on top of an enemy player that is prone by 47%
* Decreased max height for landing on top of an enemy player that is crouched by 8.33%
* Decreased max height for landing on top of an enemy player that is prone by 50%
* Max Ammo: decreased amount of ammo given from max stock to one clip
* Max Ammo: unloads clip of all enemy players' weapons
* Double Points: decreased duration from 30 seconds to 15 seconds

View File

@ -959,21 +959,15 @@ headstomp_watcher()
players = get_players();
foreach(player in players)
{
if(player != self && player.team != self.team && is_player_valid(player) && player isOnGround() && self.origin[2] > player getCentroid()[2])
player_top_origin = player getEye();
if(player getStance() == "prone")
{
max_horz_dist = 21;
max_vert_dist = 36;
player_top_origin = player getCentroid();
}
if(player getStance() == "crouch")
{
max_vert_dist -= 10;
}
else if(player getStance() == "prone")
{
max_vert_dist -= 20;
}
if(distance2d(self.origin, player.origin) <= max_horz_dist && (self.origin[2] - player getCentroid()[2]) <= max_vert_dist)
if(player != self && player.team != self.team && is_player_valid(player) && player isOnGround() && self.origin[2] > player_top_origin[2])
{
if(distance2d(self.origin, player.origin) <= 21 && (self.origin[2] - player_top_origin[2]) <= 15)
{
player store_player_damage_info(self, "none", "MOD_FALLING");
player dodamage( 1000, (0, 0, 0) );