fixed bug where the correct port wasnt being set per game type
This commit is contained in:
parent
1bf8b589a3
commit
bc9381627c
4 changed files with 8 additions and 1 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -72,7 +72,14 @@ def csvWriteOut(firstRun,carData,csvFile):
|
|||
|
||||
def runningThread():
|
||||
global stopThread
|
||||
gameType= tkGametype.get()
|
||||
|
||||
#check everything is connected
|
||||
if gameType==GameType.BEAMNG.value:
|
||||
portToConnect=BEAMNG_UDP_PORT
|
||||
elif gameType==GameType.FORZA.value:
|
||||
portToConnect=FORZA_UDP_PORT
|
||||
|
||||
try:
|
||||
sock = socket.socket(socket.AF_INET,socket.SOCK_DGRAM)
|
||||
sock.bind((UDP_IP,portToConnect))
|
||||
|
|
@ -91,7 +98,7 @@ def runningThread():
|
|||
if csvOut == True:
|
||||
csvFile = open(loggingLocationText.get(),"a")
|
||||
|
||||
gameType= tkGametype.get()
|
||||
|
||||
|
||||
while not stopThread:
|
||||
data, addr = sock.recvfrom(1024)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue