From: <Blu...@us...> - 2010-07-27 19:28:01
|
Revision: 339 http://virtplayground.svn.sourceforge.net/virtplayground/?rev=339&view=rev Author: BlueWolf_ Date: 2010-07-27 19:27:54 +0000 (Tue, 27 Jul 2010) Log Message: ----------- Added a max speed option in the config. Does -of course- nothing right now. It's just there for the decoration :D Modified Paths: -------------- trunk/server/core/functions.py trunk/server/core/server.py Modified: trunk/server/core/functions.py =================================================================== --- trunk/server/core/functions.py 2010-04-24 22:05:37 UTC (rev 338) +++ trunk/server/core/functions.py 2010-07-27 19:27:54 UTC (rev 339) @@ -15,7 +15,6 @@ ## along with this program; if not, write to the Free Software ## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - def check_version(version, expr): """ Checks whether a version meets certain conditions. Modified: trunk/server/core/server.py =================================================================== --- trunk/server/core/server.py 2010-04-24 22:05:37 UTC (rev 338) +++ trunk/server/core/server.py 2010-07-27 19:27:54 UTC (rev 339) @@ -69,18 +69,24 @@ How many bits the rsa uses for encrypting the password. More = more secure but slower to generate. Default is 64 - -bot_names + -bot_names: How the name for a bot should be. Use %s where the suggested name should be. Default is [%s]. When a bot logs in as "test", it will be displayed as "[test]". Choose something that won't interfere with existing users. - -viewport + -viewport: A tuple of the client's viewport in pixels. This is very important because it's used to calculate which objects - and people the client is able to see. By default, this + and people the client is able to see. By default this is (1000, 700). + + -max_speed: + The amount of pixels a user may move in a certain time. + The default is (50, 1.0) which basically means 50px per + 1 second. When a user exceeds this, the server will just + reset his position to his last known location. """ @@ -115,6 +121,8 @@ config['bot_names'] = str(config.get('bot_names', "[%s]")) config['viewport'] = tuple(config.get('viewport', (1000,700))) + config['max_speed'] = tuple(config.get('max_speed', (50, 1.0))) + def start_server(self): """ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |