*silly whistling*

See, in theory, I didn't make typos when coding.

Explanation:

iloc*loc will be negative when the sign changes between them, so we can snap if an element cross the limit.
This commit is contained in:
Martin Poirier
2005-10-29 12:17:44 +00:00
parent bba0e61734
commit 607777d949

View File

@@ -140,13 +140,13 @@ static void clipMirrorModifier(TransInfo *t, Object *ob)
if (td->flag & TD_NOACTION) if (td->flag & TD_NOACTION)
break; break;
if(mmd->axis==0) { if(mmd->axis==0) {
if(td->loc[0]*td->loc[0]<0.0f) td->loc[0]= 0.0f; if(td->loc[0]*td->iloc[0]<0.0f) td->loc[0]= 0.0f;
} }
else if(mmd->axis==1) { else if(mmd->axis==1) {
if(td->loc[1]*td->loc[1]<0.0f) td->loc[1]= 0.0f; if(td->loc[1]*td->iloc[1]<0.0f) td->loc[1]= 0.0f;
} }
else { else {
if(td->loc[2]*td->loc[2]<0.0f) td->loc[2]= 0.0f; if(td->loc[2]*td->iloc[2]<0.0f) td->loc[2]= 0.0f;
} }
} }
} }