battle: Adjust camera FOV for widescreen support.

This commit is contained in:
Sam Edwards 2014-05-06 08:37:19 -06:00
parent ab26fd6010
commit c02b6a62bb
3 changed files with 7 additions and 7 deletions

View file

@ -113,11 +113,11 @@ class DistributedBattle(DistributedBattleBase.DistributedBattleBase):
TauntCamHeight = random.choice((MidTauntCamHeight, 1, 11))
camTrack = Sequence()
camTrack.append(Func(camera.wrtReparentTo, suit))
camTrack.append(Func(base.camLens.setFov, self.camFOFov))
camTrack.append(Func(base.camLens.setMinFov, self.camFOFov/(4./3.)))
camTrack.append(Func(camera.setPos, TauntCamX, TauntCamY, TauntCamHeight))
camTrack.append(Func(camera.lookAt, suit, suitOffsetPnt))
camTrack.append(Wait(delay))
camTrack.append(Func(base.camLens.setFov, self.camFov))
camTrack.append(Func(base.camLens.setMinFov, self.camFov/(4./3.)))
camTrack.append(Func(camera.wrtReparentTo, self))
camTrack.append(Func(camera.setPos, self.camFOPos))
camTrack.append(Func(camera.lookAt, suit.getPos(self)))

View file

@ -789,7 +789,7 @@ class DistributedBattleBase(DistributedNode.DistributedNode, BattleBase):
camTrack = Sequence()
def setCamFov(fov):
base.camLens.setFov(fov)
base.camLens.setMinFov(fov/(4./3.))
camTrack.append(Func(setCamFov, self.camFov))
camTrack.append(Func(camera.wrtReparentTo, self))
@ -1016,7 +1016,7 @@ class DistributedBattleBase(DistributedNode.DistributedNode, BattleBase):
def __enterLocalToonWaitForInput(self):
self.notify.debug('enterLocalToonWaitForInput()')
camera.setPosHpr(self.camPos, self.camHpr)
base.camLens.setFov(self.camMenuFov)
base.camLens.setMinFov(self.camMenuFov/(4./3.))
NametagGlobals.setMasterArrowsOn(0)
self.townBattle.setState('Attack')
self.accept(self.localToonBattleEvent, self.__handleLocalToonBattleEvent)
@ -1060,7 +1060,7 @@ class DistributedBattleBase(DistributedNode.DistributedNode, BattleBase):
self.notify.debug('exitWaitForInput()')
if self.localToonActive():
self.townBattle.setState('Off')
base.camLens.setFov(self.camFov)
base.camLens.setMinFov(self.camFov/(4./3.))
self.ignore(self.localToonBattleEvent)
self.__stopTimer()
return None
@ -1240,7 +1240,7 @@ class DistributedBattleBase(DistributedNode.DistributedNode, BattleBase):
if localAvatar and hasattr(localAvatar, 'inventory') and localAvatar.inventory:
localAvatar.inventory.setInteractivePropTrackBonus(self.interactivePropTrackBonus)
camera.wrtReparentTo(self)
base.camLens.setFov(self.camFov)
base.camLens.setMinFov(self.camFov/(4./3.))
return
def exitHasLocalToon(self):

View file

@ -158,7 +158,7 @@ class DistributedBattleBldg(DistributedBattleBase.DistributedBattleBase):
self.clearInterval(self.faceOffName)
self._removeMembersKeep()
camera.wrtReparentTo(self)
base.camLens.setFov(self.camFov)
base.camLens.setMinFov(self.camFov/(4./3.))
return None
def __playReward(self, ts, callback):