def _add_variable_jump_portal_data(self, actor, portal_instance,
                                    is_mirrored, walkstyle):
     arb = self._get_arb(actor, portal_instance, is_mirrored=is_mirrored)
     op = routing_protocols.RouteAnimateData()
     op.arb_data = arb._bytes()
     node_data = routing_protocols.RouteNodeData()
     node_data.type = routing_protocols.RouteNodeData.DATA_ANIMATE
     node_data.data = op.SerializeToString()
     return node_data
 def add_portal_data(self, portal_id, actor, walkstyle):
     op = routing_protocols.RouteStairsData()
     op.traversing_up = self._traversing_up(portal_id)
     op.stair_count = get_stair_count(self.id, self.zone_id)
     op.walkstyle = self._get_stairs_walkstyle(walkstyle, op.traversing_up)
     op.stairs_per_cycle = 1
     node_data = routing_protocols.RouteNodeData()
     node_data.type = routing_protocols.RouteNodeData.DATA_STAIRS
     node_data.data = op.SerializeToString()
     return node_data
 def add_portal_data(self, actor, portal_instance, is_mirrored, walkstyle):
     node_data = routing_protocols.RouteNodeData()
     obj = portal_instance.obj
     stair_count = self.get_stair_count(obj)
     node_data.type = routing_protocols.RouteNodeData.DATA_STAIRS
     op = routing_protocols.RouteStairsData()
     op.traversing_up = not is_mirrored
     op.stair_count = stair_count
     op.walkstyle = walkstyle
     op.stairs_per_cycle = 1
     node_data.data = op.SerializeToString()
     node_data.do_stop_transition = True
     node_data.do_start_transition = True
     return node_data
Example #4
0
 def add_portal_events(self, portal, actor, time, route_pb):
     op = routing_protocols.PortalEnterEvent()
     op.portal_object_id = self.id
     op.entering_front = portal == self.portals[0].there
     event = route_pb.events.add()
     event.time = time - 1.0
     event.type = routing_protocols.RouteEvent.PORTAL_ENTER
     event.data = op.SerializeToString()
     op = routing_protocols.PortalExitEvent()
     op.portal_object_id = self.id
     event = route_pb.events.add()
     event.time = time + 3.0
     event.type = routing_protocols.RouteEvent.PORTAL_EXIT
     event.data = op.SerializeToString()
 def add_portal_data(self, actor, portal_instance, is_mirrored, walkstyle):
     node_data = Routing_pb2.RouteNodeData()
     node_data.type = Routing_pb2.RouteNodeData.DATA_LADDER
     node_data.data = self._get_route_ladder_data(
         is_mirrored).SerializeToString()
     node_data.do_stop_transition = True
     node_data.do_start_transition = True
     return node_data
 def _get_route_ladder_data(self, is_mirrored):
     op = Routing_pb2.RouteLadderData()
     op.traversing_up = not is_mirrored
     op.step_count = 0
     return op
Example #7
0
 def get_portal_op(self, actor, obj):
     op = Routing_pb2.PortalChangeOpacityEvent()
     op.object_id = actor.id
     op.opacity = self.opacity
     op.duration = self.duration
     return op
Example #8
0
 def get_portal_op(self, actor, obj):
     op = Routing_pb2.PortalExitEvent()
     op.portal_object_id = obj.id
     return op