OBJECT HANDLING IN MAJIK To cut short, void move(object target) { if (ENV(THOB)) ENV(THOB)->remove_oid(THOB); move_object(target); if (ENV(THOB)) target->assign_oid(THOB); } Every object has an object id, OID. When object is moved into a new room, the room assigns a new OID for it. The OID doesn't have any real use inside the server (atleast I haven't figured out anything), it is only used as a 'handle' for managing object structures in the client. The algorithm for generating OID can be as simple as an incremental counter. Problems will occur when the counter wraps around at 2^32, but that requires some kiukku(tm) from players :). A more complicated solution would be to scan all objects in the gridmap and then choose lowest unused OID. Thus, we need to update some commands in the client: CMD_ADD_OBJECT Called when object enters the gridmap CMD_REMOVE_OBJECT Called when object leaves the gridmap CMD_OBJECTINFO Called to update object's properties CMD_OBJECT_MOVE Called when object moves in the gridmap Note that CMD_OBJECT becomes obsolete.