File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ export default async function runScenario(game: Game) {
41
41
}
42
42
const gameInstance = game . netGameInstance ;
43
43
const parent = game . viewport ;
44
- const world = game . world as NetGameWorld ;
44
+ const world = game . world ;
45
45
const { worldWidth } = game . viewport ;
46
46
const wormInstances = new Map < string , Worm > ( ) ;
47
47
@@ -323,10 +323,12 @@ export default async function runScenario(game: Game) {
323
323
. subscribe ( ( [ roundState , worm ] ) => {
324
324
if (
325
325
worm ?. team . playerUserId === gameInstance . myUserId &&
326
- roundState === RoundState . Preround
326
+ roundState === RoundState . Preround &&
327
+ world instanceof NetGameWorld
327
328
) {
328
329
world . setBroadcasting ( true ) ;
329
- } else if ( roundState === RoundState . Finished ) {
330
+ } else if ( roundState === RoundState . Finished &&
331
+ world instanceof NetGameWorld ) {
330
332
world . setBroadcasting ( false ) ;
331
333
}
332
334
log . info ( "Round state sub fired for" , roundState , worm ) ;
You can’t perform that action at this time.
0 commit comments