From e541cf3db3f7ec8951c7df67020e46a85ad7cd5f Mon Sep 17 00:00:00 2001 From: Ray Greenwell Date: Wed, 7 Jun 2006 18:48:47 +0000 Subject: [PATCH] More generically clone ourselves. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4178 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- src/as/com/threerings/whirled/spot/data/Portal.as | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/as/com/threerings/whirled/spot/data/Portal.as b/src/as/com/threerings/whirled/spot/data/Portal.as index cc0b87a9c..5805661f9 100644 --- a/src/as/com/threerings/whirled/spot/data/Portal.as +++ b/src/as/com/threerings/whirled/spot/data/Portal.as @@ -21,6 +21,7 @@ package com.threerings.whirled.spot.data { +import com.threerings.util.ClassUtil; import com.threerings.util.Cloneable; import com.threerings.io.Streamable; @@ -109,7 +110,8 @@ public class Portal // documentation inherited from interface Cloneable public function clone () :Object { - var p :Portal = new Portal(); + var clazz :Class = ClassUtil.getClass(this); + var p :Portal = new clazz(); p.portalId = portalId; p.loc = loc; p.targetSceneId = targetSceneId;