Fixed a strange case in the dummyrunner.
This commit is contained in:
parent
cf2b83ef0a
commit
d0d56ee5bf
2 changed files with 16 additions and 10 deletions
|
|
@ -234,6 +234,9 @@ class DummyClient(telnet.StatefulTelnetProtocol):
|
||||||
NLOGGED_IN += 1 # this is for book-keeping
|
NLOGGED_IN += 1 # this is for book-keeping
|
||||||
print "connecting client %s (%i/%i)..." % (self.key, NLOGGED_IN, NCLIENTS)
|
print "connecting client %s (%i/%i)..." % (self.key, NLOGGED_IN, NCLIENTS)
|
||||||
self._loggedin = True
|
self._loggedin = True
|
||||||
|
else:
|
||||||
|
# no login yet, so cmdlist not yet set
|
||||||
|
return
|
||||||
else:
|
else:
|
||||||
# we always pick a cumulatively random function
|
# we always pick a cumulatively random function
|
||||||
crand = random.random()
|
crand = random.random()
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,7 @@ TIMESTEP = 2
|
||||||
|
|
||||||
# Chance of a dummy actually performing an action on a given tick.
|
# Chance of a dummy actually performing an action on a given tick.
|
||||||
# This spreads out usage randomly, like it would be in reality.
|
# This spreads out usage randomly, like it would be in reality.
|
||||||
CHANCE_OF_ACTION = 0.05
|
CHANCE_OF_ACTION = 1.0#0.05
|
||||||
|
|
||||||
# Chance of a currently unlogged-in dummy performing its login
|
# Chance of a currently unlogged-in dummy performing its login
|
||||||
# action every tick. This emulates not all players logging in
|
# action every tick. This emulates not all players logging in
|
||||||
|
|
@ -240,15 +240,18 @@ def c_moves_s(client):
|
||||||
# #(0.1, c_creates_button),
|
# #(0.1, c_creates_button),
|
||||||
# #(0.4, c_moves))
|
# #(0.4, c_moves))
|
||||||
## "normal player" definition
|
## "normal player" definition
|
||||||
ACTIONS = ( c_login,
|
#ACTIONS = ( c_login,
|
||||||
c_logout,
|
# c_logout,
|
||||||
(0.01, c_digs),
|
# (0.01, c_digs),
|
||||||
(0.39, c_looks),
|
# (0.39, c_looks),
|
||||||
(0.2, c_help),
|
# (0.2, c_help),
|
||||||
(0.4, c_moves))
|
# (0.4, c_moves))
|
||||||
#ACTIONS = (c_login_nodig,
|
# walking tester. This requires a pre-made
|
||||||
# c_logout,
|
# "loop" of multiple rooms that ties back
|
||||||
# (1.0, c_moves_n))
|
# to limbo (using @tunnel and @open)
|
||||||
|
ACTIONS = (c_login_nodig,
|
||||||
|
c_logout,
|
||||||
|
(1.0, c_moves_n))
|
||||||
## "socializing heavy builder" definition
|
## "socializing heavy builder" definition
|
||||||
#ACTIONS = (c_login,
|
#ACTIONS = (c_login,
|
||||||
# c_logout,
|
# c_logout,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue