From 2f3b6c4b1060a574263c4be114cb33d505ac6e71 Mon Sep 17 00:00:00 2001 From: MW Date: Wed, 11 Apr 2007 12:49:00 +0000 Subject: small improvement to the jvm and test script --- bin/script1.txt | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'bin/script1.txt') diff --git a/bin/script1.txt b/bin/script1.txt index dd67c50..63780c2 100644 --- a/bin/script1.txt +++ b/bin/script1.txt @@ -7,7 +7,9 @@ int avid = OpenSimAPI.GetRandomAvatarID(); float x = OpenSimAPI.GetEntityPositionX(own); float avx = OpenSimAPI.GetEntityPositionX(avid); - + float y = OpenSimAPI.GetEntityPositionY(own); + float avy = OpenSimAPI.GetEntityPositionY(avid); + if(x> avx) { x = x -1f; @@ -16,7 +18,17 @@ { x = x+ 1f; } - OpenSimAPI.SetEntityPosition(own, x, 0, 0); + + if(y > avy) + { + y= y -1f; + } + else + { + y = y +1f; + } + + OpenSimAPI.SetEntityPosition(own, x, y, 0); } } \ No newline at end of file -- cgit v1.1