Commit c3c6fda7 authored by Colomban Wendling's avatar Colomban Wendling
Browse files

Fix tile duplication

Don't forget to also copy TileObjects.
parent 66608b0e
......@@ -75,7 +75,12 @@ namespace OVCC
public Tile dup ()
{
return new Tile (this.id, this._objects);
SList<TileObject> objs = null;
foreach (var o in this._objects) {
objs.prepend (o.dup ());
}
objs.reverse ();
return new Tile (this.id, objs);
}
/**
......
......@@ -76,6 +76,11 @@ namespace OVCC
Object (name: name, otype: type, attributes: attributes, links: links);
}
public TileObject dup ()
{
return new TileObject (this.name, this.otype, this.attributes, this._links);
}
public void rotate (int steps)
{
var wise = Utils.clock_mod (steps, 4) * 3;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment