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)
|
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)
|
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.x=this.out.x;
|
||||||
player.y=this.out.y;
|
player.y=this.out.y;
|
||||||
net.update(player);
|
net.update(player);
|
||||||
|
|
|
@ -25,6 +25,8 @@ function game() {
|
||||||
pnj.update(dt);
|
pnj.update(dt);
|
||||||
})
|
})
|
||||||
|
|
||||||
|
portals.forEach((portal) => {portal.update();});
|
||||||
|
|
||||||
updateBullets(dt);
|
updateBullets(dt);
|
||||||
renderer.ReloadAff();
|
renderer.ReloadAff();
|
||||||
LB.ReloadAff();
|
LB.ReloadAff();
|
||||||
|
|
|
@ -20,7 +20,7 @@ let PNJS = [new PNJ(500, 100,0),
|
||||||
new Car(1, 14),
|
new Car(1, 14),
|
||||||
new Car(0, 7),
|
new Car(0, 7),
|
||||||
new Car(0, 15)];
|
new Car(0, 15)];
|
||||||
let portals = [];
|
let portals = [new Portal(100,100,0,500,500,0)];
|
||||||
let maps = [];
|
let maps = [];
|
||||||
|
|
||||||
players.push(new Player(-1,-50,-50,-1,"VOITURES",0));
|
players.push(new Player(-1,-50,-50,-1,"VOITURES",0));
|
||||||
|
@ -58,14 +58,6 @@ function addPlayer(data)
|
||||||
players.push(np);
|
players.push(np);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function removePlayer(id)
|
function removePlayer(id)
|
||||||
{
|
{
|
||||||
for(let i=0;i<players.length;i++)
|
for(let i=0;i<players.length;i++)
|
||||||
|
|
Loading…
Reference in a new issue