about summary refs log tree commit diff
path: root/datasrc/network.py
diff options
context:
space:
mode:
authoroy <Tom_Adams@web.de>2011-03-01 18:31:20 +0100
committeroy <Tom_Adams@web.de>2011-03-01 18:31:20 +0100
commit4bede550be18cfc9bb4df669c147032917160066 (patch)
tree56652609b0a47df5e1cf27abbbaf8a3d5cf9756d /datasrc/network.py
parent0bc13c91ebcc6404fc67e079e5a9acad10176c98 (diff)
downloadzcatch-4bede550be18cfc9bb4df669c147032917160066.tar.gz
zcatch-4bede550be18cfc9bb4df669c147032917160066.zip
only update the ping if the scoreboard is active. Closes #27
Diffstat (limited to 'datasrc/network.py')
-rw-r--r--datasrc/network.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/datasrc/network.py b/datasrc/network.py
index c80adc57..2489b131 100644
--- a/datasrc/network.py
+++ b/datasrc/network.py
@@ -1,7 +1,7 @@
 from datatypes import *
 
 Emotes = ["NORMAL", "PAIN", "HAPPY", "SURPRISE", "ANGRY", "BLINK"]
-PlayerStates = ["UNKNOWN", "PLAYING", "IN_MENU", "CHATTING"]
+PlayerFlags = ["PLAYING", "IN_MENU", "CHATTING", "SCOREBOARD"]
 GameFlags = ["TEAMS", "FLAGS"]
 
 Emoticons = [str(x) for x in range(0,16)]
@@ -31,13 +31,13 @@ RawSource = '''
 '''
 
 Enums = [
-	Enum("PLAYERSTATE", PlayerStates),
 	Enum("EMOTE", Emotes),
 	Enum("POWERUP", Powerups),
 	Enum("EMOTICON", Emoticons)
 ]
 
 Flags = [
+	Enum("PLAYERFLAG", PlayerFlags),
 	Flags("GAMEFLAG", GameFlags)
 ]
 
@@ -52,7 +52,7 @@ Objects = [
 		NetIntAny("m_Fire"),
 		NetIntAny("m_Hook"),
 		
-		NetIntRange("m_PlayerState", 0, len(PlayerStates)),
+		NetIntRange("m_PlayerFlags", 0, 256),
 		
 		NetIntAny("m_WantedWeapon"),
 		NetIntAny("m_NextWeapon"),
@@ -136,7 +136,7 @@ Objects = [
 	]),
 
 	NetObject("Character:CharacterCore", [
-		NetIntRange("m_PlayerState", 0, 'NUM_PLAYERSTATES-1'),
+		NetIntRange("m_PlayerFlags", 0, 256),
 		NetIntRange("m_Health", 0, 10),
 		NetIntRange("m_Armor", 0, 10),
 		NetIntRange("m_AmmoCount", 0, 10),
@@ -152,7 +152,6 @@ Objects = [
 
 		NetIntAny("m_Score"),
 		NetIntAny("m_Latency"),
-		NetIntAny("m_LatencyFlux"),
 	]),
 
 	NetObject("ClientInfo", [