Developer Store
Support
Member Forums

Screenshots
FAQ
Documentation
License
Known Issues
Downloads

MMOWorkshop BACK!

PyTorque
TGB Web Browser


DarkBaneStudios

hallsofvalhalla - Been A while
xapken - Wizards and Champions
J.C. Smith - The Repopulation - 0.5.2 Build Notes
EmpireGames - Elementals in Rise of Heroes
Empire Games - WarPath.
jaidurn - Warcall 0.0.1.0 build notes
medafor - Final detailing of models
Thamior - Presence system GONE! [May 25th 2009)]
... MORE BLOGS!

Building a MMO
Wow I had no idea....
Quest Remnants of Chaos
Checking to see if anyone is sti...
Well here I am again :)
T3D and MMOKit
afx 2.0
Terrain specularity [video]
Torque T3D MMO Kit
[3dFoin] Dragon Bug
Index: C:/newtgeawork/repopulation_kit/trunk/mommmo/mud/simulation/simmind.py
===================================================================
--- C:/newtgeawork/repopulation_kit/trunk/mommmo/mud/simulation/simmind.py	(revision 157)
+++ C:/newtgeawork/repopulation_kit/trunk/mommmo/mud/simulation/simmind.py	(revision 158)
@@ -426,6 +426,7 @@
         self.zoneInstanceName = zoneInstanceName
         self.perspective = perspective #-> SimAvatar on World
         self.zombieUpdateTimer = 4
+        self.playerConn = 0
         
         self.simLookup = SimLookup()
         self.simObjects = []
@@ -700,6 +702,7 @@
             
     def onClientEnterGameResult(self,results,connection):
         #this actually spawns the player object and stuff
+        self.playerConn = True
         if connection not in self.gameConnectionIds:
             print "Player Dropped before Client Enter Game, possible kick - disabled return for debug"
             #print "gameconnection ids = %s"%self.gameConnectionIds
@@ -752,17 +755,32 @@
         self.mobInfos[playerid] = mobInfos[avatarIndex] #first character
         d = self.perspective.callRemote("SimAvatar","setPlayerSimObject",name,so)
         #TGEEval("startLightning();")
         #TGEEval("startRain();")
+        
+    def dotick(self):
+        if self.playerConn:
+            return
+        
+        print "ERROR: Had to force PLAERYMIND to tick"
+        
+        from mud.client.playermind import PLAYERMIND
+        PLAYERMIND.tick()
+        
+        reactor.callLater(1,self.dotick)
+
         
     def onClientEnterGame(self,connection):
         if int(TGEGetGlobal("$Py::ISSINGLEPLAYER")):
             name = "ThePlayer"
         else:
             name = TGEObject(connection).getPublicName()

         d = self.perspective.callRemote("SimAvatar","onClientEnterGame",name)
         d.addCallback(self.onClientEnterGameResult,connection)
+        reactor.callLater(1,self.dotick)
     
Index: C:/newtgeawork/repopulation_kit/trunk/mommmo/mud/client/playermind.py
===================================================================
--- C:/newtgeawork/repopulation_kit/trunk/mommmo/mud/client/playermind.py	(revision 157)
+++ C:/newtgeawork/repopulation_kit/trunk/mommmo/mud/client/playermind.py	(revision 158)
@@ -73,9 +73,13 @@
         if self.running or not len(self.commands):
             return
         delta = time.time()-self.lasttime
-        if delta < .25:
+        #This is to fix a potential time skew isue
+        if delta < .25 and delta > 0:
             return
-        self.lasttime = time.time()
+        if (delta < 0):
+            self.lasttime = 0
+        else:
+            self.lasttime = time.time()
         d,_name,args,kw = self.commands.pop(0)
         nd = self.perspective.callRemote(_name,*args,**kw)
         nd.chainDeferred(d)        
@@ -213,10 +216,16 @@
         return d
 
     def tick(self):
+        if not self.running:
+            return
         
+        reactor.callLater(.05,self.gotick)
+        reactor.callLater(.1, self.tick)
+        
+    def gotick(self):
+        
         #import time
         #tm = time.time()
-        
         if self.perspective:
             if self.perspective.broker.disconnected:
                 self.running = False
@@ -432,8 +434,6 @@
                 #border.setPosition(posx,posy) #jc   
                 TGEEval("PushToolTips();")
                 
-               
-        reactor.callLater(.1,self.tick)
         #print time.time()-tm,"client tick"
 
     def camp(self,result,quit=False):