diff options
author | UbitUmarov | 2015-09-01 11:43:07 +0100 |
---|---|---|
committer | UbitUmarov | 2015-09-01 11:43:07 +0100 |
commit | fb78b182520fc9bb0f971afd0322029c70278ea6 (patch) | |
tree | b4e30d383938fdeef8c92d1d1c2f44bb61d329bd /bin/assets/ScriptsAssetSet/llApplyImpulse.lsl | |
parent | lixo (diff) | |
parent | Mantis #7713: fixed bug introduced by 1st MOSES patch. (diff) | |
download | opensim-SC_OLD-fb78b182520fc9bb0f971afd0322029c70278ea6.zip opensim-SC_OLD-fb78b182520fc9bb0f971afd0322029c70278ea6.tar.gz opensim-SC_OLD-fb78b182520fc9bb0f971afd0322029c70278ea6.tar.bz2 opensim-SC_OLD-fb78b182520fc9bb0f971afd0322029c70278ea6.tar.xz |
Merge remote-tracking branch 'os/master'
Diffstat (limited to 'bin/assets/ScriptsAssetSet/llApplyImpulse.lsl')
-rw-r--r-- | bin/assets/ScriptsAssetSet/llApplyImpulse.lsl | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/bin/assets/ScriptsAssetSet/llApplyImpulse.lsl b/bin/assets/ScriptsAssetSet/llApplyImpulse.lsl new file mode 100644 index 0000000..add7a08 --- /dev/null +++ b/bin/assets/ScriptsAssetSet/llApplyImpulse.lsl | |||
@@ -0,0 +1,16 @@ | |||
1 | //Rez an object, and drop this script in it. | ||
2 | //This will launch it at the owner. | ||
3 | default | ||
4 | { | ||
5 | state_entry() | ||
6 | { | ||
7 | list p = llGetObjectDetails(llGetOwner(), [OBJECT_POS]); | ||
8 | if(p != []) | ||
9 | { | ||
10 | llSetStatus(STATUS_PHYSICS, TRUE); | ||
11 | vector pos = llList2Vector(p, 0); | ||
12 | vector direction = llVecNorm(pos - llGetPos()); | ||
13 | llApplyImpulse(direction * 100, 0); | ||
14 | } | ||
15 | } | ||
16 | } | ||