backwards compat

Changed: addCollisionDetail now has its fill mode at the end for easier backwards compat
This commit is contained in:
marauder2k7 2024-05-16 21:21:34 +01:00
parent 4b2165668f
commit 2132379b05
4 changed files with 26 additions and 27 deletions

View file

@ -2969,26 +2969,25 @@ function ShapeEdColWindow::update_onCollisionChanged( %this )
%targetId = %this-->colTarget.findText( getField( %colData, 1 ) );
%this-->colTarget.setSelected( %targetId, false );
%fillModeID = %this-->fillMode.findText( getField( %colData, 2 ) );
%this-->fillMode.setSelected( %fillModeID, false );
if ( %this-->colType.getText() $= "Convex Hulls" )
{
%this-->hullInactive.setVisible( false );
%this-->hullDepth.setValue( getField( %colData, 3 ) );
%this-->hullDepth.setValue( getField( %colData, 2 ) );
%this-->hullDepthText.setText( mFloor( %this-->hullDepth.getValue() ) );
%this-->hullMergeThreshold.setValue( getField( %colData, 4 ) );
%this-->hullMergeThreshold.setValue( getField( %colData, 3 ) );
%this-->hullMergeText.setText( mFloor( %this-->hullMergeThreshold.getValue() ) );
%this-->hullConcaveThreshold.setValue( getField( %colData, 5 ) );
%this-->hullConcaveThreshold.setValue( getField( %colData, 4 ) );
%this-->hullConcaveText.setText( mFloor( %this-->hullConcaveThreshold.getValue() ) );
%this-->hullMaxVerts.setValue( getField( %colData, 6 ) );
%this-->hullMaxVerts.setValue( getField( %colData, 5 ) );
%this-->hullMaxVertsText.setText( mFloor( %this-->hullMaxVerts.getValue() ) );
%this-->hullMaxBoxError.setValue( getField( %colData, 7 ) );
%this-->hullMaxBoxError.setValue( getField( %colData, 6 ) );
%this-->hullMaxBoxErrorText.setText( mFloor( %this-->hullMaxBoxError.getValue() ) );
%this-->hullMaxSphereError.setValue( getField( %colData, 8 ) );
%this-->hullMaxSphereError.setValue( getField( %colData, 7 ) );
%this-->hullMaxSphereErrorText.setText( mFloor( %this-->hullMaxSphereError.getValue() ) );
%this-->hullMaxCapsuleError.setValue( getField( %colData, 9 ) );
%this-->hullMaxCapsuleError.setValue( getField( %colData, 8 ) );
%this-->hullMaxCapsuleErrorText.setText( mFloor( %this-->hullMaxCapsuleError.getValue() ) );
%fillModeID = %this-->fillMode.findText( getField( %colData, 9 ) );
%this-->fillMode.setSelected( %fillModeID, false );
}
else
{

View file

@ -1055,18 +1055,17 @@ function ShapeEditor::doEditCollision( %this, %type, %target, %fillMode, %depth,
%action.oldType = getField( %colData, 0 );
%action.oldTarget = getField( %colData, 1 );
%action.oldFillMode = getField(%colData, 2);
%action.oldDepth = getField( %colData, 3 );
%action.oldMerge = getField( %colData, 4 );
%action.oldConcavity = getField( %colData, 5 );
%action.oldMaxVerts = getField( %colData, 6 );
%action.oldBoxMax = getField( %colData, 7 );
%action.oldSphereMax = getField( %colData, 8 );
%action.oldCapsuleMax = getField( %colData, 9 );
%action.oldDepth = getField( %colData, 2 );
%action.oldMerge = getField( %colData, 3 );
%action.oldConcavity = getField( %colData, 4 );
%action.oldMaxVerts = getField( %colData, 5 );
%action.oldBoxMax = getField( %colData, 6 );
%action.oldSphereMax = getField( %colData, 7 );
%action.oldCapsuleMax = getField( %colData, 8 );
%action.oldFillMode = getField(%colData, 9);
%action.newType = %type;
%action.newTarget = %target;
%action.newFillMode = %fillMode;
%action.newDepth = %depth;
%action.newMerge = %merge;
%action.newConcavity = %concavity;
@ -1074,6 +1073,7 @@ function ShapeEditor::doEditCollision( %this, %type, %target, %fillMode, %depth,
%action.newBoxMax = %boxMax;
%action.newSphereMax = %sphereMax;
%action.newCapsuleMax = %capsuleMax;
%action.newFillMode = %fillMode;
%this.doAction( %action );
}
@ -1095,9 +1095,9 @@ function ActionEditCollision::updateCollision( %this, %type, %target, %fillMode,
if ( %type $= "" )
return;
if ( !ShapeEditor.shape.addCollisionDetail( %colDetailSize, %type, %target, %fillMode,
if ( !ShapeEditor.shape.addCollisionDetail( %colDetailSize, %type, %target,
%depth, %merge, %concavity, %maxVerts,
%boxMax, %sphereMax, %capsuleMax ) )
%boxMax, %sphereMax, %capsuleMax, %fillMode) )
return false;
// Update UI
@ -1107,8 +1107,8 @@ function ActionEditCollision::updateCollision( %this, %type, %target, %fillMode,
for ( %i = 0; %i < %count; %i++ )
ShapeEdPropWindow.update_onMeshAdded( getField( %meshList, %i ) );
ShapeEdColWindow.lastColSettings = %type TAB %target TAB %fillMode TAB %depth TAB %merge TAB
%concavity TAB %maxVerts TAB %boxMax TAB %sphereMax TAB %capsuleMax;
ShapeEdColWindow.lastColSettings = %type TAB %target TAB %depth TAB %merge TAB
%concavity TAB %maxVerts TAB %boxMax TAB %sphereMax TAB %capsuleMax TAB %fillMode ;
ShapeEdColWindow.update_onCollisionChanged();
return true;