// SPDX-License-Identifier: MIT // Copyright (c) 2026 Incoprea // Neutralize ordinary prim twist // Not compiled or tested in-world // Setup: Use a nonphysical ordinary prim. Touch compares/restores. // Stop / restore: Owner-touch again to restore the startup snapshot before removal or reset, unless setup describes a different cycle. Do not relink during a preview. // Notes: Use a spare modifiable build. Saved state lives only in script memory. Separates deformation from rotation. Mesh/sculpt and other types rejected. // License: see LICENSE in this distribution. // Original Incoprea. MIT. Not compiled or tested in-world. integer preview; list saved; default { state_entry() { saved=llGetLinkPrimitiveParams(LINK_THIS,[PRIM_TYPE]); } touch_start(integer n) { if(llDetectedKey(0)!=llGetOwner())return; integer type=llList2Integer(saved,0); if(llGetStatus(STATUS_PHYSICS)||(type!=PRIM_TYPE_BOX&&type!=PRIM_TYPE_CYLINDER&&type!=PRIM_TYPE_PRISM))return; preview=!preview; if(preview) { llSetLinkPrimitiveParamsFast(LINK_THIS,[PRIM_TYPE]+llListReplaceList(saved,[ZERO_VECTOR],4,4)); } else { llSetLinkPrimitiveParamsFast(LINK_THIS,[PRIM_TYPE]+saved); } } }