Index: /orxonox/branches/chris/src/Makefile
===================================================================
--- /orxonox/branches/chris/src/Makefile	(revision 2105)
+++ /orxonox/branches/chris/src/Makefile	(revision 2105)
@@ -0,0 +1,426 @@
+# Makefile.in generated by automake 1.7.9 from Makefile.am.
+# src/Makefile.  Generated from Makefile.in by configure.
+
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+# Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+
+srcdir = .
+top_srcdir = ..
+
+pkgdatadir = $(datadir)/orxonox
+pkglibdir = $(libdir)/orxonox
+pkgincludedir = $(includedir)/orxonox
+top_builddir = ..
+
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = /bin/install -c
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+ACLOCAL = ${SHELL} /d/projects/Orxonox/branches/chris/missing --run aclocal-1.7
+AMDEP_FALSE = #
+AMDEP_TRUE = 
+AMTAR = ${SHELL} /d/projects/Orxonox/branches/chris/missing --run tar
+AUTOCONF = ${SHELL} /d/projects/Orxonox/branches/chris/missing --run autoconf
+AUTOHEADER = ${SHELL} /d/projects/Orxonox/branches/chris/missing --run autoheader
+AUTOMAKE = ${SHELL} /d/projects/Orxonox/branches/chris/missing --run automake-1.7
+AWK = gawk
+CC = gcc
+CCDEPMODE = depmode=gcc3
+CFLAGS = -g -O2
+CPP = gcc -E
+CPPFLAGS = 
+CXX = g++
+CXXDEPMODE = depmode=gcc3
+CXXFLAGS = -g -O2
+CYGPATH_W = echo
+DEFS = -DHAVE_CONFIG_H
+DEPDIR = .deps
+ECHO_C = 
+ECHO_N = -n
+ECHO_T = 
+EGREP = grep -E
+EXEEXT = .exe
+INSTALL_DATA = ${INSTALL} -m 644
+INSTALL_PROGRAM = ${INSTALL}
+INSTALL_SCRIPT = ${INSTALL}
+INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s
+LDFLAGS = 
+LIBOBJS = 
+LIBS = -lm  -lopengl32 -lGLU32 -lmingw32 -lsdlmain -lsdl -mwindows
+LTLIBOBJS = 
+MAKEINFO = ${SHELL} /d/projects/Orxonox/branches/chris/missing --run makeinfo
+MSBITFIELDS = -mms-bitfields
+OBJEXT = o
+PACKAGE = orxonox
+PACKAGE_BUGREPORT = orxonox-dev@mail.datacore.ch
+PACKAGE_NAME = orxonox
+PACKAGE_STRING = orxonox 0.1-pre-alpha
+PACKAGE_TARNAME = orxonox
+PACKAGE_VERSION = 0.1-pre-alpha
+PATH_SEPARATOR = :
+SET_MAKE = 
+SHELL = /bin/sh
+STRIP = 
+VERSION = 0.1-pre-alpha
+ac_ct_CC = gcc
+ac_ct_CXX = g++
+ac_ct_STRIP = 
+am__fastdepCC_FALSE = #
+am__fastdepCC_TRUE = 
+am__fastdepCXX_FALSE = #
+am__fastdepCXX_TRUE = 
+am__include = include
+am__leading_dot = .
+am__quote = 
+bindir = ${exec_prefix}/bin
+build_alias = 
+datadir = ${prefix}/share
+exec_prefix = ${prefix}
+host_alias = 
+includedir = ${prefix}/include
+infodir = ${prefix}/info
+install_sh = /d/projects/Orxonox/branches/chris/install-sh
+libdir = ${exec_prefix}/lib
+libexecdir = ${exec_prefix}/libexec
+localstatedir = ${prefix}/var
+mandir = ${prefix}/man
+oldincludedir = /usr/include
+prefix = /usr/local
+program_transform_name = s,x,x,
+sbindir = ${exec_prefix}/sbin
+sharedstatedir = ${prefix}/com
+sysconfdir = ${prefix}/etc
+target_alias = 
+AM_CXXFLAGS = "-I/usr/X11R6/include"
+AM_LDFLAGS = "-L/usr/Mesa-6.0.1/lib  -L/usr/X11R6/lib -lXt -lX11"
+
+
+#"-O3 -pedantic -fPIC -ffast-math -I/usr/X11R6/include"
+bin_PROGRAMS = orxonox
+orxonox_SOURCES = orxonox.cc world.cc player.cc data_tank.cc world_entity.cc vector.cc camera.cc collision.cc command_node.cc ini_parser.cc keynames.cc track.cc 
+subdir = src
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+bin_PROGRAMS = orxonox$(EXEEXT)
+PROGRAMS = $(bin_PROGRAMS)
+
+am_orxonox_OBJECTS = orxonox.$(OBJEXT) world.$(OBJEXT) player.$(OBJEXT) \
+	data_tank.$(OBJEXT) world_entity.$(OBJEXT) vector.$(OBJEXT) \
+	camera.$(OBJEXT) collision.$(OBJEXT) command_node.$(OBJEXT) \
+	ini_parser.$(OBJEXT) keynames.$(OBJEXT) track.$(OBJEXT)
+orxonox_OBJECTS = $(am_orxonox_OBJECTS)
+orxonox_LDADD = $(LDADD)
+orxonox_DEPENDENCIES =
+orxonox_LDFLAGS =
+
+DEFAULT_INCLUDES =  -I. -I$(srcdir) -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+DEP_FILES = ./$(DEPDIR)/camera.Po ./$(DEPDIR)/collision.Po \
+	./$(DEPDIR)/command_node.Po \
+	./$(DEPDIR)/data_tank.Po ./$(DEPDIR)/ini_parser.Po \
+	./$(DEPDIR)/keynames.Po ./$(DEPDIR)/orxonox.Po \
+	./$(DEPDIR)/player.Po ./$(DEPDIR)/track.Po \
+	./$(DEPDIR)/vector.Po ./$(DEPDIR)/world.Po \
+	./$(DEPDIR)/world_entity.Po
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLD = $(CXX)
+CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
+	-o $@
+DIST_SOURCES = $(orxonox_SOURCES)
+DIST_COMMON = $(srcdir)/Makefile.in INSTALL Makefile.am
+SOURCES = $(orxonox_SOURCES)
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cc .o .obj
+$(srcdir)/Makefile.in:  Makefile.am  $(top_srcdir)/configure.ac $(ACLOCAL_M4)
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu  src/Makefile
+Makefile:  $(srcdir)/Makefile.in  $(top_builddir)/config.status
+	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
+binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	$(mkinstalldirs) $(DESTDIR)$(bindir)
+	@list='$(bin_PROGRAMS)'; for p in $$list; do \
+	  p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+	  if test -f $$p \
+	  ; then \
+	    f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
+	   echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f"; \
+	   $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f || exit 1; \
+	  else :; fi; \
+	done
+
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_PROGRAMS)'; for p in $$list; do \
+	  f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
+	  echo " rm -f $(DESTDIR)$(bindir)/$$f"; \
+	  rm -f $(DESTDIR)$(bindir)/$$f; \
+	done
+
+clean-binPROGRAMS:
+	-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
+orxonox$(EXEEXT): $(orxonox_OBJECTS) $(orxonox_DEPENDENCIES) 
+	@rm -f orxonox$(EXEEXT)
+	$(CXXLINK) $(orxonox_LDFLAGS) $(orxonox_OBJECTS) $(orxonox_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT) core *.core
+
+distclean-compile:
+	-rm -f *.tab.c
+
+include ./$(DEPDIR)/camera.Po
+include ./$(DEPDIR)/collision.Po
+include ./$(DEPDIR)/command_node.Po
+include ./$(DEPDIR)/data_tank.Po
+include ./$(DEPDIR)/ini_parser.Po
+include ./$(DEPDIR)/keynames.Po
+include ./$(DEPDIR)/orxonox.Po
+include ./$(DEPDIR)/player.Po
+include ./$(DEPDIR)/track.Po
+include ./$(DEPDIR)/vector.Po
+include ./$(DEPDIR)/world.Po
+include ./$(DEPDIR)/world_entity.Po
+
+.cc.o:
+	if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+	  -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
+	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+	else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+	fi
+#	source='$<' object='$@' libtool=no \
+#	depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' \
+#	$(CXXDEPMODE) $(depcomp) \
+#	$(CXXCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
+
+.cc.obj:
+	if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+	  -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \
+	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+	else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+	fi
+#	source='$<' object='$@' libtool=no \
+#	depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' \
+#	$(CXXDEPMODE) $(depcomp) \
+#	$(CXXCOMPILE) -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`
+uninstall-info-am:
+
+ETAGS = etags
+ETAGSFLAGS =
+
+CTAGS = ctags
+CTAGSFLAGS =
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(ETAGS_ARGS)$$tags$$unique" \
+	  || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	     $$tags $$unique
+
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+
+top_distdir = ..
+distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkinstalldirs) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS)
+
+installdirs:
+	$(mkinstalldirs) $(DESTDIR)$(bindir)
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS uninstall-info-am
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+	clean-generic ctags distclean distclean-compile \
+	distclean-generic distclean-tags distdir dvi dvi-am info \
+	info-am install install-am install-binPROGRAMS install-data \
+	install-data-am install-exec install-exec-am install-info \
+	install-info-am install-man install-strip installcheck \
+	installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-compile \
+	mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
+	uninstall-am uninstall-binPROGRAMS uninstall-info-am
+
+
+#  uncomment the following if bencoder requires the math library
+#gui_LDADD=-lm
+
+#EXTRA_DIST=orxonox.lsm.in orxonox.spec.in orxonox.texinfo
+
+#  if you write a self-test script named `chk', uncomment the
+#  following and add `chk' to the EXTRA_DIST list
+#TESTS=chk
+
+#  build and install the .info pages
+#info_TEXINFOS = orxonox.texinfo
+#orxonox_TEXINFOS = gpl.texinfo
+
+#  install the man pages
+#man_MANS=orxonox.1
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
Index: /orxonox/branches/chris/src/command_node.cc
===================================================================
--- /orxonox/branches/chris/src/command_node.cc	(revision 2104)
+++ /orxonox/branches/chris/src/command_node.cc	(revision 2105)
@@ -22,4 +22,5 @@
 #include <stdio.h>
 #include <strings.h>
