diff --git a/pyogp/lib/base/region.py b/pyogp/lib/base/region.py index 179a642..800987f 100644 --- a/pyogp/lib/base/region.py +++ b/pyogp/lib/base/region.py @@ -71,7 +71,7 @@ class Region(object): """ - def __init__(self, global_x = None, global_y = None, seed_capability_url = None, udp_blacklist = None, sim_ip = None, sim_port = None, circuit_code = None, agent = None, settings = None, packet_handler = None, event_queue_handler = None): + def __init__(self, global_x = 0, global_y = 0, seed_capability_url = None, udp_blacklist = None, sim_ip = None, sim_port = None, circuit_code = None, agent = None, settings = None, packet_handler = None, event_queue_handler = None): """ initialize a region """ # allow the settings to be passed in diff --git a/pyogp/lib/base/tests/test_objects.py b/pyogp/lib/base/tests/test_objects.py index 258d9d8..a6831df 100644 --- a/pyogp/lib/base/tests/test_objects.py +++ b/pyogp/lib/base/tests/test_objects.py @@ -68,37 +68,7 @@ class TestObjects(unittest.TestCase): for _object in self.object_store.object_store: known_objects.append((_object.FullID, _object.ID)) - self.assertEquals(known_objects, [(uuid.UUID('2b7f7a6e-32c5-dbfd-e2c7-926d1a9f0aca'), 30452L), (uuid.UUID('1dd5efe2-faaf-1864-5ac9-bc61c5d8d7ea'), 30451L), (uuid.UUID('50b8926a-9efe-aa75-c4e9-d8946ba812a5'), 30400L), (uuid.UUID('cab68676-a725-e9d9-25b0-6d925f0bc5f2'), 30399L), (uuid.UUID('78716204-2664-69ba-eaa5-2587d877d4ef'), 29840L), (uuid.UUID('93cbc3e1-8dab-07ea-d4ed-2631aaa569fc'), 30348L)]) - - def new packet(_ID, _State, _FullID, _CRC, _PCode, _Material, _ClickAction, _Scale, _ObjectData, _ParentID, _UpdateFlags, _PathCurve, _ProfileCurve, _PathBegin, _PathEnd, _PathScaleX, _PathScaleY, _PathS hearX, _PathShearY, _PathTwist, _PathTwistBegin, _PathRadiusOffset, _PathTaperX, _PathTaperY, _PathRevolutions, _PathSkew, _ProfileBegin, _ProfileEnd, _ProfileHollow, _TextureEntry, _TextureAnim, _NameValue, _Data , _Text, _TextColor, _MediaURL, _PSBlock, _ExtraParams, _Sound, _OwnerID, _Gain, _Flags, _Radius, _JointType, _JointPivot, _JointAxisOrAnchor, FootCollisionPlane, Position, Velocity, Acceleration, Rotation, AngularVelocity): - - packet = ObjectUpdateCompressedPacket() # from message/packets.py - - packet.ObjectData['UpdateFlags'] = _UpdateFlags - - # Prepare the Data - Data['LocalID'] = struct.pack("B",PCode) - - # If this is a Primitive (PCode = 9) - if PCode = 9: - Data['State'] = struct.pack(">B", _State)[0] - Data['CRC'] = struct.pack("B", _Material)[0] - Data['ClickAction'] = struct.pack(">B", ClickAction)[0] - Data['Scale'] = Vector3(_Scale).get_bytes() - Data['Position'] = Vector3(Position).get_bytes() - Data['Rotation'] = Vector3(Rotation).get_bytes() - Data['Flags'] = struct.pack(">B",_Flags)[0] - Data['OwnerID'] = uuid.UUID(_OwnerID) - Data['PathCurve'] = struct.pack(">B",_PathCurve) - Data['PathBegin'] = struct.pack("