Poodletooth-iLand/toontown/racing/DistributedViewPadAI.py

28 lines
938 B
Python
Raw Normal View History

2015-03-03 16:10:12 -06:00
from direct.directnotify import DirectNotifyGlobal
from toontown.racing.DistributedKartPadAI import DistributedKartPadAI
from direct.distributed.ClockDelta import *
class DistributedViewPadAI(DistributedKartPadAI):
notify = DirectNotifyGlobal.directNotify.newCategory("DistributedViewPadAI")
2015-03-03 16:10:12 -06:00
def __init__(self, air):
DistributedKartPadAI.__init__(self, air)
self.timestamp = globalClockDelta.getRealNetworkTime()
2015-03-03 16:10:12 -06:00
def setLastEntered(self, timestamp):
self.timestamp = timestamp
2015-03-03 16:10:12 -06:00
def d_setLastEntered(self, timestamp):
self.sendUpdate('setLastEntered', [timestamp])
2015-03-03 16:10:12 -06:00
def b_setLastEntered(self, timestamp):
self.setLastEntered(timestamp)
self.d_setLastEntered(timestamp)
2015-03-03 16:10:12 -06:00
def getLastEntered(self):
return self.timestamp
2015-03-03 16:10:12 -06:00
def updateTimer(self):
self.b_setLastEntered(globalClockDelta.getRealNetworkTime())