no more death softlock
This commit is contained in:
		
							parent
							
								
									49b578405e
								
							
						
					
					
						commit
						89b277111a
					
				
					 3 changed files with 8 additions and 5 deletions
				
			
		|  | @ -46,7 +46,10 @@ function updatePlayer(data) | |||
|     { | ||||
|         player.x=data.x; | ||||
|         player.y=data.y; | ||||
|         player.z=data.z; | ||||
|         if(data.z==undefined) | ||||
|             player.z=0; | ||||
|         else | ||||
|             player.z=data.z; | ||||
|     } | ||||
|     else | ||||
|     { | ||||
|  | @ -57,8 +60,9 @@ function updatePlayer(data) | |||
|                 players[i].x=data.x; | ||||
|                 players[i].y=data.y; | ||||
|                 if(data.z==undefined) | ||||
|                     data.z=0; | ||||
|                 players[i].z=data.z; | ||||
|                     players[i].z=0; | ||||
|                 else | ||||
|                     players[i].z=data.z; | ||||
|                 players[i].dir=data.dir; | ||||
|                 players[i].visibleDir=data.visibleDir; | ||||
|                 break; | ||||
|  |  | |||
|  | @ -7,7 +7,6 @@ class Network{ | |||
| 
 | ||||
| 	message(data){ | ||||
| 		switch(data.type){ | ||||
| 			 | ||||
| 			case 'connect': | ||||
| 				this.playerId = data.data.playerId; | ||||
| 				for (let i = 0; i<data.data.players.length; i++) { | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue