Ejemplo n.º 1
0
 def __updateViewPointEntry(self, vehicleID=0):
     isActive = self._isInPostmortemMode(
     ) and vehicleID and vehicleID != self.__playerVehicleID or self._isInVideoMode(
     ) and self.__isAlive or not (self._isInPostmortemMode()
                                  or self._isInVideoMode()
                                  or self.__isObserver)
     if self.__killerVehicleID:
         ownMatrix = matrix_factory.getEntityMatrix(self.__killerVehicleID)
     else:
         ownMatrix = matrix_factory.makeAttachedVehicleMatrix()
     if self.__viewPointID:
         self._setActive(self.__viewPointID, active=isActive)
         self._setMatrix(self.__viewPointID, ownMatrix)
         self._setActive(self.__animationID, active=isActive)
         self._setMatrix(self.__animationID, ownMatrix)
         return
     self.__viewPointID = self._addEntry(_S_NAME.VIEW_POINT,
                                         _C_NAME.PERSONAL,
                                         matrix=ownMatrix,
                                         active=isActive)
     transformProps = settings.TRANSFORM_FLAG.DEFAULT
     transformProps ^= settings.TRANSFORM_FLAG.NO_ROTATION
     self.__animationID = self._addEntry(_S_NAME.ANIMATION,
                                         _C_NAME.PERSONAL,
                                         matrix=ownMatrix,
                                         active=isActive,
                                         transformProps=transformProps)
 def start(self):
     super(BattleRoyaleRadarPlugin, self).start()
     self.__radarAnimationEntry = self._addEntry(
         _S_NAME.RADAR_ANIM,
         _C_NAME.PERSONAL,
         matrix=matrix_factory.makeAttachedVehicleMatrix(),
         active=True)
Ejemplo n.º 3
0
 def __updateViewRangeCircle(self):
     ownMatrix = matrix_factory.makeAttachedVehicleMatrix()
     isActive = not self.__isObserver and self.__isAlive
     if self.__circlesID:
         self._setActive(self.__circlesID, isActive)
         self._setMatrix(self.__circlesID, ownMatrix)
         return
     else:
         transformProps = settings.TRANSFORM_FLAG.DEFAULT
         transformProps ^= settings.TRANSFORM_FLAG.NO_ROTATION
         self.__circlesVisibilityState = 0
         self.__circlesID = self._addEntry(_S_NAME.VIEW_RANGE_CIRCLES,
                                           _C_NAME.PERSONAL,
                                           matrix=ownMatrix,
                                           active=isActive,
                                           transformProps=transformProps)
         width, height = self.__defaultViewRangeCircleSize, self.__defaultViewRangeCircleSize
         if self.__defaultViewRangeCircleSize is None:
             bottomLeft, upperRight = self._arenaVisitor.type.getBoundingBox(
             )
             width = upperRight[0] - bottomLeft[0]
             height = upperRight[1] - bottomLeft[1]
         self._invoke(
             self.__circlesID,
             settings.VIEW_RANGE_CIRCLES_AS3_DESCR.AS_INIT_ARENA_SIZE,
             width, height)
         return