+#include <stdlib.h>
 
 using namespace std;
@@ -52,4 +53,6 @@
 	FILE* stream;
 	
+	printf("Loading key bindings from %s\n", filename);
+	
 	if( filename == NULL) filename = DEFAULT_KEYBIND_FILE;
 	
@@ -73,4 +76,6 @@
 	char namebuf[256];
 	char valuebuf[256];
+	memset (namebuf, 0, 256);
+	memset (valuebuf, 0, 256);
 	int* index;
 
@@ -81,7 +86,9 @@
 		{
 			case 0:
+				printf("Key binding %d(%s) set to %s\n", index[1], SDLK_to_keyname( index[1]), valuebuf);
 				strcpy (aliases->keys[index[1]], valuebuf);
 				break;
 			case 1:
+				printf("Button binding %d(%s) set to %s\n", index[1], SDLB_to_buttonname( index[1]), valuebuf);
 				strcpy (aliases->buttons[index[1]], valuebuf);
 				break;
@@ -89,4 +96,6 @@
 				break;
 		}
+		memset (namebuf, 0, 256);
+		memset (valuebuf, 0, 256);
 	}
 }
@@ -105,6 +114,16 @@
 {
 	coord[0] = -1;
-	if( (coord[1] = keyname_to_SDLK (name)) != -1) coord[0] = 0;
-	if( (coord[1] = buttonname_to_SDLB (name)) != -1) coord[0] = 1;
+	coord[1] = -1;
+	int c;
+	if( (c = keyname_to_SDLK (name)) != -1)
+	{
+		coord[1] = c;
+		coord[0] = 0;
+	}
+	if( (c = buttonname_to_SDLB (name)) != -1)
+	{
+		coord[1] = c;
+		coord[0] = 1;
+	}
 	return coord;
 }
