diff --git a/cfg/base.cfg b/cfg/base.cfg deleted file mode 100644 index 47f32b5..0000000 --- a/cfg/base.cfg +++ /dev/null @@ -1,10 +0,0 @@ -// team management -mp_autokick 0 -mp_autoteambalance 0 -mp_limitteams 0 -mp_disconnect_kills_players 0 - -// voting -sv_allow_votes 0 - -sv_hibernate_when_empty 0 \ No newline at end of file diff --git a/cfg/knife.cfg b/cfg/knife.cfg deleted file mode 100644 index e2b2ac7..0000000 --- a/cfg/knife.cfg +++ /dev/null @@ -1,21 +0,0 @@ -exec 5stack.base.cfg - -// team management -mp_spectators_max 0 -sv_disable_teamselect_menu 1 - -// weapons / armor / money -mp_free_armor 1 -mp_maxmoney 0 -mp_give_player_c4 0 -mp_ct_default_secondary "" -mp_t_default_secondary "" - -// communication -sv_deadtalk 0 - -// round details -mp_freezetime 3 -mp_roundtime 60 -mp_team_intro_time 0 -mp_round_restart_delay 0 \ No newline at end of file diff --git a/cfg/live.cfg b/cfg/live.cfg deleted file mode 100644 index 38e8601..0000000 --- a/cfg/live.cfg +++ /dev/null @@ -1,37 +0,0 @@ -exec 5stack.base.cfg - -// team management -mp_spectators_max 0 -sv_disable_teamselect_menu 1 - -// weapons / armor / money -mp_free_armor 0 -mp_weapons_allow_typecount 5 -mp_give_player_c4 1 -mp_death_drop_gun 1 - -mp_ct_default_secondary weapon_hkp2000 -mp_t_default_secondary weapon_glock - -// communication -sv_deadtalk 0 - -mp_team_intro_time 6.5 - -mp_match_end_restart 0 - -mp_backup_round_auto 1 -mp_backup_restore_load_autopause 1 - -// https://drive.google.com/file/d/1ZMxPYAv__yDwI7rNTvCcB8ah_aPWV_gR/view - -mp_roundtime 1.92 -mp_maxmoney 16000 -mp_startmoney 800 -mp_freezetime 20 -mp_buytime 20 -mp_c4timer 40 -mp_overtime_maxrounds 6 -mp_overtime_startmoney 12500 -mp_round_restart_delay 5 -mp_items_prohibited "" \ No newline at end of file diff --git a/cfg/warmup.cfg b/cfg/warmup.cfg deleted file mode 100644 index f8d71bf..0000000 --- a/cfg/warmup.cfg +++ /dev/null @@ -1,22 +0,0 @@ -exec gamemode_competitive -exec 5stack.base.cfg - -// weapons / armor / money -mp_free_armor 1 -mp_maxmoney 60000 -mp_startmoney 60000 -mp_weapons_allow_typecount -1 -mp_give_player_c4 0 -mp_death_drop_gun 0 - -// team management -mp_spectators_max 10 -sv_disable_teamselect_menu 0 - -// communication -sv_deadtalk 1 - -// warmup -mp_warmuptime_all_players_connected 0 -mp_warmup_pausetimer 1 -mp_warmuptime 9999 diff --git a/src/FiveStack.Events/Bomb.cs b/src/FiveStack.Events/Bomb.cs index c37b4ab..4d2bd54 100644 --- a/src/FiveStack.Events/Bomb.cs +++ b/src/FiveStack.Events/Bomb.cs @@ -41,7 +41,7 @@ public HookResult BombPlaned(EventBombPlanted @event, GameEventInfo info) } [GameEventHandler] - public HookResult BombPlaned(EventBombDefused @event, GameEventInfo info) + public HookResult BombDefused(EventBombDefused @event, GameEventInfo info) { MatchManager? match = _matchService.GetCurrentMatch(); MatchData? matchData = match?.GetMatchData(); diff --git a/src/FiveStack.Events/PlayerDamage.cs b/src/FiveStack.Events/PlayerDamage.cs index 2574073..1d04408 100644 --- a/src/FiveStack.Events/PlayerDamage.cs +++ b/src/FiveStack.Events/PlayerDamage.cs @@ -38,6 +38,16 @@ public HookResult OnPlayerDamage(EventPlayerHurt @event, GameEventInfo info) var attackerLocation = attacker?.PlayerPawn.Value?.AbsOrigin; var attackedLocation = attacked?.PlayerPawn?.Value?.AbsOrigin; + var damageDealt = @event.DmgHealth; + + if (attacked != null) + { + if (attacked.PlayerPawn.Value.Health < 0) + { + damageDealt = damageDealt + attacked.PlayerPawn.Value.Health; + } + } + _matchEvents.PublishGameEvent( "damage", new Dictionary @@ -58,7 +68,7 @@ public HookResult OnPlayerDamage(EventPlayerHurt @event, GameEventInfo info) : "" }, { "weapon", $"{(@event.Weapon.Length == 0 ? "worldent" : @event.Weapon)}" }, - { "damage", @event.DmgHealth }, + { "damage", damageDealt }, { "damage_armor", @event.DmgArmor }, { "hitgroup", $"{DamageUtility.HitGroupToString(@event.Hitgroup)}" }, { "health", @event.Health },