fix:la syntaxe !!!!
This commit is contained in:
		
							parent
							
								
									d075d532d7
								
							
						
					
					
						commit
						79622b5bfe
					
				
					 1 changed files with 10 additions and 6 deletions
				
			
		|  | @ -98,10 +98,11 @@ function updatePlayer(data) | ||||||
|     { |     { | ||||||
|         player.x=data.x; |         player.x=data.x; | ||||||
|         player.y=data.y; |         player.y=data.y; | ||||||
|         if(data.z==undefined) |         if(data.z==undefined){ | ||||||
|             player.z=0; |             player.z=0; | ||||||
|         else |         } else { | ||||||
|             player.z=data.z; |             player.z=data.z; | ||||||
|  |         } | ||||||
|     } |     } | ||||||
|     else |     else | ||||||
|     { |     { | ||||||
|  | @ -111,10 +112,11 @@ function updatePlayer(data) | ||||||
|             { |             { | ||||||
|                 players[i].x=data.x; |                 players[i].x=data.x; | ||||||
|                 players[i].y=data.y; |                 players[i].y=data.y; | ||||||
|                 if(data.z==undefined) |                 if(data.z==undefined){ | ||||||
|                     players[i].z=0; |                     players[i].z=0; | ||||||
|                 else |                 } else { | ||||||
|                     players[i].z=data.z; |                     players[i].z=data.z; | ||||||
|  |                 } | ||||||
|                 players[i].dir=data.dir; |                 players[i].dir=data.dir; | ||||||
|                 players[i].visibleDir=data.visibleDir; |                 players[i].visibleDir=data.visibleDir; | ||||||
|                 break; |                 break; | ||||||
|  | @ -150,10 +152,12 @@ function addKill(idKilled,idKiller) | ||||||
|         player.death++; |         player.death++; | ||||||
|     } |     } | ||||||
|     players.forEach((p) => { |     players.forEach((p) => { | ||||||
|         if(p.id==idKilled) |         if(p.id==idKilled) { | ||||||
|             p.death++; |             p.death++; | ||||||
|         if(p.id==idKiller) |         } | ||||||
|  |         if(p.id==idKiller) { | ||||||
|             p.kill++; |             p.kill++; | ||||||
|  |         } | ||||||
|     }); |     }); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue