Esempio n. 1
0
    def __init__(self, cr):
        DistributedWeapon.__init__(self, cr)
        DistributedShippart.__init__(self, cr)
        self.baseVel = Vec3(0)
        self.setPos(0, 0, 0)
        self.ball = None
        self.baseTeam = 0
        self.prop = None
        self.av = None
        self.ammoType = 0
        self.shotNum = 0
        self.leftBroadside = []
        self.rightBroadside = []
        self.leftBroadsideConfig = []
        self.rightBroadsideConfig = []
        self.rightPlayShots = []
        self.leftPlayShots = []
        self.collisionLists = {}
        self.listening = False
        if not self.localFireSfx:
            for file in localFireSfxNames:
                self.localFireSfx.append(file)

        if not self.distFireSfx:
            for file in distFireSfxNames:
                self.distFireSfx.append(file)

        self.aimAITrack = None
        if __dev__ and config.GetBool('want-broadside-assist', 0):
            self.tracker = loader.loadModel('models/effects/explosion_sphere')
            self.tracker.reparentTo(render)
            self.tracker.setScale(30)
 def __init__(self, cr):
     DistributedWeapon.__init__(self, cr)
     DistributedShippart.__init__(self, cr)
     self.baseVel = Vec3(0)
     self.setPos(0, 0, 0)
     self.ball = None
     self.baseTeam = 0
     self.prop = None
     self.av = None
     self.ammoType = 0
     self.shotNum = 0
     self.leftBroadside = []
     self.rightBroadside = []
     self.leftBroadsideConfig = []
     self.rightBroadsideConfig = []
     self.rightPlayShots = []
     self.leftPlayShots = []
     self.collisionLists = { }
     self.listening = False
     if not self.localFireSfx:
         for file in localFireSfxNames:
             self.localFireSfx.append(file)
         
     
     if not self.distFireSfx:
         for file in distFireSfxNames:
             self.distFireSfx.append(file)
         
     
     self.aimAITrack = None
     if __dev__ and config.GetBool('want-broadside-assist', 0):
         self.tracker = loader.loadModel('models/effects/explosion_sphere')
         self.tracker.reparentTo(render)
         self.tracker.setScale(30)
 def disable(self):
     self.ignoreAll()
     self.av = None
     self.effectNode.removeNode()
     self.effectNode = None
     taskMgr.remove(self.getTrailTaskName())
     if self.aimAITrack:
         self.aimAITrack.pause()
         self.aimAITrack = None
     
     DistributedWeapon.disable(self)
     DistributedShippart.disable(self)
Esempio n. 4
0
    def disable(self):
        self.ignoreAll()
        self.av = None
        self.effectNode.removeNode()
        self.effectNode = None
        taskMgr.remove(self.getTrailTaskName())
        if self.aimAITrack:
            self.aimAITrack.pause()
            self.aimAITrack = None

        DistributedWeapon.disable(self)
        DistributedShippart.disable(self)
 def delete(self):
     for i in self.leftPlayShots:
         i.pause()
     
     del self.leftPlayShots
     for i in self.rightPlayShots:
         i.pause()
     
     del self.rightPlayShots
     del self.rightBroadside
     del self.leftBroadside
     del self.rightBroadsideConfig
     del self.leftBroadsideConfig
     self.ignoreAll()
     self.removeNode()
     if self.ship.broadside:
         self.ship.broadside[1] = None
     
     DistributedWeapon.delete(self)
     DistributedShippart.delete(self)
Esempio n. 6
0
    def delete(self):
        for i in self.leftPlayShots:
            i.pause()

        del self.leftPlayShots
        for i in self.rightPlayShots:
            i.pause()

        del self.rightPlayShots
        del self.rightBroadside
        del self.leftBroadside
        del self.rightBroadsideConfig
        del self.leftBroadsideConfig
        self.ignoreAll()
        self.removeNode()
        if self.ship.broadside:
            self.ship.broadside[1] = None

        DistributedWeapon.delete(self)
        DistributedShippart.delete(self)
 def announceGenerate(self):
     self.effectNode = NodePath(ModelNode('broadside-%d-effects' % self.doId))
     self.effectNode.reparentTo(self)
     DistributedWeapon.announceGenerate(self)
     DistributedShippart.announceGenerate(self)
 def generate(self):
     DistributedWeapon.generate(self)
     DistributedShippart.generate(self)
Esempio n. 9
0
 def announceGenerate(self):
     self.effectNode = NodePath(
         ModelNode('broadside-%d-effects' % self.doId))
     self.effectNode.reparentTo(self)
     DistributedWeapon.announceGenerate(self)
     DistributedShippart.announceGenerate(self)
Esempio n. 10
0
 def generate(self):
     DistributedWeapon.generate(self)
     DistributedShippart.generate(self)