portal vitesse angulaire fix
This commit is contained in:
		
							parent
							
								
									39ad0953d0
								
							
						
					
					
						commit
						e4aae45f36
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		|  | @ -129,7 +129,6 @@ class Render { | |||
| 
 | ||||
| 	RenderPortal(x,y) | ||||
| 	{ | ||||
| 		this.timer=(this.timer+0.1)%360 | ||||
| 	    this.ctx.save(); | ||||
| 	    this.ctx.translate(x+portalSize/2, y+portalSize/2); | ||||
| 	    this.ctx.rotate(this.timer * Math.PI / 180); | ||||
|  | @ -201,8 +200,9 @@ class Render { | |||
| 		PNJS.forEach((pnj)=>{ | ||||
| 			this.RenderPnj(pnj.x, pnj.y, pnj.z, (pnj.dir-1)*Math.PI/4, pnj.dir!=0); | ||||
| 		}) | ||||
| 		portals.forEach((portal) => { | ||||
| 
 | ||||
| 		this.timer=(this.timer+1)%360 | ||||
| 		portals.forEach((portal) => { | ||||
| 			if(portal.in.z==player.z) { | ||||
| 				this.RenderPortal(portal.in.x,portal.in.y) | ||||
| 			} | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue