diff options
author | Teravus Ovares | 2008-02-13 23:14:41 +0000 |
---|---|---|
committer | Teravus Ovares | 2008-02-13 23:14:41 +0000 |
commit | 3588d89b2cba36415991c46c300b1f9c94f109bf (patch) | |
tree | 985987f9e0a2e60815134f05a4d69c658aef4ed4 /OpenSim/Region/Physics/Manager/CollisionLocker.cs | |
parent | * Fixed another bug in avatarpicker ('surname'/'lastname' mixup) (diff) | |
download | opensim-SC_OLD-3588d89b2cba36415991c46c300b1f9c94f109bf.zip opensim-SC_OLD-3588d89b2cba36415991c46c300b1f9c94f109bf.tar.gz opensim-SC_OLD-3588d89b2cba36415991c46c300b1f9c94f109bf.tar.bz2 opensim-SC_OLD-3588d89b2cba36415991c46c300b1f9c94f109bf.tar.xz |
* Bigish ODE stability Update. Run Prebuild
Diffstat (limited to 'OpenSim/Region/Physics/Manager/CollisionLocker.cs')
-rw-r--r-- | OpenSim/Region/Physics/Manager/CollisionLocker.cs | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/OpenSim/Region/Physics/Manager/CollisionLocker.cs b/OpenSim/Region/Physics/Manager/CollisionLocker.cs new file mode 100644 index 0000000..7a11720 --- /dev/null +++ b/OpenSim/Region/Physics/Manager/CollisionLocker.cs | |||
@@ -0,0 +1,46 @@ | |||
1 | using System; | ||
2 | using System.Collections.Generic; | ||
3 | using System.Text; | ||
4 | |||
5 | namespace OpenSim.Region.Physics.Manager | ||
6 | { | ||
7 | public class CollisionLocker | ||
8 | { | ||
9 | |||
10 | private bool locked = false; | ||
11 | private List<IntPtr> worldlock = new List<IntPtr>(); | ||
12 | public CollisionLocker() | ||
13 | { | ||
14 | |||
15 | } | ||
16 | public void dlock(IntPtr world) | ||
17 | { | ||
18 | lock (worldlock) | ||
19 | { | ||
20 | worldlock.Add(world); | ||
21 | } | ||
22 | |||
23 | } | ||
24 | public void dunlock(IntPtr world) | ||
25 | { | ||
26 | lock (worldlock) | ||
27 | { | ||
28 | worldlock.Remove(world); | ||
29 | } | ||
30 | } | ||
31 | public bool lockquery() | ||
32 | { | ||
33 | return (worldlock.Count > 0); | ||
34 | } | ||
35 | public void drelease(IntPtr world) | ||
36 | { | ||
37 | lock (worldlock) | ||
38 | { | ||
39 | if (worldlock.Contains(world)) | ||
40 | worldlock.Remove(world); | ||
41 | } | ||
42 | } | ||
43 | |||
44 | } | ||
45 | |||
46 | } | ||