interiors: some boilerplate for interiors

This commit is contained in:
Aidan 2013-12-15 15:44:48 -05:00
parent a7e074597c
commit 4c7fedc1a0
5 changed files with 29 additions and 8 deletions

View file

@ -5,6 +5,7 @@ import random
from direct.distributed import DistributedObject
from direct.directnotify import DirectNotifyGlobal
import ToonInteriorColors
from toontown.dna.DNAParser import DNADoor
from toontown.hood import ZoneUtil
class DistributedGagshopInterior(DistributedObject.DistributedObject):

View file

@ -4,6 +4,14 @@ from direct.distributed.DistributedObjectAI import DistributedObjectAI
class DistributedGagshopInteriorAI(DistributedObjectAI):
notify = DirectNotifyGlobal.directNotify.newCategory("DistributedGagshopInteriorAI")
def setZoneIdAndBlock(self, todo0, todo1):
pass
def __init__(self, air):
DistributedObjectAI.__init__(self, air)
self.zoneId = 0
self.block = 0
def setZoneIdAndBlock(self, zoneId, block):
self.zoneId = zoneId
self.block = block
def getZoneIdAndBlock(self):
return [self.zoneId, self.block]

View file

@ -6,6 +6,7 @@ from direct.distributed import DistributedObject
from direct.directnotify import DirectNotifyGlobal
from direct.actor import Actor
import ToonInteriorColors
from toontown.dna.DNAParser import DNADoor
from toontown.hood import ZoneUtil
class DistributedPetshopInterior(DistributedObject.DistributedObject):

View file

@ -3,7 +3,17 @@ from direct.distributed.DistributedObjectAI import DistributedObjectAI
class DistributedPetshopInteriorAI(DistributedObjectAI):
notify = DirectNotifyGlobal.directNotify.newCategory("DistributedPetshopInteriorAI")
def setZoneIdAndBlock(self, todo0, todo1):
pass
def __init__(self, air):
DistributedObjectAI.__init__(self, air)
self.air = air
self.zoneId = 0
self.block = 0
def setZoneIdAndBlock(self, zoneId, block):
self.zoneId = zoneId
self.block = block
def getZoneIdAndBlock(self):
return [self.zoneId, self.block]

View file

@ -107,9 +107,10 @@ class DistributedToonInterior(DistributedObject.DistributedObject):
signOrigin = self.interior.find('**/sign_origin;+s')
newSignNP = sign.copyTo(signOrigin)
newSignNP.setDepthWrite(1, 1)
mat = self.dnaStore.getSignTransformFromBlockNumber(int(self.block))
#TODO: getSignTransform
#mat = self.dnaStore.getSignTransformFromBlockNumber(int(self.block))
inv = Mat4(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
inv.invertFrom(mat)
#inv.invertFrom(mat)
newSignNP.setMat(inv)
newSignNP.flattenLight()
ll = Point3()