From 8a71bbc53d7201bc9fa14a6dc83a8c906a046d51 Mon Sep 17 00:00:00 2001 From: Calvin Balke Date: Tue, 1 Dec 2015 09:48:31 -0800 Subject: [PATCH] added a new interiorFunctions.cs file for converting interiorInstances to TSStatics. --- scripts/t2Compat/interiorFunctions.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 scripts/t2Compat/interiorFunctions.cs diff --git a/scripts/t2Compat/interiorFunctions.cs b/scripts/t2Compat/interiorFunctions.cs new file mode 100644 index 0000000..a97f898 --- /dev/null +++ b/scripts/t2Compat/interiorFunctions.cs @@ -0,0 +1,12 @@ +function InteriorInstance::onAdd(%this) { + %this.exportToCollada(false); + %ts = new TSStatic() { + shapeName="compat/base/interiors/" @ getSubStr(%this.getModelFile(),0,strpos(%this.getModelFile(),".dif")) @ ".dae"; + collisionType="Visible Mesh"; + decalType = "Visible Mesh"; + position=%this.position; + rotation=%this.rotation; + scale=%this.scale; + }; + %this.delete(); +} \ No newline at end of file