Esempio n. 1
0
    def announceGenerate(self):
        DistributedEntityAI.announceGenerate(self)
        DistributedNodeAI.announceGenerate(self)

        assert self.cEntity
        self.setPos(self.cEntity.getOrigin())
        self.setHpr(self.cEntity.getAngles())
        pos = self.getPos()
        hpr = self.getHpr()
        self.d_setPosHpr(pos[0], pos[1], pos[2], hpr[0], hpr[1], hpr[2])
Esempio n. 2
0
    def announceGenerate(self):
        DistributedEntityAI.announceGenerate(self)

        self.b_setModel("phase_14/models/props/creampie_gib.bam")
        self.setMass(5.0)
        self.setSolid(self.SOLID_MESH)
        self.initPhysics()
        self.getPhysNode().setFriction(50.0)
        #self.getPhysNode().setLinearDamping(3.0)
        #self.getPhysNode().setAngularDamping(3.0)
        self.startPosHprBroadcast()
        self.setNextThink(3.0)
Esempio n. 3
0
    def announceGenerate(self):
        DistributedEntityAI.announceGenerate(self)
        AvatarShared.announceGenerate(self)

        self.accept('globalrule', self.handleRule)

        self.setupPhysics()

        # Add ourself to the avatar list for the zone
        # But if we somehow are already in there, remove us.
        base.air.removeAvatar(self)
        base.air.addAvatar(self)

        if self.Moving:
            self.lastPos = self.getPos(render)
            taskMgr.add(self.__avatarTick, self.uniqueName('avatarTick'))
Esempio n. 4
0
 def announceGenerate(self):
     DistributedEntityAI.announceGenerate(self)
     print(self.getEntityValueBool("playnow"))
     if self.getEntityValueBool("playnow"):
         print("Play now!")
         self.Play()
Esempio n. 5
0
 def announceGenerate(self):
     DistributedEntityAI.announceGenerate(self)
     if self.hasSpawnFlags(self.SF_ExecuteImmediately):
         self.ExecuteScript()
Esempio n. 6
0
 def announceGenerate(self):
     DistributedEntityAI.announceGenerate(self)
     self.b_setModel('phase_4/models/cogHQ/gagTank.bam')
Esempio n. 7
0
 def announceGenerate(self):
     DistributedEntityAI.announceGenerate(self)
     self.startPosHprBroadcast()
     render.ls()
Esempio n. 8
0
 def announceGenerate(self):
     DistributedEntityAI.announceGenerate(self)
     self.sendCurrentPosition()
Esempio n. 9
0
    def announceGenerate(self):
        DistributedEntityAI.announceGenerate(self)

        if self.hasSpawnFlags(self.StartsEnabled):
            print("Smoke starts enabled")
            self.Start()