@@ -112,4 +131,5 @@
 void CommandNode::process ()
 {
+perror("CommandNode|process()");
 	if( bLocalInput) process_local ();
 	else process_network ();
@@ -123,4 +143,5 @@
 	while( SDL_PollEvent (&event))
 	{
+		memset (cmd.cmd, 0, CMD_LENGHT); 
 		switch( event.type)
 		{
@@ -173,6 +194,10 @@
 void CommandNode::relay (Command* cmd)
 {
+perror("CommandNode|relay()");
 	List<WorldEntity>* plist = bound;
 	
+	Orxonox *orx = Orxonox::getInstance();
+	if( orx->system_command (cmd)) return;
+		
 	if( bLocalInput) send_over_network (cmd);
 	
Index: /orxonox/branches/chris/src/command_node.h
===================================================================
--- /orxonox/branches/chris/src/command_node.h	(revision 2104)
+++ /orxonox/branches/chris/src/command_node.h	(revision 2105)
@@ -42,5 +42,5 @@
 	KeyBindings* aliases;
 	List<WorldEntity>* bound;	//!< List of WorldEntites that recieve commands from this CommandNode
-	int coord[2];
+	Sint32 coord[2];
 	
 	void relay (Command* cmd);
Index: /orxonox/branches/chris/src/keynames.cc
===================================================================
--- /orxonox/branches/chris/src/keynames.cc	(revision 2104)
+++ /orxonox/branches/chris/src/keynames.cc	(revision 2105)
@@ -48,4 +48,5 @@
 	if( !strcmp (name, "RETURN")) return SDLK_RETURN;
 	if( !strcmp (name, "ESCAPE")) return SDLK_ESCAPE;
+	if( !strcmp (name, "SPACE")) return SDLK_SPACE;
 	if( !strcmp (name, "EXCLAIM")) return SDLK_EXCLAIM;
 	if( !strcmp (name, "QUOTEDBL")) return SDLK_QUOTEDBL;
@@ -184,4 +185,5 @@
 	if( key == SDLK_CLEAR) return "CLEAR";
 	if( key == SDLK_RETURN) return "RETURN";
+	if( key == SDLK_SPACE) return "SPACE";
 	if( key == SDLK_ESCAPE) return "ESCAPE";
 	if( key == SDLK_EXCLAIM) return "EXCLAIM";
Index: /orxonox/branches/chris/src/orxonox.cc
===================================================================
--- /orxonox/branches/chris/src/orxonox.cc	(revision 2104)
+++ /orxonox/branches/chris/src/orxonox.cc	(revision 2105)
@@ -72,5 +72,5 @@
 	strcat (configfilename, "/.orxonox.conf");*/
 	
-	strcpy (configfilename, "./orxonox.conf");
+	strcpy (configfilename, "orxonox.conf");
 }
 
@@ -119,5 +119,5 @@
   int width = 640;
   int height = 480;
-  Uint32 flags = SDL_OPENGL | SDL_GL_DOUBLEBUFFER;
+  Uint32 flags = SDL_HWSURFACE | SDL_OPENGL | SDL_GL_DOUBLEBUFFER;
   
   if( (screen = SDL_SetVideoMode (width, height, bpp, flags)) == NULL)
@@ -187,11 +187,11 @@
 {
 	bQuitOrxonox = true;
-  //cout << "finished garbage colletion, quitting..." << endl;
 }
 void Orxonox::mainLoop()
 {
 	lastframe = SDL_GetTicks();
-
+	bQuitOrxonox = false;
   // This is where everything is run
+printf("Orxonox|Entering main loop\n");
   while( !bQuitOrxonox)
   {
@@ -207,4 +207,5 @@
     display();
   }
+printf("Orxonox|Exiting the main loop\n");
 }
 
@@ -244,4 +245,13 @@
 }
 
+bool Orxonox::system_command (Command* cmd)
+{
+	if( !strcmp( cmd->cmd, "quit") && !cmd->bUp)
+	{
+		bQuitOrxonox = true;
+		return true;
+	}
+}
+
 void Orxonox::display ()
 {
@@ -254,5 +264,5 @@
 		// draw HUD
 		// flip buffers
-	SDL_Flip( screen);
+	SDL_GL_SwapBuffers();
 }
 
@@ -274,4 +284,5 @@
 int main (int argc, char** argv) 
 {  
+	printf(">>> Starting Orxonox <<<\n");
   Orxonox *orx = Orxonox::getInstance();
   
Index: /orxonox/branches/chris/src/orxonox.conf
===================================================================
--- /orxonox/branches/chris/src/orxonox.conf	(revision 2105)
+++ /orxonox/branches/chris/src/orxonox.conf	(revision 2105)
@@ -0,0 +1,11 @@
+[Bindings]
+UP=up
+DOWN=down
+LEFT=left
+RIGHT=right
+SPACE=fire
+ESCAPE=quit
+q=quit
+BUTTON_LEFT=fire
+BUTTON_RIGHT=altfire
+b=benscho
Index: /orxonox/branches/chris/src/orxonox.h
===================================================================
--- /orxonox/branches/chris/src/orxonox.h	(revision 2104)
+++ /orxonox/branches/chris/src/orxonox.h	(revision 2105)
@@ -53,4 +53,5 @@
 
   void event_handler (SDL_Event* event);
+  bool system_command (Command* cmd);
 
   int init (int argc, char** argv);
Index: /orxonox/branches/chris/src/player.cc
===================================================================
--- /orxonox/branches/chris/src/player.cc	(revision 2104)
+++ /orxonox/branches/chris/src/player.cc	(revision 2105)
@@ -61,13 +61,28 @@
 void Player::command (Command* cmd)
 {
-	if( strcmp( cmd->cmd, "up")) bUp = !cmd->bUp;
-	else if( strcmp( cmd->cmd, "down")) bDown = !cmd->bUp;
-	else if( strcmp( cmd->cmd, "left")) bLeft = !cmd->bUp;
-	else if( strcmp( cmd->cmd, "right")) bRight = !cmd->bUp;
-	else if( strcmp( cmd->cmd, "fire")) bFire = !cmd->bUp;
+	if( !strcmp( cmd->cmd, "up")) bUp = !cmd->bUp;
+	else if( !strcmp( cmd->cmd, "down")) bDown = !cmd->bUp;
+	else if( !strcmp( cmd->cmd, "left")) bLeft = !cmd->bUp;
+	else if( !strcmp( cmd->cmd, "right")) bRight = !cmd->bUp;
+	else if( !strcmp( cmd->cmd, "fire")) bFire = !cmd->bUp;
 }
 
 void Player::draw ()
 {
+	glMatrixMode(GL_MODELVIEW);
+	float matrix[16];
+  get_placement()->w.glmatrix (matrix);
+  glLoadMatrixf (matrix);
+
+	glTranslatef(get_placement()->r.x,get_placement()->r.y,get_placement()->r.z);
+	
+	glBegin(GL_TRIANGLES);
+	glColor3f(1,0,0);
+	glVertex3f(0,0,0);
+	glColor3f(0,1,0);
+	glVertex3f(-1,-0.5,0);
+	glColor3f(0,0,1);
+	glVertex3f(-1,+0.5,0);
+	glEnd();
 }
 
