diff --git a/public_html/js/class.js b/public_html/js/class.js
index 5ae557a..531895e 100644
--- a/public_html/js/class.js
+++ b/public_html/js/class.js
@@ -213,7 +213,7 @@ class Car
let collide = (cx<=x && x<=cx+carSize && cy<=y && y<=cy+carSize);
if(collide) {
driftSound.play()
- this.drift=75*dt;
+ this.drift=1000;
}
return collide;
}
@@ -245,6 +245,8 @@ class Car
}
if(this.drift > 0) {
this.drift-=dt;
+ }else{
+ this.drift = 0;
}
}
diff --git a/public_html/js/render.js b/public_html/js/render.js
index d8ce177..ceb0880 100644
--- a/public_html/js/render.js
+++ b/public_html/js/render.js
@@ -118,8 +118,9 @@ class Render {
this.ctx.canvas.height = mapHeight;
this.ctx.drawImage(fond, 0, 0, mapWidth, mapHeight);
this.RenderPlayer(player,true);
+
cars.forEach((car) => {
- this.RenderCar(car.x,car.y,car.angle+(car.drift>0?car.drift/200:0));
+ this.RenderCar(car.x,car.y,car.angle+(car.drift>0?car.drift/150:0));
});
players.forEach((player) => {
this.RenderPlayer(player,false);