mirror of
https://github.com/solero/houdini.git
synced 2024-11-26 07:27:24 +00:00
Use integer division to generate server population level
This commit is contained in:
parent
9584ceede2
commit
1908646e25
@ -40,7 +40,7 @@ async def get_server_presence(p, pid):
|
|||||||
if server_config['World']:
|
if server_config['World']:
|
||||||
server_population = await p.server.redis.hget('population', server_config['Id'])
|
server_population = await p.server.redis.hget('population', server_config['Id'])
|
||||||
server_population = (7 if int(server_population) == server_config['Capacity']
|
server_population = (7 if int(server_population) == server_config['Capacity']
|
||||||
else int(server_population) / (server_config['Capacity'] / 6)) \
|
else int(server_population) // (server_config['Capacity'] // 6)) \
|
||||||
if server_population else 0
|
if server_population else 0
|
||||||
|
|
||||||
world_populations.append('{},{}'.format(server_config['Id'], server_population))
|
world_populations.append('{},{}'.format(server_config['Id'], server_population))
|
||||||
|
Loading…
Reference in New Issue
Block a user