mirror of
https://github.com/Tribes2-SCP/AssetCompat.git
synced 2026-07-15 02:24:35 +00:00
fixed interiorFunctions again
This commit is contained in:
parent
fcbfd0d9e2
commit
4d824061a0
1 changed files with 20 additions and 7 deletions
|
|
@ -1,12 +1,25 @@
|
||||||
|
exec ("materials.cs");
|
||||||
|
new SimSet(IIObjects) {
|
||||||
|
};
|
||||||
|
function serverCmdcollada() {
|
||||||
|
for (%i=0; %i<IIObjects.getCount(); %i++) {
|
||||||
|
changeToCollada(IIObjects.getObject(%i));
|
||||||
|
}
|
||||||
|
while(IIObjects.getCount() > 0) {
|
||||||
|
IIObjects.getObject(0).delete();
|
||||||
|
}
|
||||||
|
}
|
||||||
function InteriorInstance::onAdd(%this) {
|
function InteriorInstance::onAdd(%this) {
|
||||||
%this.exportToCollada(false);
|
IIObjects.add(%this);
|
||||||
%ts = new TSStatic() {
|
}
|
||||||
shapeName="compat/base/interiors/" @ getSubStr(%this.getModelFile(),0,strpos(%this.getModelFile(),".dif")) @ ".dae";
|
function changeToCollada(%ii) {
|
||||||
|
%ii.exportToCollada(false);
|
||||||
|
$ts = new TSStatic() {
|
||||||
|
shapeName="compat/base/interiors/" @ getSubStr(%ii.getModelFile(),0,strpos(%ii.getModelFile(),".dif")) @ ".dae";
|
||||||
collisionType="Visible Mesh";
|
collisionType="Visible Mesh";
|
||||||
decalType = "Visible Mesh";
|
decalType = "Visible Mesh";
|
||||||
position=%this.position;
|
position=%ii.position;
|
||||||
rotation=%this.rotation;
|
rotation=%ii.rotation;
|
||||||
scale=%this.scale;
|
scale=%ii.scale;
|
||||||
};
|
};
|
||||||
%this.delete();
|
|
||||||
}
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue