We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0e66f4e commit f6ec93bCopy full SHA for f6ec93b
1 file changed
src/vscripts/GameMode.ts
@@ -43,7 +43,9 @@ export class GameMode {
43
44
// Also apply the panic modifier to the sending player's hero
45
const hero = player.GetAssignedHero();
46
- hero.AddNewModifier(hero, undefined, modifier_panic.name, { duration: 5 });
+ if (hero != undefined) { // Hero didn't spawn yet or dead
47
+ hero.AddNewModifier(hero, undefined, modifier_panic.name, { duration: 5 });
48
+ }
49
});
50
}
51
0 commit comments