Index: /code/trunk/init/common/def_keybindings.ini
===================================================================
--- /code/trunk/init/common/def_keybindings.ini	(revision 1897)
+++ /code/trunk/init/common/def_keybindings.ini	(revision 1897)
@@ -0,0 +1,260 @@
+[Keys]
+KeyA="scale -1 moveLateral"
+KeyABNT_C1=
+KeyABNT_C2=
+KeyAT=
+KeyAX=
+KeyApostrophe=
+KeyApps=
+KeyB=
+KeyBack=
+KeyBackslash=
+KeyC=
+KeyCalculator=
+KeyCapsLock=
+KeyColon=
+KeyComma=
+KeyConvert=
+KeyD="scale 1 moveLateral"
+KeyDelete=
+KeyDivide=
+KeyDown=
+KeyE="scale -1 moveRoll"
+KeyEnd=
+KeyEquals=
+KeyEscape="exit"
+KeyF=
+KeyF1="OverlayGroup toggleVisibility Debug"
+KeyF10=
+KeyF11=
+KeyF12=
+KeyF13=
+KeyF14=
+KeyF15=
+KeyF2=
+KeyF3=
+KeyF4=
+KeyF5=
+KeyF6=
+KeyF7=
+KeyF8=
+KeyF9=
+KeyG=
+KeyGrave="openConsole"
+KeyH=
+KeyHome=
+KeyI=
+KeyInsert=
+KeyJ=
+KeyK=
+KeyKana=
+KeyKanji=
+KeyL=
+KeyLeft=
+KeyLeftAlt=
+KeyLeftBracket=
+KeyLeftControl=
+KeyLeftShift=
+KeyLeftWindows=
+KeyLessThan=
+KeyM=
+KeyMail=
+KeyMediaSelect=
+KeyMediaStop=
+KeyMinus=
+KeyMultiply=
+KeyMute=
+KeyMyComputer=
+KeyN=
+KeyNextTrack=
+KeyNoConvert=
+KeyNumLock=
+KeyNumRow0=
+KeyNumRow1=
+KeyNumRow2=
+KeyNumRow3=
+KeyNumRow4=
+KeyNumRow5=
+KeyNumRow6=
+KeyNumRow7=
+KeyNumRow8=
+KeyNumRow9=
+KeyNumpad0=
+KeyNumpad1=
+KeyNumpad2=
+KeyNumpad3=
+KeyNumpad4=
+KeyNumpad5=
+KeyNumpad6=
+KeyNumpad7=
+KeyNumpad8=
+KeyNumpad9=
+KeyNumpadAdd=
+KeyNumpadComma=
+KeyNumpadEnter=
+KeyNumpadEquals=
+KeyNumpadPeriod=
+KeyNumpadSubtract=
+KeyO=
+KeyP=
+KeyPageDown=
+KeyPageUp=
+KeyPause=
+KeyPeriod=
+KeyPlayPause=
+KeyPower=
+KeyPreviousTrack=
+KeyQ="scale 1 moveRoll"
+KeyR=
+KeyReturn=
+KeyRight=
+KeyRightAlt=
+KeyRightBracket=
+KeyRightControl=
+KeyRightShift=
+KeyRightWindows=
+KeyS="scale -1 moveLongitudinal"
+KeyScrollLock=
+KeySemicolon=
+KeySlash=
+KeySleep=
+KeySpace=
+KeyStop=
+KeySystemRequest=
+KeyT=
+KeyTab="cycleNavigationFocus"
+KeyU=
+KeyUP=
+KeyUnassigned=
+KeyUnderline=
+KeyUnlabeled=
+KeyV=
+KeyVolumeDown=
+KeyVolumeUp=
+KeyW="scale 1 moveLongitudinal"
+KeyWake=
+KeyWebBack=
+KeyWebFavorites=
+KeyWebForward=
+KeyWebHome=
+KeyWebRefresh=
+KeyWebSearch=
+KeyWebStop=
+KeyX=
+KeyY=
+KeyYen=
+KeyZ=
+Key_084=
+Key_085=
+Key_089=
+Key_090=
+Key_091=
+Key_092=
+Key_093=
+Key_094=
+Key_095=
+Key_096=
+Key_097=
+Key_098=
+Key_099=
+Key_103=
+Key_104=
+Key_105=
+Key_106=
+Key_107=
+Key_108=
+Key_109=
+Key_110=
+Key_111=
+Key_112=
+Key_114=
+Key_115=
+Key_117=
+Key_118=
+Key_119=
+Key_120=
+Key_121=
+Key_123=
+Key_125=
+Key_128=
+Key_129=
+Key_130=
+Key_131=
+Key_132=
+Key_133=
+Key_134=
+Key_135=
+Key_136=
+Key_137=
+Key_138=
+Key_139=
+Key_140=
+Key_141=
+Key_143=
+Key_144=
+Key_154=
+Key_155=
+Key_158=
+Key_159=
+Key_163=
+Key_165=
+Key_166=
+Key_167=
+Key_168=
+Key_169=
+Key_170=
+Key_171=
+Key_172=
+Key_173=
+Key_175=
+Key_177=
+Key_180=
+Key_182=
+Key_185=
+Key_186=
+Key_187=
+Key_188=
+Key_189=
+Key_190=
+Key_191=
+Key_192=
+Key_193=
+Key_194=
+Key_195=
+Key_196=
+Key_198=
+Key_202=
+Key_204=
+Key_206=
+Key_212=
+Key_213=
+Key_214=
+Key_215=
+Key_216=
+Key_217=
+Key_218=
+Key_224=
+Key_225=
+Key_226=
+Key_228=
+
+[MouseButtons]
+MouseButton3=
+MouseButton4=
+MouseButton5=
+MouseButton6=
+MouseButton7=
+MouseLeft="fire"
+MouseMiddle=
+MouseRight=
+MouseWheel1Down=
+MouseWheel1Up=
+MouseWheel2Down=
+MouseWheel2Up=
+
+[MouseAxes]
+MouseXNeg="scale 1 moveYaw"
+MouseXPos="scale -1 moveYaw"
+MouseYNeg="scale 1 movePitch"
+MouseYPos="scale -1 movePitch"
+
Index: /code/trunk/init/common/irc.tcl
===================================================================
--- /code/trunk/init/common/irc.tcl	(revision 1897)
+++ /code/trunk/init/common/irc.tcl	(revision 1897)
@@ -0,0 +1,6 @@
+proc every {ms body} { eval $body; after $ms [list every $ms $body] }
+package require irk
+set conn [irk::connect orxonox $nickname]
+irk::join $conn #orxonox
+every 25 {}
+vwait termination
Index: /code/trunk/init/common/remote.tcl
===================================================================
--- /code/trunk/init/common/remote.tcl	(revision 1897)
+++ /code/trunk/init/common/remote.tcl	(revision 1897)
@@ -0,0 +1,2 @@
+set telnetserverthreadid [TclThreadManager create]
+TclThreadManager execute $telnetserverthreadid source telnet_server.tcl
Index: /code/trunk/init/common/telnet_server.tcl
===================================================================
--- /code/trunk/init/common/telnet_server.tcl	(revision 1897)
+++ /code/trunk/init/common/telnet_server.tcl	(revision 1897)
@@ -0,0 +1,209 @@
+ #!/usr/bin/env tclsh
+ # Pseudo-telnet server.  Includes basic auth, but no separate identities
+ # or proper multi-threaded operation, so whoever runs this had better
+ # trust those he gives identities/passwords to and they had better trust
+ # each other too.  Note this script does not support command-line arguments.
+
+ ## The names of this array are IP addresses of hosts that are not permitted
+ ## to connect to any of our services.  Admin account(s) can change this
+ ## at run-time, though this info is not maintained across whole-server shutdowns.
+ array set denyHosts {}
+
+ ## Keep the Tcl-thread busy
+ proc every {ms body} { eval $body; after $ms [list every $ms $body] }
+ every 200 {}
+
+ ## Create a server on the given port with the given name/password map
+ ## and the given core interaction handler.
+ proc telnetServer {port {passmap} {handlerCmd remoteCommand}} {
+     if {$port == 0} {
+         return -code error "Only non-zero port numbers are supported"
+     }
+     set server [socket -server [list connect $port $handlerCmd] $port]
+     global passwords services
+     foreach {id pass} $passmap {set passwords($port,$id) $pass}
+     set services($server) $handlerCmd
+     return $server
+ }
+
+ ## Removes the server on the given port, cleaning up the extra state too.
+ proc closedownServer {server} {
+     global services passwords connections auth
+     set port [lindex [fconfigure $server -sockname] 2]
+     catch {close $server}
+     unset services($server)
+     foreach passmap [array names passwords $port,*] {
+         unset passwords($passmap)
+     }
+     # Hmph!  Have to remove unauthorized connections too, though any
+     # connection which has been authorized can continue safely.
+     foreach {client data} [array get connections] {
+         if {$port == [lindex $data 0] && !$auth($client)} {
+             disconnect $client
+         }
+     }
+ }
+
+ ## Handle an incoming connection to the given server
+ proc connect {serverport handlerCmd client clienthost clientport} {
+     global auth cmd denyHosts connections
+     if {[info exist denyHosts($clienthost)]} {
+         puts stdout "${clienthost}:${clientport} attempted connection"
+         catch {puts $client "Connection denied"}
+         catch {close $client}
+         return
+     }
+     puts stdout "${clienthost}:${clientport} connected on $client"
+     fileevent $client readable "handle $serverport $client"
+     set auth($client) 0
+     set cmd($client) $handlerCmd
+     set connections($client) [list $serverport $clienthost $clientport]
+     fconfigure $client -buffering none
+     catch {puts -nonewline $client "Login: "}
+ }
+
+ ## Disconnect the given client, cleaning up any connection-specific data
+ proc disconnect {client} {
+     catch {close $client}
+     global auth cmd connections
+     unset auth($client)
+     unset cmd($client)
+     unset connections($client)
+     puts stdout "$client disconnected"
+ }
+
+ ## Handle data sent from the client.  Log-in is handled directly by this
+ ## procedure, and requires the name and password on the same line
+ proc handle {serverport client} {
+     global passwords auth cmd
+     if {[gets $client line] < 0} {
+         disconnect $client
+         return
+     }
+     if {[string equal $line "quit"] || [string equal $line "exit"]} {
+         disconnect $client
+         return
+     }
+     if {$auth($client)} {
+         eval $cmd($client) [list $client $line 0]
+         eval $cmd($client) [list $client $line 1]
+         return
+     }
+     foreach {id pass} [split $line] {break}
+     if {![info exist pass]} {
+         catch {puts -nonewline $client "Login: "}
+         return
+     }
+     if {
+         [info exist passwords($serverport,$id)] &&
+         [string equal $passwords($serverport,$id) $pass]
+     } then {
+         set auth($client) 1
+         puts stdout "$id logged in on $client"
+         catch {puts $client "Welcome, $id!"}
+         eval $cmd($client) [list $client $line 1]
+         return
+     }
+     puts stdout "AUTH FAILURE ON $client"
+     catch {puts $client "Unknown name or password"}
+     disconnect $client
+ }
+
+ ## Standard handler for logged-in conversations and prompt-generation.
+ proc execCommand {client line prompt} {
+     global tcl_platform
+     if {$prompt} {
+         catch {puts -nonewline $client "\$ "}
+         return
+     }
+     switch $tcl_platform(platform) {
+         unix {
+             catch {exec sh -c $line <@$client >@$client 2>@$client}
+         }
+         default {
+             catch {exec $line} data
+             puts $client $data
+         }
+     }
+ }
+
+ ## Administration service handler.  Chains to the normal handler for
+ ## everything it doesn't recognise itself.
+ proc admin {client line prompt} {
+     if {$prompt} {
+         catch {puts -nonewline $client "# "}
+         return
+     }
+     set cmd [split $line]
+     global denyHosts connections services
+     if {[string equal $line "shutdown"]} {
+         set ::termination 1
+         puts stdout "Shutdown requested on $client"
+         catch {puts $client "System will shut down as soon as possible"}
+         return -code return "SHUTTING DOWN"
+     } elseif {[string equal [lindex $cmd 0] "deny"]} {
+         set denyHosts([lindex $cmd 1]) 1
+     } elseif {[string equal [lindex $cmd 0] "allow"]} {
+         catch {unset denyHosts([lindex $cmd 1])}
+     } elseif {[string equal $line "denied"]} {
+         foreach host [array names denyHosts] {
+             catch {puts $client $host}
+         }
+     } elseif {[string equal $line "connections"]} {
+         set len 0
+         foreach conn [array names connections] {
+             if {$len < [string length $conn]} {
+                 set len [string length $conn]
+             }
+         }
+         foreach {conn details} [array get connections] {
+             catch {puts $client [format "%-*s = %s" $len $conn $details]}
+         }
+     } elseif {[string equal [lindex $cmd 0] "close"]} {
+         set sock [lindex $cmd 1]
+         if {[info exist connections($sock)]} {
+             disconnect $sock
+         }
+     } elseif {[string equal $line "services"]} {
+         set len 0
+         foreach serv [array names services] {
+             if {$len < [string length $serv]} {
+                 set len [string length $serv]
+             }
+         }
+         foreach {serv handler} [array get services] {
+             set port [lindex [fconfigure $serv -sockname] 2]
+             catch {puts $client [format "%-*s (port %d) = handler %s" $len $serv $port $handler]}
+         }
+     } elseif {[string equal [lindex $cmd 0] "addService"]} {
+         set service [eval telnetServer [lrange $cmd 1 end]]
+         catch {puts $client "Created service as $service"}
+     } elseif {[string equal [lindex $cmd 0] "removeService"]} {
+         set service [lindex $cmd 1]
+         if {[info exist services($service)]} {
+             closedownServer $service
+         }
+     } else {
+         # CHAIN TO DEFAULT
+         execCommand $client $line 0
+     }
+ }
+ 
+ ## Executes a given command
+ proc remoteCommand {client line prompt} {
+     global tcl_platform
+     if {$prompt} {
+         catch {puts -nonewline $client "\$ "}
+         return
+     }
+     catch {eval $line} data
+     puts $client $data
+ }
+
+ telnetServer 2560 {orxonox rocks} remoteCommand
+ telnetServer 2561 {orxadmin *****} admin
+
+ puts stdout "Ready for service"
+
+ vwait termination
+ execute exit
Index: /code/trunk/init/orxonox_vc8/debug/orxonox.ini
===================================================================
--- /code/trunk/init/orxonox_vc8/debug/orxonox.ini	(revision 1897)
+++ /code/trunk/init/orxonox_vc8/debug/orxonox.ini	(revision 1897)
@@ -0,0 +1,55 @@
+[Settings]
+dataPath_=../../../../media/
+
+[GSGraphics]
+resourceFile_=resources.cfg
+ogreConfigFile_=ogre.cfg
+ogrePluginsFile_=plugins.cfg
+ogreLogFile_=ogre.log
+ogreLogLevelTrivial_=5
+ogreLogLevelNormal_=4
+ogreLogLevelCritical_=2
+statisticsRefreshCycle_=200000
+
+[Core]
+softDebugLevelConsole_=3
+softDebugLevelLogfile_=3
+softDebugLevelShell_=1
+language_=default
+
+[Shell]
+maxHistoryLength_=100
+historyOffset_=0
+commandHistory_[0]=
+
+[GSLevel]
+keyDetectorCallbackCode_=KeybindBindingStringKeyName=
+
+[Backlight]
+maxLifeTime_=4
+trailSegmentLength_=50
+width_=7
+
+[Projectile]
+damage_=15
+lifetime_=4
+speed_=5000
+
+[ParticleProjectile]
+speed_=5000
+
+[RotatingProjectile]
+colour_=1,0,0,1
+
+[SpaceShip]
+bInvertYAxis_=false
+reloadTime_=0.125
+testvector_=-1.07374e+008,-1.07374e+008,-1.07374e+008
+
+[InputBuffer]
+keyRepeatDeleay_=0.4
+keyRepeatTime_=0.022
+
+[GraphicsEngine]
+detailLevelParticle_=2
+
Index: /code/trunk/init/orxonox_vc8/debug/plugins.cfg
===================================================================
--- /code/trunk/init/orxonox_vc8/debug/plugins.cfg	(revision 1897)
+++ /code/trunk/init/orxonox_vc8/debug/plugins.cfg	(revision 1897)
@@ -0,0 +1,13 @@
+# Defines plugins to load
+
+# Define plugin folder
+PluginFolder=.
+
+# Define plugins
+Plugin=RenderSystem_Direct3D9_d
+Plugin=RenderSystem_GL_d
+Plugin=Plugin_ParticleFX_d
+#Plugin=Plugin_BSPSceneManager_d
+#Plugin=Plugin_OctreeSceneManager_d
+#Plugin=Plugin_CgProgramManager_d
+
Index: /code/trunk/init/orxonox_vc8/release/orxonox.ini
===================================================================
--- /code/trunk/init/orxonox_vc8/release/orxonox.ini	(revision 1897)
+++ /code/trunk/init/orxonox_vc8/release/orxonox.ini	(revision 1897)
@@ -0,0 +1,55 @@
+[Settings]
+dataPath_=../../../../media/
+
+[GSGraphics]
+resourceFile_=resources.cfg
+ogreConfigFile_=ogre.cfg
+ogrePluginsFile_=plugins.cfg
+ogreLogFile_=ogre.log
+ogreLogLevelTrivial_=5
+ogreLogLevelNormal_=4
+ogreLogLevelCritical_=2
+statisticsRefreshCycle_=200000
+
+[Core]
+softDebugLevelConsole_=3
+softDebugLevelLogfile_=3
+softDebugLevelShell_=1
+language_=default
+
+[Shell]
+maxHistoryLength_=100
+historyOffset_=0
+commandHistory_[0]=
+
+[GSLevel]
+keyDetectorCallbackCode_=KeybindBindingStringKeyName=
+
+[Backlight]
+maxLifeTime_=4
+trailSegmentLength_=50
+width_=7
+
+[Projectile]
+damage_=15
+lifetime_=4
+speed_=5000
+
+[ParticleProjectile]
+speed_=5000
+
+[RotatingProjectile]
+colour_=1,0,0,1
+
+[SpaceShip]
+bInvertYAxis_=false
+reloadTime_=0.125
+testvector_=-1.07374e+008,-1.07374e+008,-1.07374e+008
+
+[InputBuffer]
+keyRepeatDeleay_=0.4
+keyRepeatTime_=0.022
+
+[GraphicsEngine]
+detailLevelParticle_=2
+
Index: /code/trunk/init/orxonox_vc8/release/plugins.cfg
===================================================================
--- /code/trunk/init/orxonox_vc8/release/plugins.cfg	(revision 1897)
+++ /code/trunk/init/orxonox_vc8/release/plugins.cfg	(revision 1897)
@@ -0,0 +1,13 @@
+# Defines plugins to load
+
+# Define plugin folder
+PluginFolder=.
+
+# Define plugins
+Plugin=RenderSystem_Direct3D9
+Plugin=RenderSystem_GL
+Plugin=Plugin_ParticleFX
+#Plugin=Plugin_BSPSceneManager
+#Plugin=Plugin_OctreeSceneManager
+#Plugin=Plugin_CgProgramManager
+
Index: /code/trunk/visual_studio/vc8/orxonox.vsprops
===================================================================
--- /code/trunk/visual_studio/vc8/orxonox.vsprops	(revision 1896)
+++ /code/trunk/visual_studio/vc8/orxonox.vsprops	(revision 1897)
@@ -19,3 +19,8 @@
 		IgnoreDefaultLibraryNames=""
 	/>
+	<Tool
+		Name="VCPostBuildEventTool"
+		Description="Copying files from init folder..."
+		CommandLine="for %%a in ($(RootDir)\init\$(SolutionName)\$(ConfigurationName)\*) do replace %%a $(OutDir). /A &gt;nul&#x0D;&#x0A;for %%a in ($(RootDir)\init\common\*) do replace %%a $(OutDir). /A &gt;nul"
+	/>
 </VisualStudioPropertySheet>
