mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2024-12-25 04:32:33 -06:00
We don't need this
This commit is contained in:
parent
4a01e12091
commit
e9729a2ba6
8 changed files with 3 additions and 89 deletions
|
@ -14,7 +14,6 @@ from otp.friends import GuildManager/AI/UD
|
||||||
from otp.friends import FriendInfo
|
from otp.friends import FriendInfo
|
||||||
from otp.friends import AvatarFriendInfo
|
from otp.friends import AvatarFriendInfo
|
||||||
from otp.distributed import DistributedDistrict/AI/UD
|
from otp.distributed import DistributedDistrict/AI/UD
|
||||||
from otp.distributed import DistributedDirectory/AI
|
|
||||||
from otp.chat import ChatAgent/UD
|
from otp.chat import ChatAgent/UD
|
||||||
from otp.avatar import AvatarHandle
|
from otp.avatar import AvatarHandle
|
||||||
|
|
||||||
|
@ -87,10 +86,6 @@ dclass TimeManager : DistributedObject {
|
||||||
checkAvOnDistrictResult(uint32 context, DoId av, bool isOnDistrict);
|
checkAvOnDistrictResult(uint32 context, DoId av, bool isOnDistrict);
|
||||||
};
|
};
|
||||||
|
|
||||||
dclass DistributedDirectory : DistributedObject {
|
|
||||||
setParentingRules(string, string) broadcast ram;
|
|
||||||
};
|
|
||||||
|
|
||||||
dclass DistributedDistrict : DistributedObject {
|
dclass DistributedDistrict : DistributedObject {
|
||||||
setName(string) required broadcast ram;
|
setName(string) required broadcast ram;
|
||||||
setAvailable(uint8) required broadcast ram;
|
setAvailable(uint8) required broadcast ram;
|
||||||
|
|
|
@ -7,15 +7,13 @@ from otp.ai.MagicWordGlobal import *
|
||||||
from otp.avatar import DistributedAvatarAI
|
from otp.avatar import DistributedAvatarAI
|
||||||
from otp.avatar import PlayerBase
|
from otp.avatar import PlayerBase
|
||||||
from otp.distributed import OtpDoGlobals
|
from otp.distributed import OtpDoGlobals
|
||||||
from otp.distributed.ClsendTracker import ClsendTracker
|
|
||||||
from otp.otpbase import OTPLocalizer
|
from otp.otpbase import OTPLocalizer
|
||||||
|
|
||||||
|
|
||||||
class DistributedPlayerAI(DistributedAvatarAI.DistributedAvatarAI, PlayerBase.PlayerBase, ClsendTracker):
|
class DistributedPlayerAI(DistributedAvatarAI.DistributedAvatarAI, PlayerBase.PlayerBase):
|
||||||
def __init__(self, air):
|
def __init__(self, air):
|
||||||
DistributedAvatarAI.DistributedAvatarAI.__init__(self, air)
|
DistributedAvatarAI.DistributedAvatarAI.__init__(self, air)
|
||||||
PlayerBase.PlayerBase.__init__(self)
|
PlayerBase.PlayerBase.__init__(self)
|
||||||
ClsendTracker.__init__(self)
|
|
||||||
self.friendsList = []
|
self.friendsList = []
|
||||||
self.DISLname = ''
|
self.DISLname = ''
|
||||||
self.DISLid = 0
|
self.DISLid = 0
|
||||||
|
@ -29,7 +27,6 @@ class DistributedPlayerAI(DistributedAvatarAI.DistributedAvatarAI, PlayerBase.Pl
|
||||||
|
|
||||||
def announceGenerate(self):
|
def announceGenerate(self):
|
||||||
DistributedAvatarAI.DistributedAvatarAI.announceGenerate(self)
|
DistributedAvatarAI.DistributedAvatarAI.announceGenerate(self)
|
||||||
ClsendTracker.announceGenerate(self)
|
|
||||||
self._doPlayerEnter()
|
self._doPlayerEnter()
|
||||||
|
|
||||||
def _announceArrival(self):
|
def _announceArrival(self):
|
||||||
|
@ -47,7 +44,6 @@ class DistributedPlayerAI(DistributedAvatarAI.DistributedAvatarAI, PlayerBase.Pl
|
||||||
if __dev__:
|
if __dev__:
|
||||||
del self._sentExitServerEvent
|
del self._sentExitServerEvent
|
||||||
self._doPlayerExit()
|
self._doPlayerExit()
|
||||||
ClsendTracker.destroy(self)
|
|
||||||
if __dev__:
|
if __dev__:
|
||||||
GarbageReport.checkForGarbageLeaks()
|
GarbageReport.checkForGarbageLeaks()
|
||||||
DistributedAvatarAI.DistributedAvatarAI.delete(self)
|
DistributedAvatarAI.DistributedAvatarAI.delete(self)
|
||||||
|
|
|
@ -1,58 +0,0 @@
|
||||||
from pandac.PandaModules import StringStream
|
|
||||||
from direct.distributed.PyDatagram import PyDatagram
|
|
||||||
import random
|
|
||||||
|
|
||||||
class ClsendTracker:
|
|
||||||
clsendNotify = directNotify.newCategory('clsend')
|
|
||||||
NumTrackersLoggingOverflow = 0
|
|
||||||
MaxTrackersLoggingOverflow = config.GetInt('max-clsend-loggers', 5)
|
|
||||||
|
|
||||||
def __init__(self):
|
|
||||||
self._logClsendOverflow = False
|
|
||||||
if self.isPlayerControlled():
|
|
||||||
if simbase.air.getTrackClsends():
|
|
||||||
if ClsendTracker.NumTrackersLoggingOverflow < ClsendTracker.MaxTrackersLoggingOverflow:
|
|
||||||
self._logClsendOverflow = random.random() < 1.0 / config.GetFloat('clsend-log-one-av-in-every', choice(__dev__, 4, 50))
|
|
||||||
if self._logClsendOverflow:
|
|
||||||
ClsendTracker.NumTrackersLoggingOverflow += 1
|
|
||||||
self._clsendMsgs = []
|
|
||||||
self._clsendBufLimit = 100
|
|
||||||
self._clsendFlushNum = 20
|
|
||||||
self._clsendCounter = 0
|
|
||||||
|
|
||||||
def announceGenerate(self):
|
|
||||||
if self._logClsendOverflow:
|
|
||||||
self.clsendNotify.info('logging all clsends for %s' % self.doId)
|
|
||||||
|
|
||||||
def destroy(self):
|
|
||||||
if self._logClsendOverflow:
|
|
||||||
ClsendTracker.NumTrackersLoggingOverflow -= 1
|
|
||||||
|
|
||||||
def trackClientSendMsg(self, dataStr):
|
|
||||||
self._clsendMsgs.append((self.air.getAvatarIdFromSender(), dataStr))
|
|
||||||
if len(self._clsendMsgs) >= self._clsendBufLimit:
|
|
||||||
self._trimClsend()
|
|
||||||
|
|
||||||
def _trimClsend(self):
|
|
||||||
for i in xrange(self._clsendFlushNum):
|
|
||||||
if self._logClsendOverflow:
|
|
||||||
self._logClsend(*self._clsendMsgs[0])
|
|
||||||
self._clsendMsgs = self._clsendMsgs[1:]
|
|
||||||
self._clsendCounter += 1
|
|
||||||
|
|
||||||
def _logClsend(self, senderId, dataStr):
|
|
||||||
msgStream = StringStream()
|
|
||||||
simbase.air.describeMessage(msgStream, '', dataStr)
|
|
||||||
readableStr = msgStream.getData()
|
|
||||||
sstream = StringStream()
|
|
||||||
PyDatagram(dataStr).dumpHex(sstream)
|
|
||||||
hexDump = sstream.getData()
|
|
||||||
self.clsendNotify.info('%s [%s]: %s%s' % (self.doId,
|
|
||||||
self._clsendCounter,
|
|
||||||
readableStr,
|
|
||||||
hexDump))
|
|
||||||
|
|
||||||
def dumpClientSentMsgs(self):
|
|
||||||
for msg in self._clsendMsgs:
|
|
||||||
self._logClsend(*msg)
|
|
||||||
self._clsendCounter += 1
|
|
|
@ -2,7 +2,7 @@
|
||||||
from pandac.PandaModules import *
|
from pandac.PandaModules import *
|
||||||
|
|
||||||
|
|
||||||
hashVal = 3611798738L
|
hashVal = 849017532
|
||||||
|
|
||||||
|
|
||||||
from toontown.coghq import DistributedCashbotBossSafe, DistributedCashbotBossCrane, DistributedBattleFactory, DistributedCashbotBossTreasure, DistributedCogHQDoor, DistributedSellbotHQDoor, DistributedFactoryElevatorExt, DistributedMintElevatorExt, DistributedLawOfficeElevatorExt, DistributedLawOfficeElevatorInt, LobbyManager, DistributedMegaCorp, DistributedFactory, DistributedLawOffice, DistributedLawOfficeFloor, DistributedLift, DistributedDoorEntity, DistributedSwitch, DistributedButton, DistributedTrigger, DistributedCrushableEntity, DistributedCrusherEntity, DistributedStomper, DistributedStomperPair, DistributedLaserField, DistributedGolfGreenGame, DistributedSecurityCamera, DistributedMover, DistributedElevatorMarker, DistributedBarrelBase, DistributedGagBarrel, DistributedBeanBarrel, DistributedHealBarrel, DistributedGrid, ActiveCell, DirectionalCell, CrusherCell, DistributedCrate, DistributedSinkingPlatform, BattleBlocker, DistributedMint, DistributedMintRoom, DistributedMintBattle, DistributedStage, DistributedStageRoom, DistributedStageBattle, DistributedLawbotBossGavel, DistributedLawbotCannon, DistributedLawbotChair, DistributedCogKart, DistributedCountryClub, DistributedCountryClubRoom, DistributedMoleField, DistributedCountryClubBattle, DistributedMaze, DistributedFoodBelt, DistributedBanquetTable, DistributedGolfSpot
|
from toontown.coghq import DistributedCashbotBossSafe, DistributedCashbotBossCrane, DistributedBattleFactory, DistributedCashbotBossTreasure, DistributedCogHQDoor, DistributedSellbotHQDoor, DistributedFactoryElevatorExt, DistributedMintElevatorExt, DistributedLawOfficeElevatorExt, DistributedLawOfficeElevatorInt, LobbyManager, DistributedMegaCorp, DistributedFactory, DistributedLawOffice, DistributedLawOfficeFloor, DistributedLift, DistributedDoorEntity, DistributedSwitch, DistributedButton, DistributedTrigger, DistributedCrushableEntity, DistributedCrusherEntity, DistributedStomper, DistributedStomperPair, DistributedLaserField, DistributedGolfGreenGame, DistributedSecurityCamera, DistributedMover, DistributedElevatorMarker, DistributedBarrelBase, DistributedGagBarrel, DistributedBeanBarrel, DistributedHealBarrel, DistributedGrid, ActiveCell, DirectionalCell, CrusherCell, DistributedCrate, DistributedSinkingPlatform, BattleBlocker, DistributedMint, DistributedMintRoom, DistributedMintBattle, DistributedStage, DistributedStageRoom, DistributedStageBattle, DistributedLawbotBossGavel, DistributedLawbotCannon, DistributedLawbotChair, DistributedCogKart, DistributedCountryClub, DistributedCountryClubRoom, DistributedMoleField, DistributedCountryClubBattle, DistributedMaze, DistributedFoodBelt, DistributedBanquetTable, DistributedGolfSpot
|
||||||
|
@ -33,7 +33,7 @@ from toontown.friends.TrueFriendsMgr import TrueFriendsMgr
|
||||||
from toontown.coghq.InGameEditorDCImports import *
|
from toontown.coghq.InGameEditorDCImports import *
|
||||||
from toontown.friends import TTPlayerFriendsManager, TTUFriendsManager
|
from toontown.friends import TTPlayerFriendsManager, TTUFriendsManager
|
||||||
from toontown.cogdominium import DistributedCogdoInterior, DistributedCogdoBattleBldg, DistributedCogdoElevatorExt, DistributedCogdoElevatorInt, DistributedCogdoBarrel, DistCogdoGame, DistCogdoLevelGame, DistCogdoBoardroomGame, DistCogdoCraneGame, DistCogdoMazeGame, DistCogdoFlyingGame, DistCogdoCrane, DistCogdoCraneMoneyBag, DistCogdoCraneCog
|
from toontown.cogdominium import DistributedCogdoInterior, DistributedCogdoBattleBldg, DistributedCogdoElevatorExt, DistributedCogdoElevatorInt, DistributedCogdoBarrel, DistCogdoGame, DistCogdoLevelGame, DistCogdoBoardroomGame, DistCogdoCraneGame, DistCogdoMazeGame, DistCogdoFlyingGame, DistCogdoCrane, DistCogdoCraneMoneyBag, DistCogdoCraneCog
|
||||||
from otp.distributed import Account, DistributedDistrict, DistributedDirectory
|
from otp.distributed import Account, DistributedDistrict
|
||||||
from toontown.estate import DistributedCannon, DistributedTarget, EstateManager, DistributedEstate, DistributedHouse, DistributedHouseInterior, DistributedGarden, DistributedHouseDoor, DistributedMailbox, DistributedFurnitureManager, DistributedFurnitureItem, DistributedBank, DistributedCloset, DistributedTrunk, DistributedPhone, DistributedFireworksCannon, DistributedLawnDecor, DistributedGardenPlot, DistributedGardenBox, DistributedFlower, DistributedGagTree, DistributedStatuary, DistributedToonStatuary, DistributedChangingStatuary, DistributedAnimatedStatuary, DistributedPlantBase, DistributedLawnDecor
|
from toontown.estate import DistributedCannon, DistributedTarget, EstateManager, DistributedEstate, DistributedHouse, DistributedHouseInterior, DistributedGarden, DistributedHouseDoor, DistributedMailbox, DistributedFurnitureManager, DistributedFurnitureItem, DistributedBank, DistributedCloset, DistributedTrunk, DistributedPhone, DistributedFireworksCannon, DistributedLawnDecor, DistributedGardenPlot, DistributedGardenBox, DistributedFlower, DistributedGagTree, DistributedStatuary, DistributedToonStatuary, DistributedChangingStatuary, DistributedAnimatedStatuary, DistributedPlantBase, DistributedLawnDecor
|
||||||
from toontown.toon import DistributedToon, DistributedNPCToonBase, DistributedNPCToon, DistributedSmartNPC, DistributedSmartNPC, DistributedNPCSpecialQuestGiver, DistributedNPCFlippyInToonHall, DistributedNPCScientist, DistributedNPCClerk, DistributedNPCTailor, DistributedNPCBlocker, DistributedNPCFisherman, DistributedNPCPartyPerson, DistributedNPCPetclerk, DistributedNPCKartClerk, DistributedNPCGlove
|
from toontown.toon import DistributedToon, DistributedNPCToonBase, DistributedNPCToon, DistributedSmartNPC, DistributedSmartNPC, DistributedNPCSpecialQuestGiver, DistributedNPCFlippyInToonHall, DistributedNPCScientist, DistributedNPCClerk, DistributedNPCTailor, DistributedNPCBlocker, DistributedNPCFisherman, DistributedNPCPartyPerson, DistributedNPCPetclerk, DistributedNPCKartClerk, DistributedNPCGlove
|
||||||
from toontown.tutorial import DistributedBattleTutorial, TutorialManager
|
from toontown.tutorial import DistributedBattleTutorial, TutorialManager
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
from direct.distributed.DistributedObject import DistributedObject
|
|
||||||
|
|
||||||
class DistributedDirectory(DistributedObject):
|
|
||||||
pass
|
|
|
@ -1,9 +0,0 @@
|
||||||
from direct.directnotify import DirectNotifyGlobal
|
|
||||||
from direct.distributed.DistributedObjectAI import DistributedObjectAI
|
|
||||||
|
|
||||||
class DistributedDirectoryAI(DistributedObjectAI):
|
|
||||||
notify = DirectNotifyGlobal.directNotify.newCategory("DistributedDirectoryAI")
|
|
||||||
|
|
||||||
def setParentingRules(self, todo0, todo1):
|
|
||||||
pass
|
|
||||||
|
|
|
@ -940,7 +940,6 @@ class OTPClientRepository(ClientRepositoryBase):
|
||||||
'meta-h',
|
'meta-h',
|
||||||
'meta-h-repeat',
|
'meta-h-repeat',
|
||||||
'control-f9',
|
'control-f9',
|
||||||
'newDistributedDirectory',
|
|
||||||
'page_down',
|
'page_down',
|
||||||
'page_up',
|
'page_up',
|
||||||
'panda3d-render-error',
|
'panda3d-render-error',
|
||||||
|
@ -953,7 +952,6 @@ class OTPClientRepository(ClientRepositoryBase):
|
||||||
'window-event',
|
'window-event',
|
||||||
'TCRSetZoneDone',
|
'TCRSetZoneDone',
|
||||||
'aspectRatioChanged',
|
'aspectRatioChanged',
|
||||||
'newDistributedDirectory',
|
|
||||||
CConnectionRepository.getOverflowEventName(),
|
CConnectionRepository.getOverflowEventName(),
|
||||||
self._getLostConnectionEvent(),
|
self._getLostConnectionEvent(),
|
||||||
'render-texture-targets-changed',
|
'render-texture-targets-changed',
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
from direct.distributed.PyDatagram import *
|
from direct.distributed.PyDatagram import *
|
||||||
import urlparse
|
import urlparse
|
||||||
|
|
||||||
from otp.distributed.DistributedDirectoryAI import DistributedDirectoryAI
|
|
||||||
from otp.distributed.OtpDoGlobals import *
|
from otp.distributed.OtpDoGlobals import *
|
||||||
from toontown.distributed.ToontownInternalRepository import ToontownInternalRepository
|
from toontown.distributed.ToontownInternalRepository import ToontownInternalRepository
|
||||||
import toontown.minigame.MinigameCreatorAI
|
import toontown.minigame.MinigameCreatorAI
|
||||||
|
@ -32,9 +31,6 @@ class ToontownUberRepository(ToontownInternalRepository):
|
||||||
self.notify.setInfo(True)
|
self.notify.setInfo(True)
|
||||||
|
|
||||||
def handleConnected(self):
|
def handleConnected(self):
|
||||||
rootObj = DistributedDirectoryAI(self)
|
|
||||||
rootObj.generateWithRequiredAndId(self.getGameDoId(), 0, 0)
|
|
||||||
|
|
||||||
if config.GetBool('want-rpc-server', False):
|
if config.GetBool('want-rpc-server', False):
|
||||||
endpoint = config.GetString('rpc-server-endpoint', 'http://localhost:8080/')
|
endpoint = config.GetString('rpc-server-endpoint', 'http://localhost:8080/')
|
||||||
self.rpcServer = ToontownRPCServer(endpoint, ToontownRPCHandler(self))
|
self.rpcServer = ToontownRPCServer(endpoint, ToontownRPCHandler(self))
|
||||||
|
|
Loading…
Reference in a new issue