Selaa lähdekoodia

bug: Fixed a crash when using relative portals

tags/v0.9.1.1^2
Shaun 2 vuotta sitten
vanhempi
commit
72a9e3a671
1 muutettua tiedostoa jossa 7 lisäystä ja 0 poistoa
  1. +7
    -0
      src/server/components/portal/sendObjToZone.js

+ 7
- 0
src/server/components/portal/sendObjToZone.js Näytä tiedosto

@@ -4,6 +4,13 @@ const sendObjToZone = async ({ obj, invokingObj, zoneName, toPos, toRelativePos
if (obj.zoneName === zoneName) {
physics.removeObject(obj, obj.x, obj.y);

if (toRelativePos) {
toPos = {
x: invokingObj.obj.x + toRelativePos.x,
y: invokingObj.obj.y + toRelativePos.y
};
}

obj.x = toPos.x;
obj.y = toPos.y;



Ladataan…
Peruuta
Tallenna