aboutsummaryrefslogtreecommitdiff
path: root/js/lib/rdge/materials/square-tunnel-material.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/lib/rdge/materials/square-tunnel-material.js')
-rw-r--r--js/lib/rdge/materials/square-tunnel-material.js13
1 files changed, 7 insertions, 6 deletions
diff --git a/js/lib/rdge/materials/square-tunnel-material.js b/js/lib/rdge/materials/square-tunnel-material.js
index f81602f0..78cd45d4 100644
--- a/js/lib/rdge/materials/square-tunnel-material.js
+++ b/js/lib/rdge/materials/square-tunnel-material.js
@@ -31,16 +31,17 @@ var SquareTunnelMaterial = function SquareTunnelMaterial() {
31 /////////////////////////////////////////////////////////////////////// 31 ///////////////////////////////////////////////////////////////////////
32 // duplcate method requirde 32 // duplcate method requirde
33 this.dup = function (world) { 33 this.dup = function (world) {
34 // allocate a new uber material 34 // get the current values;
35 var newMat = new SquareTunnelMaterial();
36
37 // copy over the current values;
38 var propNames = [], propValues = [], propTypes = [], propLabels = []; 35 var propNames = [], propValues = [], propTypes = [], propLabels = [];
39 this.getAllProperties(propNames, propValues, propTypes, propLabels); 36 this.getAllProperties(propNames, propValues, propTypes, propLabels);
37
38 // allocate a new material
39 var newMat = new SquareTunnelMaterial();
40
41 // copy over the current values;
40 var n = propNames.length; 42 var n = propNames.length;
41 for (var i = 0; i < n; i++) { 43 for (var i = 0; i < n; i++)
42 newMat.setProperty(propNames[i], propValues[i]); 44 newMat.setProperty(propNames[i], propValues[i]);
43 }
44 45
45 return newMat; 46 return newMat;
46 }; 47 };