File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,7 @@ import {
4747} from "./Transport" ;
4848import { createCanvas } from "./Utils" ;
4949import { createRenderer , GameRenderer } from "./graphics/GameRenderer" ;
50+ import { GoToPlayerEvent } from "./graphics/layers/Leaderboard" ;
5051import SoundManager from "./sound/SoundManager" ;
5152
5253export interface LobbyConfig {
@@ -314,6 +315,19 @@ export class ClientGameRunner {
314315 if ( message . type === "start" ) {
315316 this . hasJoined = true ;
316317 console . log ( "starting game!" ) ;
318+
319+ if ( this . gameView . isRandomSpawn ( ) ) {
320+ setTimeout ( ( ) => {
321+ const myPlayer = this . gameView . myPlayer ( ) ;
322+
323+ if ( ! myPlayer ) {
324+ return ;
325+ }
326+
327+ this . eventBus . emit ( new GoToPlayerEvent ( myPlayer ) ) ;
328+ } , 1000 ) ;
329+ }
330+
317331 for ( const turn of message . turns ) {
318332 if ( turn . turnNumber < this . turnsSeen ) {
319333 continue ;
You can’t perform that action at this time.
0 commit comments