diff --git a/src/dashboard/setup/server/server.tsx b/src/dashboard/setup/server/server.tsx index 0b86334..bb947aa 100644 --- a/src/dashboard/setup/server/server.tsx +++ b/src/dashboard/setup/server/server.tsx @@ -13,7 +13,6 @@ import { ThemeProvider } from '@material-ui/styles'; // Interfaces import { bundleStatus as ExampleBundle } from '../../../extension/example-data'; import { BundleStatus } from '../../../types/bundle-status'; -import { Button } from '@material-ui/core'; const HlaeActive = styled.div` width: 100%; @@ -55,14 +54,6 @@ export const Server: React.FunctionComponent = () => { } }, [bundleStatus]); - /* - This button should only be used for dev - Match kills should be cleared at the end of a match or when a new one is started - */ - function resetMatchKills() { - nodecg.sendMessage('resetMatchKills'); - } - return ( { HLAE is currently {hlaeActiveRep ? 'active' : 'inactive'} - ); }; diff --git a/src/extension/matches.ts b/src/extension/matches.ts index c5abb5c..7e9f7c8 100644 --- a/src/extension/matches.ts +++ b/src/extension/matches.ts @@ -5,12 +5,14 @@ import _ from 'lodash'; import { MapInfo, Match, Matches, NewMatch } from '../types/matches'; import { TeamsPreset } from '../types/team-preset'; import { CSGO } from '../types/csgo-gsi'; +import { PlayerDeath } from '../types/hlae'; const nodecg = nodecgApiContext.get(); const currentMatchRep = nodecg.Replicant('currentMatch'); const matchesRep = nodecg.Replicant('matches'); const teamsRep = nodecg.Replicant('teamPlayerPreset'); const round30Winner = nodecg.Replicant('round30Winner'); +const matchKills = nodecg.Replicant('matchKills'); // If no current match set then start at the very beginning, a very good place to start if (!currentMatchRep.value) { @@ -36,6 +38,7 @@ nodecg.listenFor('nextMatch', () => { } currentMatchRep.value = _.cloneDeep(matchesRep.value[currentMatchIndex + 1]); + matchKills.value = []; // Clear match kills since we are on a new one now }); nodecg.listenFor('prevMatch', () => {