def _parse_new_actor(self, netstream, objects): actor = {} actor['flag'] = netstream.read(BOOL) type_id = reverse_bytewise(netstream.read('bits:32')).uintle type_name = objects[type_id] if 'TheWorld' in type_name: # World types are Vector Less return type_name, actor actor['vector'] = read_serialized_vector(netstream) if 'Ball_Default' in type_name or 'Car_Default' in type_name: actor['rotation'] = read_byte_vector(netstream) return type_name, actor
def _parse_new_actor(self, netstream, objects): actor = {} actor['flag'] = netstream.read(BOOL) type_id = reverse_bytewise(netstream.read('bits:32')).uintle type_name = objects[type_id] if 'TheWorld' in type_name: # World types are Vector Less return type_name, actor actor['vector'] = read_serialized_vector(netstream) if 'Archetypes.Ball' in type_name or 'Car_Default' in type_name: actor['rotation'] = read_byte_vector(netstream) return type_name, actor
def _parse_new_actor(self, actor, netstream, objects, propertymapper): actor['state'] = 'new' actor['flag'] = netstream.read(BOOL) actor['type_id'] = _read_int(netstream) actor['type_name'] = objects[actor['type_id']] actor['class_name'] = propertymapper._arch_to_class(actor['type_name']) if actor['class_name'].startswith('.'): actor['class_name'] = 'TAGame{}'.format(actor['class_name']) if actor['class_name'] in ['TAGame.CrowdActor_TA', 'TAGame.CrowdManager_TA', 'TAGame.VehiclePickup_Boost_TA', 'Core.Object']: return actor actor['position'] = read_serialized_vector(netstream) if actor['class_name'] in ['TAGame.Ball_TA', 'TAGame.Car_TA', 'TAGame.Car_Season_TA']: actor['rotation'] = read_byte_vector(netstream) return actor
def _parse_new_actor(self, actor, netstream, objects, propertymapper): actor['state'] = 'new' actor['flag'] = netstream.read(BOOL) actor['type_id'] = _read_int(netstream) actor['type_name'] = objects[actor['type_id']] actor['class_name'] = propertymapper._arch_to_class(actor['type_name']) if actor['class_name'].startswith('.'): actor['class_name'] = 'TAGame{}'.format(actor['class_name']) if actor['class_name'] in [ 'TAGame.CrowdActor_TA', 'TAGame.CrowdManager_TA', 'TAGame.VehiclePickup_Boost_TA', 'Core.Object' ]: return actor actor['position'] = read_serialized_vector(netstream) if actor['class_name'] in [ 'TAGame.Ball_TA', 'TAGame.Car_TA', 'TAGame.Car_Season_TA' ]: actor['rotation'] = read_byte_vector(netstream) return actor