Fix building flickering

This commit is contained in:
John 2015-06-18 21:22:54 +03:00
parent 9d0029cdfb
commit 9804328571
2 changed files with 2 additions and 2 deletions

View file

@ -458,13 +458,13 @@ class DistributedBuilding(DistributedObject.DistributedObject):
backgroundNP = loader.loadModel('phase_5/models/modules/suit_sign') backgroundNP = loader.loadModel('phase_5/models/modules/suit_sign')
backgroundNP.reparentTo(signOrigin) backgroundNP.reparentTo(signOrigin)
backgroundNP.setPosHprScale(0.0, 0.0, textHeight * 0.8 / zScale, 0.0, 0.0, 0.0, 8.0, 8.0, 8.0 * zScale) backgroundNP.setPosHprScale(0.0, 0.0, textHeight * 0.8 / zScale, 0.0, 0.0, 0.0, 8.0, 8.0, 8.0 * zScale)
backgroundNP.node().setEffect(DecalEffect.make())
signTextNodePath = backgroundNP.attachNewNode(textNode.generate()) signTextNodePath = backgroundNP.attachNewNode(textNode.generate())
signTextNodePath.setPosHprScale(0.0, 0.0, -0.21 + textHeight * 0.1 / zScale, 0.0, 0.0, 0.0, 0.1, 0.1, 0.1 / zScale) signTextNodePath.setPosHprScale(0.0, 0.0, -0.21 + textHeight * 0.1 / zScale, 0.0, 0.0, 0.0, 0.1, 0.1, 0.1 / zScale)
signTextNodePath.setColor(1.0, 1.0, 1.0, 1.0) signTextNodePath.setColor(1.0, 1.0, 1.0, 1.0)
frontNP = suitBuildingNP.find('**/*_front/+GeomNode;+s') frontNP = suitBuildingNP.find('**/*_front/+GeomNode;+s')
backgroundNP.wrtReparentTo(frontNP) backgroundNP.wrtReparentTo(frontNP)
frontNP.node().setEffect(DecalEffect.make()) frontNP.node().setEffect(DecalEffect.make())
signTextNodePath.setAttrib(DepthOffsetAttrib.make(1))
suitBuildingNP.setName('sb' + str(self.block) + ':_landmark__DNARoot') suitBuildingNP.setName('sb' + str(self.block) + ':_landmark__DNARoot')
suitBuildingNP.setPosHprScale(nodePath, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0) suitBuildingNP.setPosHprScale(nodePath, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0)
suitBuildingNP.flattenMedium() suitBuildingNP.flattenMedium()

View file

@ -115,7 +115,7 @@ class DistributedHouse(DistributedObject.DistributedObject):
self.randomGenerator.seed(self.doId) self.randomGenerator.seed(self.doId)
houseColor = HouseGlobals.stairWood houseColor = HouseGlobals.stairWood
color = Vec4(houseColor[0], houseColor[1], houseColor[2], 1) color = Vec4(houseColor[0], houseColor[1], houseColor[2], 1)
setupDoor(doorNP, door_origin, door_origin, self.dnaStore, str(self.doId), color) setupDoor(doorNP, door_origin, door_origin, self.dnaStore, str(self.colorIndex), color)
self.__setupNamePlate() self.__setupNamePlate()
self.__setupFloorMat() self.__setupFloorMat()
self.__setupNametag() self.__setupNametag()