Skip to content

Commit

Permalink
Merge branch 'SirPlease:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
altair-sossai authored Sep 8, 2024
2 parents 02c1064 + 259074e commit 8ec02a7
Show file tree
Hide file tree
Showing 8 changed files with 2,741 additions and 2 deletions.
Binary file modified addons/sourcemod/plugins/fixes/l4d2_charge_target_fix.smx
Binary file not shown.
41 changes: 40 additions & 1 deletion addons/sourcemod/scripting/l4d2_charge_target_fix.sp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <dhooks>
#include <left4dhooks>

#define PLUGIN_VERSION "1.8"
#define PLUGIN_VERSION "1.10"

public Plugin myinfo =
{
Expand Down Expand Up @@ -104,6 +104,8 @@ public void OnPluginStart()
HookEvent("round_start", Event_RoundStart);
HookEvent("player_incapacitated", Event_PlayerIncap);
HookEvent("player_death", Event_PlayerDeath);
HookEvent("charger_carry_start", Event_ChargerCarryStart);
HookEvent("charger_carry_end", Event_ChargerCarryEnd);
HookEvent("charger_pummel_end", Event_ChargerPummelEnd);
HookEvent("charger_killed", Event_ChargerKilled);
HookEvent("player_bot_replace", Event_PlayerBotReplace);
Expand Down Expand Up @@ -228,6 +230,32 @@ void Event_PlayerDeath(Event event, const char[] name, bool dontBroadcast)
g_iChargeAttacker[client] = -1;
}

void Event_ChargerCarryStart(Event event, const char[] name, bool dontBroadcast)
{
int victim = GetClientOfUserId(event.GetInt("victim"));
if (!victim || !IsClientInGame(victim))
return;

int attacker = GetClientOfUserId(event.GetInt("userid"));
if (!attacker || !IsClientInGame(attacker))
return;

SetEntPropFloat(victim, Prop_Send, "m_jumpSupressedUntil", GetGameTime() + 0.5);
}

void Event_ChargerCarryEnd(Event event, const char[] name, bool dontBroadcast)
{
int victim = GetClientOfUserId(event.GetInt("victim"));
if (!victim || !IsClientInGame(victim))
return;

int attacker = GetClientOfUserId(event.GetInt("userid"));
if (!attacker || !IsClientInGame(attacker))
return;

SetEntPropFloat(victim, Prop_Send, "m_jumpSupressedUntil", GetGameTime() + 0.3);
}

// Calls if charger has started pummelling.
void Event_ChargerPummelEnd(Event event, const char[] name, bool dontBroadcast)
{
Expand Down Expand Up @@ -360,6 +388,17 @@ void HandlePlayerReplace(int replacer, int replacee)
g_iChargeVictim[replacer] = g_iChargeVictim[replacee];
g_iChargeAttacker[g_iChargeVictim[replacee]] = replacer;
g_iChargeVictim[replacee] = -1;

if (L4D2_IsInQueuedPummel(replacee))
{
float flQueuedPummelTime = L4D2_GetQueuedPummelStartTime(replacee);
L4D2_SetQueuedPummelStartTime(replacer, flQueuedPummelTime);
L4D2_SetQueuedPummelAttacker(g_iChargeVictim[replacer], replacer);
L4D2_SetQueuedPummelVictim(replacer, g_iChargeVictim[replacer]);

L4D2_SetQueuedPummelStartTime(replacee, -1.0);
L4D2_SetQueuedPummelVictim(replacee, -1);
}
}
}
else
Expand Down
60 changes: 59 additions & 1 deletion cfg/cfgogl/zonemod/mapinfo.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2925,7 +2925,65 @@
"pain_pills" "4"
}
}


//=======================================================================
//=============== Dead Center Rebirth 死亡中心-重生
"dcr_m1_hotel"
{
"start_point" "427.606232 5739.467773 2926.982178"
"end_point" "2045.685913 4429.264160 1246.031250"
"start_dist" "100.000000"
"start_extra_dist" "0.000000"
"end_dist" "200.000000"
"max_distance" "400"
"tank_ban_flow"
{
"1"
{
"min" "0"
"max" "21"
}
"2"
{
"min" "37"
"max" "100"
}
}
}
"dcr_m2_streets"
{
"start_point" "2395.007813 4964.173340 522.224670"
"end_point" "-7688.886230 -4694.720703 463.251282"
"start_dist" "50.000000"
"start_extra_dist" "250.000000"
"end_dist" "200.000000"

}
"dcr_m3_mall"
{
"start_point" "6520.577148 -1477.425659 103.001579"
"end_point" "-2182.585938 -4630.097168 615.226501"
"start_dist" "50.000000"
"start_extra_dist" "150.000000"
"end_dist" "200.000000"
"tank_ban_flow"
{
"Event"
{
"min" "52"
"max" "68"
}
}
}
"dcr_m4_atrium"
{
"start_point" "-2207.119141 -4694.244141 615.226318"
"end_point" "-4467.291016 -4060.759277 88.031250"
"start_dist" "50.000000"
"start_extra_dist" "150.000000"
"end_dist" "150.000000"
}

//-------- ↓↓↓ you can add custom info here ↓↓↓


Expand Down
2 changes: 2 additions & 0 deletions cfg/cfgogl/zonemod/shared_settings.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ spit_block_square l4d2_stadium1_apartment 268 587 409 417 // In the elevator (RB
spit_block_square l4d2_ff03_highway 5576 2024 5808 2176 //fatal freight m3 elevator
spit_block_square l4d2_city17_02 4524 3532 4660 3636 //city17 m2 elevator
spit_block_square noecho_m1 -4968 -256 -4800 -84 //no echo match m1 elevator
spit_block_square dcr_m2_streets -65 1538 48 1586 //dead center rebirth , map2 , elevator

// [l4d2_godframes_control.smx + l4d2_getup_fixes.smx]
confogl_addcvar gfc_hittable_override 1
Expand Down Expand Up @@ -346,6 +347,7 @@ static_tank_map dkr_m4_ferris
static_tank_map dkr_m5_stadium
static_tank_map cdta_05finalroad
static_tank_map l4d_dbd2dc_new_dawn
static_tank_map dcr_m4_atrium

// Finales with flow + second event Tanks
tank_map_flow_and_second_event c2m5_concert
Expand Down
Loading

0 comments on commit 8ec02a7

Please sign in to comment.