mirror of
https://git.do.srb2.org/STJr/ZoneBuilder.git
synced 2024-11-10 06:41:49 +00:00
Fixed an issue where thing positions were modified even when the new position was the same as the old one. Fixes #644
This commit is contained in:
parent
22dfd69bbf
commit
b48806838d
1 changed files with 23 additions and 21 deletions
|
@ -417,39 +417,41 @@ namespace CodeImp.DoomBuilder.Map
|
||||||
// NOTE: This does not update sector! (call DetermineSector)
|
// NOTE: This does not update sector! (call DetermineSector)
|
||||||
public void Move(Vector3D newpos)
|
public void Move(Vector3D newpos)
|
||||||
{
|
{
|
||||||
BeforePropsChange();
|
if (newpos != pos)
|
||||||
|
{
|
||||||
|
BeforePropsChange();
|
||||||
|
|
||||||
// Change position
|
// Change position
|
||||||
this.pos = newpos;
|
this.pos = newpos;
|
||||||
|
|
||||||
if(SRB2Type != General.Map.Config.Start3DModeThingType)
|
if (SRB2Type != General.Map.Config.Start3DModeThingType)
|
||||||
General.Map.IsChanged = true;
|
General.Map.IsChanged = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// This moves the thing
|
// This moves the thing
|
||||||
// NOTE: This does not update sector! (call DetermineSector)
|
// NOTE: This does not update sector! (call DetermineSector)
|
||||||
public void Move(Vector2D newpos)
|
public void Move(Vector2D newpos)
|
||||||
{
|
{
|
||||||
BeforePropsChange();
|
Vector3D p = new Vector3D(newpos.x, newpos.y, pos.z);
|
||||||
|
|
||||||
// Change position
|
if (p != pos)
|
||||||
this.pos = new Vector3D(newpos.x, newpos.y, pos.z);
|
{
|
||||||
|
BeforePropsChange();
|
||||||
|
|
||||||
if(SRB2Type != General.Map.Config.Start3DModeThingType)
|
// Change position
|
||||||
General.Map.IsChanged = true;
|
this.pos = p;
|
||||||
|
|
||||||
|
if (SRB2Type != General.Map.Config.Start3DModeThingType)
|
||||||
|
General.Map.IsChanged = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// This moves the thing
|
// This moves the thing
|
||||||
// NOTE: This does not update sector! (call DetermineSector)
|
// NOTE: This does not update sector! (call DetermineSector)
|
||||||
public void Move(float x, float y, float zoffset)
|
public void Move(float x, float y, float zoffset)
|
||||||
{
|
{
|
||||||
BeforePropsChange();
|
Move(new Vector3D(x, y, zoffset));
|
||||||
|
|
||||||
// Change position
|
|
||||||
this.pos = new Vector3D(x, y, zoffset);
|
|
||||||
|
|
||||||
if(SRB2Type != General.Map.Config.Start3DModeThingType)
|
|
||||||
General.Map.IsChanged = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// This rotates the thing
|
// This rotates the thing
|
||||||
|
|
Loading…
Reference in a new issue