def generateCog(self, isLose=0): self.cleanup() if not isLose: if self.variant == Variant.SKELETON or self.variant == Variant.ZOMBIE: self.loadModel( 'phase_5/models/char/cog%s_robot-zero.bam' % str(self.suit), 'body') else: self.loadModel( 'phase_3.5/models/char/suit%s-mod.bam' % str(self.suit), 'body') animations = SuitGlobals.animations anims = {} for anim in animations: if self.suit not in anim.getSuitTypes(): continue path = 'phase_%s/models/char/suit%s-%s.bam' % ( anim.getPhase(), self.suit, anim.getFile()) anims[anim.getName()] = path self.loadAnims(anims, 'body') self.generateHealthBar() self.generatePropeller() else: if self.variant == Variant.SKELETON or self.variant == Variant.ZOMBIE: self.loadModel( 'phase_5/models/char/cog%s_robot-lose-mod.bam' % str(self.suit), 'body') else: self.loadModel( 'phase_4/models/char/suit%s-lose-mod.bam' % str(self.suit), 'body') self.loadAnims( { 'lose': 'phase_4/models/char/suit%s-lose.bam' % str(self.suit) }, 'body') if self.variant != Variant.SKELETON: self.headModel = self.head.generate() self.headModel.reparentTo(self.find('**/joint_head')) if self.suitPlan.getName() == SuitGlobals.VicePresident: self.headModel.setScale(0.35) self.headModel.setHpr(270, 0, 270) self.headModel.setZ(-0.1) self.headModel.loop('neutral') self.setClothes() self.setAvatarScale(self.suitPlan.getScale() / SuitGlobals.scaleFactors[self.suit]) self.setHeight(self.suitPlan.getHeight()) self.setupNameTag() Avatar.initShadow(self)