Skip to content

Commit

Permalink
Remove not professional comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin-Loison committed Feb 19, 2024
1 parent c86c5e2 commit a3a157b
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
10 changes: 5 additions & 5 deletions Scripts/Python/DijkstraRoadItinerary.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ def distanceSquare(point0, point1):

segmentsUnicity = {} # unicity
for segment in segments:
segmentsUnicity[str(segment)] = 0 # unhashable type: "list" love python lol
segmentsUnicity[str(segment)] = 0 # unhashable type: "list"
print(len(segments), len(segmentsUnicity))

def distance(point0, point1):
Expand All @@ -233,7 +233,7 @@ def findNearest(x, y, l):
def find2Nearest(x, y):
pts = points[:] # otherwise problem with pointer
pointNearest = findNearest(x, y, pts)
pts.remove(pointNearest) # used to be [x, y] lol
pts.remove(pointNearest) # used to be [x, y]
pointLessNear = findNearest(x, y, pts)
return pointNearest, pointLessNear

Expand Down Expand Up @@ -265,11 +265,11 @@ def find2Nearest(x, y):
if d > 2560000: # 1 600² (800 max length)
continue
intersection = collisionRoad(segment0, segment1) # used to be collision, find_intersection
if intersection != None: #[INFINITY, INFINITY]: # None is better than INFINITY lol
if intersection != None: #[INFINITY, INFINITY]: # None is better than INFINITY
print("intersection: " + str(intersectionCounter))
intersectionCounter += 1
points += [intersection] # assume no intersection on already treated points (otherwise don't break the algorithm, sure ?) otherwise use addIfNotIn function
segments += [[intersection, segment0[0], 0, INFINITY], [intersection, segment0[1], 0, INFINITY], [intersection, segment1[0], 0, INFINITY], [intersection, segment1[1], 0, INFINITY]] # no intersection on intersection please god <3
segments += [[intersection, segment0[0], 0, INFINITY], [intersection, segment0[1], 0, INFINITY], [intersection, segment1[0], 0, INFINITY], [intersection, segment1[1], 0, INFINITY]] # no intersection on intersection

# points: 41 972 -> 63 675 (delta = 21 703)
# segments: 20 986 -> 107 798
Expand Down Expand Up @@ -546,4 +546,4 @@ def rep(line):
# 0 1 1
# 0 1

# default technic doesn't pay the bill because indexes are written with approximatively the same numbers of characters than coordinates themselves lol 800 Kb -> 1 100 Kb (let's take this in order to be as near as possible from the internet code for Dijksta)
# default technic doesn't pay the bill because indexes are written with approximatively the same numbers of characters than coordinates themselves 800 Kb -> 1 100 Kb (let's take this in order to be as near as possible from the internet code for Dijksta)
4 changes: 2 additions & 2 deletions Scripts/Python/DisplayPoints.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# instead of online Geogebra lol
# instead of online Geogebra

import matplotlib.pyplot as plt

Expand Down Expand Up @@ -63,4 +63,4 @@
vrs0Len = len(vrs[0])
for ptIndex in range(vrs0Len): # vrs0Len
pt = vrs[0][ptIndex]
l += [[pt[0], pt[1]]]
l += [[pt[0], pt[1]]]
2 changes: 1 addition & 1 deletion Scripts/Python/FastCountNature.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
if linePartsLen >= 3:
count = int(lineParts[1])
model = lineParts[2]
modelParts = model.split('\\') # used to be '/' lol
modelParts = model.split('\\') # used to be '/'
modelPartsLen = len(modelParts)
#print(line)
if modelPartsLen > 1:
Expand Down
4 changes: 2 additions & 2 deletions Scripts/Python/getMiddle.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
MIN_Y, MAX_Y = 0, 30720
MIN_LAT, MAX_LAT = 39.7155070496, 40.0959350219

# don't need MAX_X/Y lol - ah si
# don't need MAX_X/Y - we do

def lon(x):
return MIN_LON + ((x - MIN_X) / (MAX_X - MIN_X)) * (MAX_LON - MIN_LON)
Expand Down Expand Up @@ -56,4 +56,4 @@ def lat(y):
fileNamePartsLen = len(fileNameParts)
if fileNamePartsLen >= 2:
fileName = fileNameParts[0].replace("%s", fileNameParts[1])
print(fileName + " " + xStr + " " + yStr)
print(fileName + " " + xStr + " " + yStr)
4 changes: 2 additions & 2 deletions Scripts/Python/mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def getNodesFromLine(linesIndex):
for linesIndex in range(linesLen):
line = lines[linesIndex]
#needle = NODE_LOCATION
if NODE_LOCATION in line: # used to be needle lol
if NODE_LOCATION in line: # used to be needle
nodeId = line.split(NODE_LOCATION)[1].split('"')[0]
lon = float(line.split(LON_STR)[1].split('"')[0])
lat = float(line.split(LAT_STR)[1].split('"')[0])
Expand Down Expand Up @@ -1135,7 +1135,7 @@ def workOnInstance(xDelta, yDelta, xD, yD, X, Y, threadId):
for yT in range(yDelta):
for xT in range(xDelta):
xAI = xMin + (xT / xDelta) * xD
yAI = yMin + (yT / yDelta) * yD # used to be xDelta lol
yAI = yMin + (yT / yDelta) * yD # used to be xDelta
#print(x, y, X, Y)
if isIn(xAI, yAI, X, Y): #x, y seems to overwrite on barycenter position otherwise
pic[yT][xT] = CST_T
Expand Down
2 changes: 1 addition & 1 deletion Server/LemnosLife/Map/User/User.h
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ class User
Inventory* getInventoryPtr();
OBB getOBB();
private:
std::string m_username, m_ip, m_portStr, m_language, m_gangName, m_escorted, m_escorting, m_loading/*, m_huntingUsername*/, m_animation, m_inventoryStr; // could use a User pointer for huntingUser ? or circular build lol
std::string m_username, m_ip, m_portStr, m_language, m_gangName, m_escorted, m_escorting, m_loading/*, m_huntingUsername*/, m_animation, m_inventoryStr; // could use a User pointer for huntingUser ? or circular build
View m_view, m_viewDeath;
unsigned short m_userId, m_port, m_adminLevel, m_policeLevel, m_vipLevel, m_job, m_food, m_drink, m_health, m_regen, m_bleeding, m_breakBone;
unsigned int m_tokens, m_disconnection, m_ridingVehicleId;
Expand Down

0 comments on commit a3a157b

Please sign in to comment.