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