thiS -> this
This commit is contained in:
parent
655ccde173
commit
85690cf305
3 changed files with 5 additions and 11 deletions
|
@ -441,7 +441,7 @@ class PNJ{
|
|||
}
|
||||
}
|
||||
|
||||
class portalIn
|
||||
class Portal
|
||||
{
|
||||
constructor(xIn,yIn,zIn,xOut,yOut,zOut)
|
||||
{
|
||||
|
@ -453,7 +453,7 @@ class portalIn
|
|||
{
|
||||
if(player.z==this.in.z && player.x>this.in.x && player.x<this.in.x+portalSize && player.y>this.in.y && player.y<this.in.y+portalSize)
|
||||
{
|
||||
player.z=thiS.out.z;
|
||||
player.z=this.out.z;
|
||||
player.x=this.out.x;
|
||||
player.y=this.out.y;
|
||||
net.update(player);
|
||||
|
|
|
@ -25,6 +25,8 @@ function game() {
|
|||
pnj.update(dt);
|
||||
})
|
||||
|
||||
portals.forEach((portal) => {portal.update();});
|
||||
|
||||
updateBullets(dt);
|
||||
renderer.ReloadAff();
|
||||
LB.ReloadAff();
|
||||
|
|
|
@ -20,7 +20,7 @@ let PNJS = [new PNJ(500, 100,0),
|
|||
new Car(1, 14),
|
||||
new Car(0, 7),
|
||||
new Car(0, 15)];
|
||||
let portals = [];
|
||||
let portals = [new Portal(100,100,0,500,500,0)];
|
||||
let maps = [];
|
||||
|
||||
players.push(new Player(-1,-50,-50,-1,"VOITURES",0));
|
||||
|
@ -58,14 +58,6 @@ function addPlayer(data)
|
|||
players.push(np);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function removePlayer(id)
|
||||
{
|
||||
for(let i=0;i<players.length;i++)
|
||||
|
|
Loading…
Reference in a new issue