mirror of
https://github.com/demostf/demo.js
synced 2026-06-04 00:54:14 +02:00
reset buildings on round start
This commit is contained in:
parent
88d4815bae
commit
dfce4fd6a1
1 changed files with 6 additions and 2 deletions
|
|
@ -54,9 +54,13 @@ export function handleGameEvent(packet: GameEventPacket, match: Match) {
|
|||
userState.classes[classId]++;
|
||||
}
|
||||
break;
|
||||
case 'object_destroyed':{
|
||||
case 'object_destroyed': {
|
||||
const values = <ObjectDestroyedValues>packet.event.values;
|
||||
delete match.buildings[values.index];
|
||||
}
|
||||
break;
|
||||
case 'teamplay_round_start':
|
||||
match.buildings = {};
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue