These are useless

This commit is contained in:
John 2015-05-31 14:24:17 +03:00 committed by Loudrob
parent 338d83a907
commit 8352d31504
2 changed files with 1 additions and 27 deletions

View file

@ -15,7 +15,6 @@ from toontown.chat.ChatGlobals import *
from toontown.chat.WhisperPopup import WhisperPopup
class DistributedPlayer(DistributedAvatar.DistributedAvatar, PlayerBase.PlayerBase, TelemetryLimited):
TeleportFailureTimeout = 60.0
chatGarbler = ChatGarbler.ChatGarbler({'default': OTPLocalizer.ChatGarblerDefault})
def __init__(self, cr):
@ -30,9 +29,6 @@ class DistributedPlayer(DistributedAvatar.DistributedAvatar, PlayerBase.PlayerBa
self.inventory = None
self.experience = None
self.friendsList = []
self.oldFriendsList = None
self.timeFriendsListChanged = None
self.lastFailedTeleportMessage = {}
self._districtWeAreGeneratedOn = None
self.DISLid = 0
self.adminAccess = 0
@ -271,21 +267,9 @@ class DistributedPlayer(DistributedAvatar.DistributedAvatar, PlayerBase.PlayerBa
self.setSystemMessage(requesterId, OTPLocalizer.WhisperComingToVisit % avatar.getName())
messenger.send('teleportQuery', [avatar, self])
else:
if self.failedTeleportMessageOk(requesterId):
self.setSystemMessage(requesterId, OTPLocalizer.WhisperFailedVisit % avatar.getName())
self.d_teleportResponse(self.doId, 0, 0, 0, 0, sendToId=requesterId)
def failedTeleportMessageOk(self, fromId):
now = globalClock.getFrameTime()
lastTime = self.lastFailedTeleportMessage.get(fromId, None)
if lastTime != None:
elapsed = now - lastTime
if elapsed < self.TeleportFailureTimeout:
return 0
self.lastFailedTeleportMessage[fromId] = now
return 1
def d_teleportResponse(self, avId, available, shardId, hoodId, zoneId, sendToId):
teleportNotify.debug('sending teleportResponse%s' % ((avId, available,
shardId, hoodId, zoneId, sendToId),)
@ -347,9 +331,7 @@ class DistributedPlayer(DistributedAvatar.DistributedAvatar, PlayerBase.PlayerBa
return self.friendsList
def setFriendsList(self, friendsList):
self.oldFriendsList = self.friendsList
self.friendsList = friendsList
self.timeFriendsListChanged = globalClock.getFrameTime()
messenger.send('friendsListChanged')
Avatar.reconsiderAllUnderstandable()

View file

@ -1128,21 +1128,13 @@ class LocalAvatar(DistributedAvatar.DistributedAvatar, DistributedSmoothNode.Dis
def __friendOnline(self, doId):
friend = base.cr.identifyFriend(doId)
if self.oldFriendsList != None:
now = globalClock.getFrameTime()
elapsed = now - self.timeFriendsListChanged
if elapsed < 10.0 and self.oldFriendsList.count(doId) == 0:
self.oldFriendsList.append(doId)
return
if friend != None:
self.setSystemMessage(doId, OTPLocalizer.WhisperFriendComingOnline % friend.getName())
return
def __friendOffline(self, doId):
friend = base.cr.identifyFriend(doId)
if friend != None:
self.setSystemMessage(0, OTPLocalizer.WhisperFriendLoggedOut % friend.getName())
return
def clickedWhisper(self, doId):
friend = base.cr.identifyFriend(doId)