[Orxonox-commit 134] r2825 - in branches/miniprojects/src/orxonox/objects: . gametypes worldentities

landauf at orxonox.net landauf at orxonox.net
Mon Mar 23 11:32:03 CET 2009


Author: landauf
Date: 2009-03-23 10:32:02 +0000 (Mon, 23 Mar 2009)
New Revision: 2825

Modified:
   branches/miniprojects/src/orxonox/objects/Teamcolourable.cc
   branches/miniprojects/src/orxonox/objects/Teamcolourable.h
   branches/miniprojects/src/orxonox/objects/gametypes/Deathmatch.cc
   branches/miniprojects/src/orxonox/objects/gametypes/Deathmatch.h
   branches/miniprojects/src/orxonox/objects/gametypes/Pong.cc
   branches/miniprojects/src/orxonox/objects/gametypes/Pong.h
   branches/miniprojects/src/orxonox/objects/gametypes/TeamDeathmatch.cc
   branches/miniprojects/src/orxonox/objects/gametypes/TeamDeathmatch.h
   branches/miniprojects/src/orxonox/objects/worldentities/PongBall.cc
   branches/miniprojects/src/orxonox/objects/worldentities/PongBall.h
   branches/miniprojects/src/orxonox/objects/worldentities/PongBat.cc
   branches/miniprojects/src/orxonox/objects/worldentities/PongBat.h
   branches/miniprojects/src/orxonox/objects/worldentities/PongCenterpoint.cc
   branches/miniprojects/src/orxonox/objects/worldentities/PongCenterpoint.h
   branches/miniprojects/src/orxonox/objects/worldentities/TeamSpawnPoint.cc
   branches/miniprojects/src/orxonox/objects/worldentities/TeamSpawnPoint.h
Log:
eol-style:native

Modified: branches/miniprojects/src/orxonox/objects/Teamcolourable.cc
===================================================================
--- branches/miniprojects/src/orxonox/objects/Teamcolourable.cc	2009-03-23 10:26:46 UTC (rev 2824)
+++ branches/miniprojects/src/orxonox/objects/Teamcolourable.cc	2009-03-23 10:32:02 UTC (rev 2825)
@@ -1,39 +1,39 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-#include "OrxonoxStableHeaders.h"
-#include "Teamcolourable.h"
-#include "core/CoreIncludes.h"
-
-namespace orxonox
-{
-    Teamcolourable::Teamcolourable()
-    {
-        RegisterRootObject(Teamcolourable);
-    }
-}
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "OrxonoxStableHeaders.h"
+#include "Teamcolourable.h"
+#include "core/CoreIncludes.h"
+
+namespace orxonox
+{
+    Teamcolourable::Teamcolourable()
+    {
+        RegisterRootObject(Teamcolourable);
+    }
+}


Property changes on: branches/miniprojects/src/orxonox/objects/Teamcolourable.cc
___________________________________________________________________
Added: svn:eol-style
   + native

Modified: branches/miniprojects/src/orxonox/objects/Teamcolourable.h
===================================================================
--- branches/miniprojects/src/orxonox/objects/Teamcolourable.h	2009-03-23 10:26:46 UTC (rev 2824)
+++ branches/miniprojects/src/orxonox/objects/Teamcolourable.h	2009-03-23 10:32:02 UTC (rev 2825)
@@ -1,49 +1,49 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-#ifndef _Teamcolourable_H__
-#define _Teamcolourable_H__
-
-#include "OrxonoxPrereqs.h"
-
-#include "util/Math.h"
-#include "core/OrxonoxClass.h"
-
-namespace orxonox
-{
-    class _OrxonoxExport Teamcolourable : virtual public OrxonoxClass
-    {
-        public:
-            virtual void setTeamColour(const ColourValue& colour) = 0;
-
-        protected:
-            Teamcolourable();
-    };
-}
-
-#endif /* _Teamcolourable_H__ */
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _Teamcolourable_H__
+#define _Teamcolourable_H__
+
+#include "OrxonoxPrereqs.h"
+
+#include "util/Math.h"
+#include "core/OrxonoxClass.h"
+
+namespace orxonox
+{
+    class _OrxonoxExport Teamcolourable : virtual public OrxonoxClass
+    {
+        public:
+            virtual void setTeamColour(const ColourValue& colour) = 0;
+
+        protected:
+            Teamcolourable();
+    };
+}
+
+#endif /* _Teamcolourable_H__ */


Property changes on: branches/miniprojects/src/orxonox/objects/Teamcolourable.h
___________________________________________________________________
Added: svn:eol-style
   + native

Modified: branches/miniprojects/src/orxonox/objects/gametypes/Deathmatch.cc
===================================================================
--- branches/miniprojects/src/orxonox/objects/gametypes/Deathmatch.cc	2009-03-23 10:26:46 UTC (rev 2824)
+++ branches/miniprojects/src/orxonox/objects/gametypes/Deathmatch.cc	2009-03-23 10:32:02 UTC (rev 2825)
@@ -1,135 +1,135 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-#include "OrxonoxStableHeaders.h"
-#include "Deathmatch.h"
-
-#include "core/CoreIncludes.h"
-#include "objects/infos/PlayerInfo.h"
-#include "objects/worldentities/pawns/Pawn.h"
-
-#include "network/Host.h"
-
-namespace orxonox
-{
-    CreateUnloadableFactory(Deathmatch);
-
-    Deathmatch::Deathmatch(BaseObject* creator) : Gametype(creator)
-    {
-        RegisterObject(Deathmatch);
-    }
-
-    void Deathmatch::start()
-    {
-        Gametype::start();
-
-        std::string message = "The match has started!";
-        COUT(0) << message << std::endl;
-        Host::Broadcast(message);
-    }
-
-    void Deathmatch::end()
-    {
-        Gametype::end();
-
-        std::string message = "The match has ended.";
-        COUT(0) << message << std::endl;
-        Host::Broadcast(message);
-    }
-
-    void Deathmatch::playerEntered(PlayerInfo* player)
-    {
-        Gametype::playerEntered(player);
-
-        std::string message = player->getName() + " entered the game";
-        COUT(0) << message << std::endl;
-        Host::Broadcast(message);
-    }
-
-    bool Deathmatch::playerLeft(PlayerInfo* player)
-    {
-        bool valid_player = Gametype::playerLeft(player);
-
-        if (valid_player)
-        {
-            std::string message = player->getName() + " left the game";
-            COUT(0) << message << std::endl;
-            Host::Broadcast(message);
-        }
-
-        return valid_player;
-    }
-
-    bool Deathmatch::playerChangedName(PlayerInfo* player)
-    {
-        bool valid_player = Gametype::playerChangedName(player);
-
-        if (valid_player)
-        {
-            std::string message = player->getOldName() + " changed name to " + player->getName();
-            COUT(0) << message << std::endl;
-            Host::Broadcast(message);
-        }
-
-        return valid_player;
-    }
-
-    void Deathmatch::pawnKilled(Pawn* victim, Pawn* killer)
-    {
-        if (victim && victim->getPlayer())
-        {
-            std::string message;
-            if (killer)
-            {
-                if (killer->getPlayer())
-                    message = victim->getPlayer()->getName() + " was killed by " + killer->getPlayer()->getName();
-                else
-                    message = victim->getPlayer()->getName() + " was killed";
-            }
-            else
-                message = victim->getPlayer()->getName() + " died";
-
-            COUT(0) << message << std::endl;
-            Host::Broadcast(message);
-        }
-
-        Gametype::pawnKilled(victim, killer);
-    }
-
-    void Deathmatch::playerScored(PlayerInfo* player)
-    {
-        Gametype::playerScored(player);
-
-        if (player)
-        {
-            std::string message = player->getName() + " scores!";
-            COUT(0) << message << std::endl;
-            Host::Broadcast(message);
-        }
-    }
-}
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "OrxonoxStableHeaders.h"
+#include "Deathmatch.h"
+
+#include "core/CoreIncludes.h"
+#include "objects/infos/PlayerInfo.h"
+#include "objects/worldentities/pawns/Pawn.h"
+
+#include "network/Host.h"
+
+namespace orxonox
+{
+    CreateUnloadableFactory(Deathmatch);
+
+    Deathmatch::Deathmatch(BaseObject* creator) : Gametype(creator)
+    {
+        RegisterObject(Deathmatch);
+    }
+
+    void Deathmatch::start()
+    {
+        Gametype::start();
+
+        std::string message = "The match has started!";
+        COUT(0) << message << std::endl;
+        Host::Broadcast(message);
+    }
+
+    void Deathmatch::end()
+    {
+        Gametype::end();
+
+        std::string message = "The match has ended.";
+        COUT(0) << message << std::endl;
+        Host::Broadcast(message);
+    }
+
+    void Deathmatch::playerEntered(PlayerInfo* player)
+    {
+        Gametype::playerEntered(player);
+
+        std::string message = player->getName() + " entered the game";
+        COUT(0) << message << std::endl;
+        Host::Broadcast(message);
+    }
+
+    bool Deathmatch::playerLeft(PlayerInfo* player)
+    {
+        bool valid_player = Gametype::playerLeft(player);
+
+        if (valid_player)
+        {
+            std::string message = player->getName() + " left the game";
+            COUT(0) << message << std::endl;
+            Host::Broadcast(message);
+        }
+
+        return valid_player;
+    }
+
+    bool Deathmatch::playerChangedName(PlayerInfo* player)
+    {
+        bool valid_player = Gametype::playerChangedName(player);
+
+        if (valid_player)
+        {
+            std::string message = player->getOldName() + " changed name to " + player->getName();
+            COUT(0) << message << std::endl;
+            Host::Broadcast(message);
+        }
+
+        return valid_player;
+    }
+
+    void Deathmatch::pawnKilled(Pawn* victim, Pawn* killer)
+    {
+        if (victim && victim->getPlayer())
+        {
+            std::string message;
+            if (killer)
+            {
+                if (killer->getPlayer())
+                    message = victim->getPlayer()->getName() + " was killed by " + killer->getPlayer()->getName();
+                else
+                    message = victim->getPlayer()->getName() + " was killed";
+            }
+            else
+                message = victim->getPlayer()->getName() + " died";
+
+            COUT(0) << message << std::endl;
+            Host::Broadcast(message);
+        }
+
+        Gametype::pawnKilled(victim, killer);
+    }
+
+    void Deathmatch::playerScored(PlayerInfo* player)
+    {
+        Gametype::playerScored(player);
+
+        if (player)
+        {
+            std::string message = player->getName() + " scores!";
+            COUT(0) << message << std::endl;
+            Host::Broadcast(message);
+        }
+    }
+}


Property changes on: branches/miniprojects/src/orxonox/objects/gametypes/Deathmatch.cc
___________________________________________________________________
Added: svn:eol-style
   + native

Modified: branches/miniprojects/src/orxonox/objects/gametypes/Deathmatch.h
===================================================================
--- branches/miniprojects/src/orxonox/objects/gametypes/Deathmatch.h	2009-03-23 10:26:46 UTC (rev 2824)
+++ branches/miniprojects/src/orxonox/objects/gametypes/Deathmatch.h	2009-03-23 10:32:02 UTC (rev 2825)
@@ -1,55 +1,55 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-#ifndef _Deathmatch_H__
-#define _Deathmatch_H__
-
-#include "OrxonoxPrereqs.h"
-
-#include "Gametype.h"
-
-namespace orxonox
-{
-    class _OrxonoxExport Deathmatch : public Gametype
-    {
-        public:
-            Deathmatch(BaseObject* creator);
-            virtual ~Deathmatch() {}
-
-            virtual void start();
-            virtual void end();
-            virtual void playerEntered(PlayerInfo* player);
-            virtual bool playerLeft(PlayerInfo* player);
-            virtual bool playerChangedName(PlayerInfo* player);
-
-            virtual void pawnKilled(Pawn* victim, Pawn* killer = 0);
-            virtual void playerScored(PlayerInfo* player);
-    };
-}
-
-#endif /* _Deathmatch_H__ */
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _Deathmatch_H__
+#define _Deathmatch_H__
+
+#include "OrxonoxPrereqs.h"
+
+#include "Gametype.h"
+
+namespace orxonox
+{
+    class _OrxonoxExport Deathmatch : public Gametype
+    {
+        public:
+            Deathmatch(BaseObject* creator);
+            virtual ~Deathmatch() {}
+
+            virtual void start();
+            virtual void end();
+            virtual void playerEntered(PlayerInfo* player);
+            virtual bool playerLeft(PlayerInfo* player);
+            virtual bool playerChangedName(PlayerInfo* player);
+
+            virtual void pawnKilled(Pawn* victim, Pawn* killer = 0);
+            virtual void playerScored(PlayerInfo* player);
+    };
+}
+
+#endif /* _Deathmatch_H__ */


Property changes on: branches/miniprojects/src/orxonox/objects/gametypes/Deathmatch.h
___________________________________________________________________
Added: svn:eol-style
   + native

Modified: branches/miniprojects/src/orxonox/objects/gametypes/Pong.cc
===================================================================
--- branches/miniprojects/src/orxonox/objects/gametypes/Pong.cc	2009-03-23 10:26:46 UTC (rev 2824)
+++ branches/miniprojects/src/orxonox/objects/gametypes/Pong.cc	2009-03-23 10:32:02 UTC (rev 2825)
@@ -1,162 +1,162 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-#include "OrxonoxStableHeaders.h"
-#include "Pong.h"
-
-#include "core/CoreIncludes.h"
-#include "core/ConfigValueIncludes.h"
-#include "core/Executor.h"
-#include "objects/worldentities/Model.h"
-#include "objects/worldentities/PongCenterpoint.h"
-#include "objects/worldentities/PongBall.h"
-#include "objects/worldentities/PongBat.h"
-#include "objects/infos/PlayerInfo.h"
-
-namespace orxonox
-{
-    CreateUnloadableFactory(Pong);
-
-    Pong::Pong(BaseObject* creator) : Deathmatch(creator)
-    {
-        RegisterObject(Pong);
-
-        this->center_ = 0;
-        this->ball_ = 0;
-        this->bat_[0] = 0;
-        this->bat_[1] = 0;
-
-        this->bForceSpawn_ = true;
-
-        this->starttimer_.setTimer(1.0, false, this, createExecutor(createFunctor(&Pong::startBall)));
-        this->starttimer_.stopTimer();
-    }
-
-    void Pong::start()
-    {
-        if (this->center_)
-        {
-            if (!this->ball_)
-            {
-                this->ball_ = new PongBall(this->center_);
-                this->ball_->addTemplate(this->center_->getBalltemplate());
-            }
-
-            this->center_->attach(this->ball_);
-            this->ball_->setPosition(0, 0, 0);
-            this->ball_->setFieldDimension(this->center_->getFieldDimension());
-            this->ball_->setSpeed(0);
-            this->ball_->setBatLength(this->center_->getBatLength());
-
-            if (!this->bat_[0])
-            {
-                this->bat_[0] = new PongBat(this->center_);
-                this->bat_[0]->addTemplate(this->center_->getBattemplate());
-            }
-            if (!this->bat_[1])
-            {
-                this->bat_[1] = new PongBat(this->center_);
-                this->bat_[1]->addTemplate(this->center_->getBattemplate());
-            }
-
-            this->center_->attach(this->bat_[0]);
-            this->center_->attach(this->bat_[1]);
-            this->bat_[0]->setPosition(-this->center_->getFieldDimension().x / 2, 0, 0);
-            this->bat_[1]->setPosition( this->center_->getFieldDimension().x / 2, 0, 0);
-            this->bat_[0]->yaw(Degree(-90));
-            this->bat_[1]->yaw(Degree(90));
-            this->bat_[0]->setSpeed(this->center_->getBatSpeed());
-            this->bat_[1]->setSpeed(this->center_->getBatSpeed());
-            this->bat_[0]->setFieldHeight(this->center_->getFieldDimension().y);
-            this->bat_[1]->setFieldHeight(this->center_->getFieldDimension().y);
-            this->bat_[0]->setLength(this->center_->getBatLength());
-            this->bat_[1]->setLength(this->center_->getBatLength());
-
-            this->ball_->setBats(this->bat_);
-        }
-        else
-        {
-            COUT(1) << "Error: No Centerpoint specified." << std::endl;
-        }
-
-        this->starttimer_.startTimer();
-
-        Deathmatch::start();
-    }
-
-    void Pong::end()
-    {
-        if (this->ball_)
-        {
-            delete this->ball_;
-            this->ball_ = 0;
-        }
-
-        Deathmatch::end();
-    }
-
-    void Pong::spawnPlayer(PlayerInfo* player)
-    {
-        if (!this->bat_[0]->getPlayer())
-        {
-            player->startControl(this->bat_[0]);
-            this->players_[player].state_ = PlayerState::Alive;
-        }
-        else if (!this->bat_[1]->getPlayer())
-        {
-            player->startControl(this->bat_[1]);
-            this->players_[player].state_ = PlayerState::Alive;
-        }
-    }
-
-    void Pong::playerScored(PlayerInfo* player)
-    {
-        Deathmatch::playerScored(player);
-
-        if (this->ball_)
-        {
-            this->ball_->setPosition(Vector3::ZERO);
-            this->ball_->setVelocity(Vector3::ZERO);
-            this->ball_->setSpeed(0);
-        }
-
-        if (this->bat_[0] && this->bat_[1])
-        {
-            this->bat_[0]->setPosition(-this->center_->getFieldDimension().x / 2, 0, 0);
-            this->bat_[1]->setPosition( this->center_->getFieldDimension().x / 2, 0, 0);
-        }
-
-        this->starttimer_.startTimer();
-    }
-
-    void Pong::startBall()
-    {
-        if (this->ball_ && this->center_)
-            this->ball_->setSpeed(this->center_->getBallSpeed());
-    }
-}
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "OrxonoxStableHeaders.h"
+#include "Pong.h"
+
+#include "core/CoreIncludes.h"
+#include "core/ConfigValueIncludes.h"
+#include "core/Executor.h"
+#include "objects/worldentities/Model.h"
+#include "objects/worldentities/PongCenterpoint.h"
+#include "objects/worldentities/PongBall.h"
+#include "objects/worldentities/PongBat.h"
+#include "objects/infos/PlayerInfo.h"
+
+namespace orxonox
+{
+    CreateUnloadableFactory(Pong);
+
+    Pong::Pong(BaseObject* creator) : Deathmatch(creator)
+    {
+        RegisterObject(Pong);
+
+        this->center_ = 0;
+        this->ball_ = 0;
+        this->bat_[0] = 0;
+        this->bat_[1] = 0;
+
+        this->bForceSpawn_ = true;
+
+        this->starttimer_.setTimer(1.0, false, this, createExecutor(createFunctor(&Pong::startBall)));
+        this->starttimer_.stopTimer();
+    }
+
+    void Pong::start()
+    {
+        if (this->center_)
+        {
+            if (!this->ball_)
+            {
+                this->ball_ = new PongBall(this->center_);
+                this->ball_->addTemplate(this->center_->getBalltemplate());
+            }
+
+            this->center_->attach(this->ball_);
+            this->ball_->setPosition(0, 0, 0);
+            this->ball_->setFieldDimension(this->center_->getFieldDimension());
+            this->ball_->setSpeed(0);
+            this->ball_->setBatLength(this->center_->getBatLength());
+
+            if (!this->bat_[0])
+            {
+                this->bat_[0] = new PongBat(this->center_);
+                this->bat_[0]->addTemplate(this->center_->getBattemplate());
+            }
+            if (!this->bat_[1])
+            {
+                this->bat_[1] = new PongBat(this->center_);
+                this->bat_[1]->addTemplate(this->center_->getBattemplate());
+            }
+
+            this->center_->attach(this->bat_[0]);
+            this->center_->attach(this->bat_[1]);
+            this->bat_[0]->setPosition(-this->center_->getFieldDimension().x / 2, 0, 0);
+            this->bat_[1]->setPosition( this->center_->getFieldDimension().x / 2, 0, 0);
+            this->bat_[0]->yaw(Degree(-90));
+            this->bat_[1]->yaw(Degree(90));
+            this->bat_[0]->setSpeed(this->center_->getBatSpeed());
+            this->bat_[1]->setSpeed(this->center_->getBatSpeed());
+            this->bat_[0]->setFieldHeight(this->center_->getFieldDimension().y);
+            this->bat_[1]->setFieldHeight(this->center_->getFieldDimension().y);
+            this->bat_[0]->setLength(this->center_->getBatLength());
+            this->bat_[1]->setLength(this->center_->getBatLength());
+
+            this->ball_->setBats(this->bat_);
+        }
+        else
+        {
+            COUT(1) << "Error: No Centerpoint specified." << std::endl;
+        }
+
+        this->starttimer_.startTimer();
+
+        Deathmatch::start();
+    }
+
+    void Pong::end()
+    {
+        if (this->ball_)
+        {
+            delete this->ball_;
+            this->ball_ = 0;
+        }
+
+        Deathmatch::end();
+    }
+
+    void Pong::spawnPlayer(PlayerInfo* player)
+    {
+        if (!this->bat_[0]->getPlayer())
+        {
+            player->startControl(this->bat_[0]);
+            this->players_[player].state_ = PlayerState::Alive;
+        }
+        else if (!this->bat_[1]->getPlayer())
+        {
+            player->startControl(this->bat_[1]);
+            this->players_[player].state_ = PlayerState::Alive;
+        }
+    }
+
+    void Pong::playerScored(PlayerInfo* player)
+    {
+        Deathmatch::playerScored(player);
+
+        if (this->ball_)
+        {
+            this->ball_->setPosition(Vector3::ZERO);
+            this->ball_->setVelocity(Vector3::ZERO);
+            this->ball_->setSpeed(0);
+        }
+
+        if (this->bat_[0] && this->bat_[1])
+        {
+            this->bat_[0]->setPosition(-this->center_->getFieldDimension().x / 2, 0, 0);
+            this->bat_[1]->setPosition( this->center_->getFieldDimension().x / 2, 0, 0);
+        }
+
+        this->starttimer_.startTimer();
+    }
+
+    void Pong::startBall()
+    {
+        if (this->ball_ && this->center_)
+            this->ball_->setSpeed(this->center_->getBallSpeed());
+    }
+}


Property changes on: branches/miniprojects/src/orxonox/objects/gametypes/Pong.cc
___________________________________________________________________
Added: svn:eol-style
   + native

Modified: branches/miniprojects/src/orxonox/objects/gametypes/Pong.h
===================================================================
--- branches/miniprojects/src/orxonox/objects/gametypes/Pong.h	2009-03-23 10:26:46 UTC (rev 2824)
+++ branches/miniprojects/src/orxonox/objects/gametypes/Pong.h	2009-03-23 10:32:02 UTC (rev 2825)
@@ -1,65 +1,65 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-#ifndef _Pong_H__
-#define _Pong_H__
-
-#include "OrxonoxPrereqs.h"
-
-#include "Deathmatch.h"
-#include "tools/Timer.h"
-
-namespace orxonox
-{
-    class _OrxonoxExport Pong : public Deathmatch
-    {
-        public:
-            Pong(BaseObject* creator);
-            virtual ~Pong() {}
-
-            virtual void start();
-            virtual void end();
-
-            virtual void spawnPlayer(PlayerInfo* player);
-
-            virtual void playerScored(PlayerInfo* player);
-
-            void setCenterpoint(PongCenterpoint* center)
-                { this->center_ = center; }
-
-        protected:
-            void startBall();
-
-            PongCenterpoint* center_;
-            PongBall* ball_;
-            PongBat* bat_[2];
-            Timer<Pong> starttimer_;
-    };
-}
-
-#endif /* _Pong_H__ */
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _Pong_H__
+#define _Pong_H__
+
+#include "OrxonoxPrereqs.h"
+
+#include "Deathmatch.h"
+#include "tools/Timer.h"
+
+namespace orxonox
+{
+    class _OrxonoxExport Pong : public Deathmatch
+    {
+        public:
+            Pong(BaseObject* creator);
+            virtual ~Pong() {}
+
+            virtual void start();
+            virtual void end();
+
+            virtual void spawnPlayer(PlayerInfo* player);
+
+            virtual void playerScored(PlayerInfo* player);
+
+            void setCenterpoint(PongCenterpoint* center)
+                { this->center_ = center; }
+
+        protected:
+            void startBall();
+
+            PongCenterpoint* center_;
+            PongBall* ball_;
+            PongBat* bat_[2];
+            Timer<Pong> starttimer_;
+    };
+}
+
+#endif /* _Pong_H__ */


Property changes on: branches/miniprojects/src/orxonox/objects/gametypes/Pong.h
___________________________________________________________________
Added: svn:eol-style
   + native

Modified: branches/miniprojects/src/orxonox/objects/gametypes/TeamDeathmatch.cc
===================================================================
--- branches/miniprojects/src/orxonox/objects/gametypes/TeamDeathmatch.cc	2009-03-23 10:26:46 UTC (rev 2824)
+++ branches/miniprojects/src/orxonox/objects/gametypes/TeamDeathmatch.cc	2009-03-23 10:32:02 UTC (rev 2825)
@@ -1,191 +1,191 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-#include "OrxonoxStableHeaders.h"
-#include "TeamDeathmatch.h"
-
-#include "core/CoreIncludes.h"
-#include "core/ConfigValueIncludes.h"
-#include "objects/Teamcolourable.h"
-#include "objects/worldentities/TeamSpawnPoint.h"
-
-namespace orxonox
-{
-    CreateUnloadableFactory(TeamDeathmatch);
-
-    TeamDeathmatch::TeamDeathmatch(BaseObject* creator) : Deathmatch(creator)
-    {
-        RegisterObject(TeamDeathmatch);
-
-        this->teams_ = 2;
-
-        this->setConfigValues();
-    }
-
-    void TeamDeathmatch::setConfigValues()
-    {
-        SetConfigValue(teams_, 2);
-
-        static ColourValue colours[] =
-        {
-            ColourValue(1.0, 0.3, 0.3),
-            ColourValue(0.3, 0.3, 1.0),
-            ColourValue(0.3, 1.0, 0.3),
-            ColourValue(1.0, 1.0, 0.0)
-        };
-        static std::vector<ColourValue> defaultcolours(colours, colours + sizeof(colours) / sizeof(ColourValue));
-
-        SetConfigValueVector(teamcolours_, defaultcolours);
-    }
-
-    void TeamDeathmatch::playerEntered(PlayerInfo* player)
-    {
-        Deathmatch::playerEntered(player);
-
-        std::vector<unsigned int> playersperteam(this->teams_, 0);
-
-        for (std::map<PlayerInfo*, int>::iterator it = this->teamnumbers_.begin(); it != this->teamnumbers_.end(); ++it)
-            if (it->second < this->teams_ && it->second >= 0)
-                playersperteam[it->second]++;
-
-        unsigned int minplayers = (unsigned int)-1;
-        size_t minplayersteam = 0;
-        for (size_t i = 0; i < this->teams_; ++i)
-        {
-            if (playersperteam[i] < minplayers)
-            {
-                minplayers = playersperteam[i];
-                minplayersteam = i;
-            }
-        }
-
-        this->teamnumbers_[player] = minplayersteam;
-    }
-
-    bool TeamDeathmatch::playerLeft(PlayerInfo* player)
-    {
-        bool valid_player = Deathmatch::playerLeft(player);
-
-        if (valid_player)
-            this->players_.erase(player);
-
-        return valid_player;
-    }
-
-    bool TeamDeathmatch::allowPawnHit(Pawn* victim, Pawn* originator)
-    {
-        return (!this->pawnsAreInTheSameTeam(victim, originator));
-    }
-
-    bool TeamDeathmatch::allowPawnDamage(Pawn* victim, Pawn* originator)
-    {
-        return (!this->pawnsAreInTheSameTeam(victim, originator));
-    }
-
-    bool TeamDeathmatch::allowPawnDeath(Pawn* victim, Pawn* originator)
-    {
-        return (!this->pawnsAreInTheSameTeam(victim, originator));
-    }
-
-    SpawnPoint* TeamDeathmatch::getBestSpawnPoint(PlayerInfo* player) const
-    {
-        int desiredTeamNr = -1;
-        std::map<PlayerInfo*, int>::const_iterator it_player = this->teamnumbers_.find(player);
-        if (it_player != this->teamnumbers_.end())
-            desiredTeamNr = it_player->second;
-
-        // Only use spawnpoints of the own team (or non-team-spawnpoints)
-        std::set<SpawnPoint*> teamSpawnPoints = this->spawnpoints_;
-        for (std::set<SpawnPoint*>::const_iterator it = teamSpawnPoints.begin(); it != teamSpawnPoints.end(); )
-        {
-            if ((*it)->isA(Class(TeamSpawnPoint)))
-            {
-                TeamSpawnPoint* tsp = dynamic_cast<TeamSpawnPoint*>(*it);
-                if (tsp && tsp->getTeamNumber() != desiredTeamNr)
-                {
-                    teamSpawnPoints.erase(it++);
-                    continue;
-                }
-            }
-
-            ++it;
-        }
-
-        if (teamSpawnPoints.size() > 0)
-        {
-            unsigned int randomspawn = (unsigned int)rnd(teamSpawnPoints.size());
-            unsigned int index = 0;
-            for (std::set<SpawnPoint*>::const_iterator it = teamSpawnPoints.begin(); it != teamSpawnPoints.end(); ++it)
-            {
-                if (index == randomspawn)
-                    return (*it);
-
-                ++index;
-            }
-        }
-
-        return 0;
-    }
-
-    void TeamDeathmatch::playerStartsControllingPawn(PlayerInfo* player, Pawn* pawn)
-    {
-        if (!player)
-            return;
-
-        // Set the team colour
-        std::map<PlayerInfo*, int>::const_iterator it_player = this->teamnumbers_.find(player);
-        if (it_player != this->teamnumbers_.end() && it_player->second >= 0 && it_player->second < this->teamcolours_.size())
-        {
-            if (pawn)
-            {
-                std::set<WorldEntity*> pawnAttachments = pawn->getAttachedObjects();
-                for (std::set<WorldEntity*>::iterator it = pawnAttachments.begin(); it != pawnAttachments.end(); ++it)
-                {
-                    if ((*it)->isA(Class(Teamcolourable)))
-                    {
-                        Teamcolourable* tc = dynamic_cast<Teamcolourable*>(*it);
-                        tc->setTeamColour(this->teamcolours_[it_player->second]);
-                    }
-                }
-            }
-        }
-    }
-
-    bool TeamDeathmatch::pawnsAreInTheSameTeam(Pawn* pawn1, Pawn* pawn2)
-    {
-        if (pawn1 && pawn2)
-        {
-            std::map<PlayerInfo*, int>::const_iterator it1 = this->teamnumbers_.find(pawn1->getPlayer());
-            std::map<PlayerInfo*, int>::const_iterator it2 = this->teamnumbers_.find(pawn2->getPlayer());
-
-            if (it1 != this->teamnumbers_.end() && it2 != this->teamnumbers_.end())
-                return (it1->second == it2->second);
-        }
-        return false;
-    }
-}
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "OrxonoxStableHeaders.h"
+#include "TeamDeathmatch.h"
+
+#include "core/CoreIncludes.h"
+#include "core/ConfigValueIncludes.h"
+#include "objects/Teamcolourable.h"
+#include "objects/worldentities/TeamSpawnPoint.h"
+
+namespace orxonox
+{
+    CreateUnloadableFactory(TeamDeathmatch);
+
+    TeamDeathmatch::TeamDeathmatch(BaseObject* creator) : Deathmatch(creator)
+    {
+        RegisterObject(TeamDeathmatch);
+
+        this->teams_ = 2;
+
+        this->setConfigValues();
+    }
+
+    void TeamDeathmatch::setConfigValues()
+    {
+        SetConfigValue(teams_, 2);
+
+        static ColourValue colours[] =
+        {
+            ColourValue(1.0, 0.3, 0.3),
+            ColourValue(0.3, 0.3, 1.0),
+            ColourValue(0.3, 1.0, 0.3),
+            ColourValue(1.0, 1.0, 0.0)
+        };
+        static std::vector<ColourValue> defaultcolours(colours, colours + sizeof(colours) / sizeof(ColourValue));
+
+        SetConfigValueVector(teamcolours_, defaultcolours);
+    }
+
+    void TeamDeathmatch::playerEntered(PlayerInfo* player)
+    {
+        Deathmatch::playerEntered(player);
+
+        std::vector<unsigned int> playersperteam(this->teams_, 0);
+
+        for (std::map<PlayerInfo*, int>::iterator it = this->teamnumbers_.begin(); it != this->teamnumbers_.end(); ++it)
+            if (it->second < this->teams_ && it->second >= 0)
+                playersperteam[it->second]++;
+
+        unsigned int minplayers = (unsigned int)-1;
+        size_t minplayersteam = 0;
+        for (size_t i = 0; i < this->teams_; ++i)
+        {
+            if (playersperteam[i] < minplayers)
+            {
+                minplayers = playersperteam[i];
+                minplayersteam = i;
+            }
+        }
+
+        this->teamnumbers_[player] = minplayersteam;
+    }
+
+    bool TeamDeathmatch::playerLeft(PlayerInfo* player)
+    {
+        bool valid_player = Deathmatch::playerLeft(player);
+
+        if (valid_player)
+            this->players_.erase(player);
+
+        return valid_player;
+    }
+
+    bool TeamDeathmatch::allowPawnHit(Pawn* victim, Pawn* originator)
+    {
+        return (!this->pawnsAreInTheSameTeam(victim, originator));
+    }
+
+    bool TeamDeathmatch::allowPawnDamage(Pawn* victim, Pawn* originator)
+    {
+        return (!this->pawnsAreInTheSameTeam(victim, originator));
+    }
+
+    bool TeamDeathmatch::allowPawnDeath(Pawn* victim, Pawn* originator)
+    {
+        return (!this->pawnsAreInTheSameTeam(victim, originator));
+    }
+
+    SpawnPoint* TeamDeathmatch::getBestSpawnPoint(PlayerInfo* player) const
+    {
+        int desiredTeamNr = -1;
+        std::map<PlayerInfo*, int>::const_iterator it_player = this->teamnumbers_.find(player);
+        if (it_player != this->teamnumbers_.end())
+            desiredTeamNr = it_player->second;
+
+        // Only use spawnpoints of the own team (or non-team-spawnpoints)
+        std::set<SpawnPoint*> teamSpawnPoints = this->spawnpoints_;
+        for (std::set<SpawnPoint*>::const_iterator it = teamSpawnPoints.begin(); it != teamSpawnPoints.end(); )
+        {
+            if ((*it)->isA(Class(TeamSpawnPoint)))
+            {
+                TeamSpawnPoint* tsp = dynamic_cast<TeamSpawnPoint*>(*it);
+                if (tsp && tsp->getTeamNumber() != desiredTeamNr)
+                {
+                    teamSpawnPoints.erase(it++);
+                    continue;
+                }
+            }
+
+            ++it;
+        }
+
+        if (teamSpawnPoints.size() > 0)
+        {
+            unsigned int randomspawn = (unsigned int)rnd(teamSpawnPoints.size());
+            unsigned int index = 0;
+            for (std::set<SpawnPoint*>::const_iterator it = teamSpawnPoints.begin(); it != teamSpawnPoints.end(); ++it)
+            {
+                if (index == randomspawn)
+                    return (*it);
+
+                ++index;
+            }
+        }
+
+        return 0;
+    }
+
+    void TeamDeathmatch::playerStartsControllingPawn(PlayerInfo* player, Pawn* pawn)
+    {
+        if (!player)
+            return;
+
+        // Set the team colour
+        std::map<PlayerInfo*, int>::const_iterator it_player = this->teamnumbers_.find(player);
+        if (it_player != this->teamnumbers_.end() && it_player->second >= 0 && it_player->second < this->teamcolours_.size())
+        {
+            if (pawn)
+            {
+                std::set<WorldEntity*> pawnAttachments = pawn->getAttachedObjects();
+                for (std::set<WorldEntity*>::iterator it = pawnAttachments.begin(); it != pawnAttachments.end(); ++it)
+                {
+                    if ((*it)->isA(Class(Teamcolourable)))
+                    {
+                        Teamcolourable* tc = dynamic_cast<Teamcolourable*>(*it);
+                        tc->setTeamColour(this->teamcolours_[it_player->second]);
+                    }
+                }
+            }
+        }
+    }
+
+    bool TeamDeathmatch::pawnsAreInTheSameTeam(Pawn* pawn1, Pawn* pawn2)
+    {
+        if (pawn1 && pawn2)
+        {
+            std::map<PlayerInfo*, int>::const_iterator it1 = this->teamnumbers_.find(pawn1->getPlayer());
+            std::map<PlayerInfo*, int>::const_iterator it2 = this->teamnumbers_.find(pawn2->getPlayer());
+
+            if (it1 != this->teamnumbers_.end() && it2 != this->teamnumbers_.end())
+                return (it1->second == it2->second);
+        }
+        return false;
+    }
+}


Property changes on: branches/miniprojects/src/orxonox/objects/gametypes/TeamDeathmatch.cc
___________________________________________________________________
Added: svn:eol-style
   + native

Modified: branches/miniprojects/src/orxonox/objects/gametypes/TeamDeathmatch.h
===================================================================
--- branches/miniprojects/src/orxonox/objects/gametypes/TeamDeathmatch.h	2009-03-23 10:26:46 UTC (rev 2824)
+++ branches/miniprojects/src/orxonox/objects/gametypes/TeamDeathmatch.h	2009-03-23 10:32:02 UTC (rev 2825)
@@ -1,67 +1,67 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-#ifndef _TeamDeathmatch_H__
-#define _TeamDeathmatch_H__
-
-#include "OrxonoxPrereqs.h"
-
-#include <vector>
-
-#include "Deathmatch.h"
-
-namespace orxonox
-{
-    class _OrxonoxExport TeamDeathmatch : public Deathmatch
-    {
-        public:
-            TeamDeathmatch(BaseObject* creator);
-            virtual ~TeamDeathmatch() {}
-
-            void setConfigValues();
-
-            virtual void playerEntered(PlayerInfo* player);
-            virtual bool playerLeft(PlayerInfo* player);
-
-            virtual bool allowPawnHit(Pawn* victim, Pawn* originator = 0);
-            virtual bool allowPawnDamage(Pawn* victim, Pawn* originator = 0);
-            virtual bool allowPawnDeath(Pawn* victim, Pawn* originator = 0);
-
-            virtual void playerStartsControllingPawn(PlayerInfo* player, Pawn* pawn);
-
-        protected:
-            virtual SpawnPoint* getBestSpawnPoint(PlayerInfo* player) const;
-            bool pawnsAreInTheSameTeam(Pawn* pawn1, Pawn* pawn2);
-
-            std::map<PlayerInfo*, int> teamnumbers_;
-            std::vector<ColourValue> teamcolours_;
-            unsigned int teams_;
-    };
-}
-
-#endif /* _TeamDeathmatch_H__ */
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _TeamDeathmatch_H__
+#define _TeamDeathmatch_H__
+
+#include "OrxonoxPrereqs.h"
+
+#include <vector>
+
+#include "Deathmatch.h"
+
+namespace orxonox
+{
+    class _OrxonoxExport TeamDeathmatch : public Deathmatch
+    {
+        public:
+            TeamDeathmatch(BaseObject* creator);
+            virtual ~TeamDeathmatch() {}
+
+            void setConfigValues();
+
+            virtual void playerEntered(PlayerInfo* player);
+            virtual bool playerLeft(PlayerInfo* player);
+
+            virtual bool allowPawnHit(Pawn* victim, Pawn* originator = 0);
+            virtual bool allowPawnDamage(Pawn* victim, Pawn* originator = 0);
+            virtual bool allowPawnDeath(Pawn* victim, Pawn* originator = 0);
+
+            virtual void playerStartsControllingPawn(PlayerInfo* player, Pawn* pawn);
+
+        protected:
+            virtual SpawnPoint* getBestSpawnPoint(PlayerInfo* player) const;
+            bool pawnsAreInTheSameTeam(Pawn* pawn1, Pawn* pawn2);
+
+            std::map<PlayerInfo*, int> teamnumbers_;
+            std::vector<ColourValue> teamcolours_;
+            unsigned int teams_;
+    };
+}
+
+#endif /* _TeamDeathmatch_H__ */


Property changes on: branches/miniprojects/src/orxonox/objects/gametypes/TeamDeathmatch.h
___________________________________________________________________
Added: svn:eol-style
   + native

Modified: branches/miniprojects/src/orxonox/objects/worldentities/PongBall.cc
===================================================================
--- branches/miniprojects/src/orxonox/objects/worldentities/PongBall.cc	2009-03-23 10:26:46 UTC (rev 2824)
+++ branches/miniprojects/src/orxonox/objects/worldentities/PongBall.cc	2009-03-23 10:32:02 UTC (rev 2825)
@@ -1,124 +1,124 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-#include "OrxonoxStableHeaders.h"
-#include "PongBall.h"
-
-#include "core/CoreIncludes.h"
-#include "objects/worldentities/PongBat.h"
-#include "objects/gametypes/Gametype.h"
-
-namespace orxonox
-{
-    CreateFactory(PongBall);
-
-    PongBall::PongBall(BaseObject* creator) : MovableEntity(creator)
-    {
-        RegisterObject(PongBall);
-
-        this->speed_ = 0;
-        this->bat_ = 0;
-    }
-
-    void PongBall::tick(float dt)
-    {
-        SUPER(PongBall, tick, dt);
-
-        if (Core::isMaster())
-        {
-            Vector3 position = this->getPosition();
-            Vector3 velocity = this->getVelocity();
-
-            if (position.z > this->fieldHeight_ / 2 || position.z < -this->fieldHeight_ / 2)
-            {
-                velocity.z = -velocity.z;
-
-                if (position.z > this->fieldHeight_ / 2)
-                    position.z = this->fieldHeight_ / 2;
-                if (position.z < -this->fieldHeight_ / 2)
-                    position.z = -this->fieldHeight_ / 2;
-            }
-
-            if (position.x > this->fieldWidth_ / 2 || position.x < -this->fieldWidth_ / 2)
-            {
-                velocity.x = -velocity.x;
-                float distance = 0;
-
-                if (position.x > this->fieldWidth_ / 2)
-                {
-                    position.x = this->fieldWidth_ / 2;
-                    if (this->bat_ && this->bat_[1])
-                    {
-                        distance = (position.z - this->bat_[1]->getPosition().z) / (this->fieldHeight_ * this->batlength_ / 2);
-                        if (this->getGametype() && this->bat_[0] && fabs(distance) > 1)
-                        {
-                            this->getGametype()->playerScored(this->bat_[0]->getPlayer());
-                            return;
-                        }
-                    }
-                }
-                if (position.x < -this->fieldWidth_ / 2)
-                {
-                    position.x = -this->fieldWidth_ / 2;
-                    if (this->bat_ && this->bat_[0])
-                    {
-                        distance = (position.z - this->bat_[0]->getPosition().z) / (this->fieldHeight_ * this->batlength_ / 2);
-                        if (this->getGametype() && this->bat_[1] && fabs(distance) > 1)
-                        {
-                            this->getGametype()->playerScored(this->bat_[1]->getPlayer());
-                            return;
-                        }
-                    }
-                }
-
-                velocity.z = distance * distance * sgn(distance) * 1.5 * this->speed_;
-            }
-
-            if (velocity != this->getVelocity())
-                this->setVelocity(velocity);
-            if (position != this->getPosition())
-                this->setPosition(position);
-        }
-    }
-
-    void PongBall::setSpeed(float speed)
-    {
-        if (speed != this->speed_)
-        {
-            this->speed_ = speed;
-
-            Vector3 velocity = this->getVelocity();
-            if (velocity.x != 0)
-                velocity.x = sgn(velocity.x) * this->speed_;
-            else
-                velocity.x = this->speed_ * sgn(rnd(-1,1));
-
-            this->setVelocity(velocity);
-        }
-    }
-}
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "OrxonoxStableHeaders.h"
+#include "PongBall.h"
+
+#include "core/CoreIncludes.h"
+#include "objects/worldentities/PongBat.h"
+#include "objects/gametypes/Gametype.h"
+
+namespace orxonox
+{
+    CreateFactory(PongBall);
+
+    PongBall::PongBall(BaseObject* creator) : MovableEntity(creator)
+    {
+        RegisterObject(PongBall);
+
+        this->speed_ = 0;
+        this->bat_ = 0;
+    }
+
+    void PongBall::tick(float dt)
+    {
+        SUPER(PongBall, tick, dt);
+
+        if (Core::isMaster())
+        {
+            Vector3 position = this->getPosition();
+            Vector3 velocity = this->getVelocity();
+
+            if (position.z > this->fieldHeight_ / 2 || position.z < -this->fieldHeight_ / 2)
+            {
+                velocity.z = -velocity.z;
+
+                if (position.z > this->fieldHeight_ / 2)
+                    position.z = this->fieldHeight_ / 2;
+                if (position.z < -this->fieldHeight_ / 2)
+                    position.z = -this->fieldHeight_ / 2;
+            }
+
+            if (position.x > this->fieldWidth_ / 2 || position.x < -this->fieldWidth_ / 2)
+            {
+                velocity.x = -velocity.x;
+                float distance = 0;
+
+                if (position.x > this->fieldWidth_ / 2)
+                {
+                    position.x = this->fieldWidth_ / 2;
+                    if (this->bat_ && this->bat_[1])
+                    {
+                        distance = (position.z - this->bat_[1]->getPosition().z) / (this->fieldHeight_ * this->batlength_ / 2);
+                        if (this->getGametype() && this->bat_[0] && fabs(distance) > 1)
+                        {
+                            this->getGametype()->playerScored(this->bat_[0]->getPlayer());
+                            return;
+                        }
+                    }
+                }
+                if (position.x < -this->fieldWidth_ / 2)
+                {
+                    position.x = -this->fieldWidth_ / 2;
+                    if (this->bat_ && this->bat_[0])
+                    {
+                        distance = (position.z - this->bat_[0]->getPosition().z) / (this->fieldHeight_ * this->batlength_ / 2);
+                        if (this->getGametype() && this->bat_[1] && fabs(distance) > 1)
+                        {
+                            this->getGametype()->playerScored(this->bat_[1]->getPlayer());
+                            return;
+                        }
+                    }
+                }
+
+                velocity.z = distance * distance * sgn(distance) * 1.5 * this->speed_;
+            }
+
+            if (velocity != this->getVelocity())
+                this->setVelocity(velocity);
+            if (position != this->getPosition())
+                this->setPosition(position);
+        }
+    }
+
+    void PongBall::setSpeed(float speed)
+    {
+        if (speed != this->speed_)
+        {
+            this->speed_ = speed;
+
+            Vector3 velocity = this->getVelocity();
+            if (velocity.x != 0)
+                velocity.x = sgn(velocity.x) * this->speed_;
+            else
+                velocity.x = this->speed_ * sgn(rnd(-1,1));
+
+            this->setVelocity(velocity);
+        }
+    }
+}


Property changes on: branches/miniprojects/src/orxonox/objects/worldentities/PongBall.cc
___________________________________________________________________
Added: svn:eol-style
   + native

Modified: branches/miniprojects/src/orxonox/objects/worldentities/PongBall.h
===================================================================
--- branches/miniprojects/src/orxonox/objects/worldentities/PongBall.h	2009-03-23 10:26:46 UTC (rev 2824)
+++ branches/miniprojects/src/orxonox/objects/worldentities/PongBall.h	2009-03-23 10:32:02 UTC (rev 2825)
@@ -1,72 +1,72 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-#ifndef _PongBall_H__
-#define _PongBall_H__
-
-#include "OrxonoxPrereqs.h"
-
-#include "objects/worldentities/MovableEntity.h"
-
-namespace orxonox
-{
-    class _OrxonoxExport PongBall : public MovableEntity
-    {
-        public:
-            PongBall(BaseObject* creator);
-            virtual ~PongBall() {}
-
-            virtual void tick(float dt);
-
-            void setFieldDimension(float width, float height)
-                { this->fieldWidth_ = width; this->fieldHeight_ = height; }
-            void setFieldDimension(const Vector2& dimension)
-                { this->setFieldDimension(dimension.x, dimension.y); }
-
-            void setSpeed(float speed);
-            float getSpeed() const
-                { return this->speed_; }
-
-            void setBatLength(float batlength)
-                { this->batlength_ = batlength; }
-            float getBatLength() const
-                { return this->batlength_; }
-
-            void setBats(PongBat** bats)
-                { this->bat_ = bats; }
-
-        private:
-            float fieldWidth_;
-            float fieldHeight_;
-            float speed_;
-            float batlength_;
-            PongBat** bat_;
-    };
-}
-
-#endif /* _PongBall_H__ */
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _PongBall_H__
+#define _PongBall_H__
+
+#include "OrxonoxPrereqs.h"
+
+#include "objects/worldentities/MovableEntity.h"
+
+namespace orxonox
+{
+    class _OrxonoxExport PongBall : public MovableEntity
+    {
+        public:
+            PongBall(BaseObject* creator);
+            virtual ~PongBall() {}
+
+            virtual void tick(float dt);
+
+            void setFieldDimension(float width, float height)
+                { this->fieldWidth_ = width; this->fieldHeight_ = height; }
+            void setFieldDimension(const Vector2& dimension)
+                { this->setFieldDimension(dimension.x, dimension.y); }
+
+            void setSpeed(float speed);
+            float getSpeed() const
+                { return this->speed_; }
+
+            void setBatLength(float batlength)
+                { this->batlength_ = batlength; }
+            float getBatLength() const
+                { return this->batlength_; }
+
+            void setBats(PongBat** bats)
+                { this->bat_ = bats; }
+
+        private:
+            float fieldWidth_;
+            float fieldHeight_;
+            float speed_;
+            float batlength_;
+            PongBat** bat_;
+    };
+}
+
+#endif /* _PongBall_H__ */


Property changes on: branches/miniprojects/src/orxonox/objects/worldentities/PongBall.h
___________________________________________________________________
Added: svn:eol-style
   + native

Modified: branches/miniprojects/src/orxonox/objects/worldentities/PongBat.cc
===================================================================
--- branches/miniprojects/src/orxonox/objects/worldentities/PongBat.cc	2009-03-23 10:26:46 UTC (rev 2824)
+++ branches/miniprojects/src/orxonox/objects/worldentities/PongBat.cc	2009-03-23 10:32:02 UTC (rev 2825)
@@ -1,100 +1,100 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-#include "OrxonoxStableHeaders.h"
-#include "PongBat.h"
-
-#include "core/CoreIncludes.h"
-#include "core/XMLPort.h"
-
-namespace orxonox
-{
-    CreateFactory(PongBat);
-
-    PongBat::PongBat(BaseObject* creator) : ControllableEntity(creator)
-    {
-        RegisterObject(PongBat);
-
-        this->movement_ = 0;
-        this->bMoveLocal_ = false;
-        this->speed_ = 60;
-        this->length_ = 0.25;
-        this->fieldHeight_ = 100;
-
-        this->registerVariables();
-    }
-
-    void PongBat::registerVariables()
-    {
-        registerVariable(this->speed_);
-        registerVariable(this->speed_);
-        registerVariable(this->speed_);
-    }
-
-    void PongBat::tick(float dt)
-    {
-        if (this->hasLocalController())
-        {
-            this->movement_ = clamp(this->movement_, -1.0f, 1.0f) * this->speed_;
-
-            if (this->bMoveLocal_)
-                this->setVelocity(this->getOrientation() * Vector3(this->movement_, 0, 0));
-            else
-                this->setVelocity(0, 0, this->movement_);
-
-            this->movement_ = 0;
-        }
-
-        SUPER(PongBat, tick, dt);
-
-        if (this->hasLocalController())
-        {
-            Vector3 position = this->getPosition();
-
-            if (position.z > this->fieldHeight_ / 2 - this->fieldHeight_ * this->length_ / 2)
-                position.z = this->fieldHeight_ / 2 - this->fieldHeight_ * this->length_ / 2;
-            if (position.z < -this->fieldHeight_ / 2 + this->fieldHeight_ * this->length_ / 2)
-                position.z = -this->fieldHeight_ / 2 + this->fieldHeight_ * this->length_ / 2;
-
-            if (position != this->getPosition())
-                this->setPosition(position);
-        }
-    }
-
-    void PongBat::moveFrontBack(const Vector2& value)
-    {
-        this->bMoveLocal_ = false;
-        this->movement_ -= value.x;
-    }
-
-    void PongBat::moveRightLeft(const Vector2& value)
-    {
-        this->bMoveLocal_ = true;
-        this->movement_ = value.x;
-    }
-}
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "OrxonoxStableHeaders.h"
+#include "PongBat.h"
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+
+namespace orxonox
+{
+    CreateFactory(PongBat);
+
+    PongBat::PongBat(BaseObject* creator) : ControllableEntity(creator)
+    {
+        RegisterObject(PongBat);
+
+        this->movement_ = 0;
+        this->bMoveLocal_ = false;
+        this->speed_ = 60;
+        this->length_ = 0.25;
+        this->fieldHeight_ = 100;
+
+        this->registerVariables();
+    }
+
+    void PongBat::registerVariables()
+    {
+        registerVariable(this->speed_);
+        registerVariable(this->speed_);
+        registerVariable(this->speed_);
+    }
+
+    void PongBat::tick(float dt)
+    {
+        if (this->hasLocalController())
+        {
+            this->movement_ = clamp(this->movement_, -1.0f, 1.0f) * this->speed_;
+
+            if (this->bMoveLocal_)
+                this->setVelocity(this->getOrientation() * Vector3(this->movement_, 0, 0));
+            else
+                this->setVelocity(0, 0, this->movement_);
+
+            this->movement_ = 0;
+        }
+
+        SUPER(PongBat, tick, dt);
+
+        if (this->hasLocalController())
+        {
+            Vector3 position = this->getPosition();
+
+            if (position.z > this->fieldHeight_ / 2 - this->fieldHeight_ * this->length_ / 2)
+                position.z = this->fieldHeight_ / 2 - this->fieldHeight_ * this->length_ / 2;
+            if (position.z < -this->fieldHeight_ / 2 + this->fieldHeight_ * this->length_ / 2)
+                position.z = -this->fieldHeight_ / 2 + this->fieldHeight_ * this->length_ / 2;
+
+            if (position != this->getPosition())
+                this->setPosition(position);
+        }
+    }
+
+    void PongBat::moveFrontBack(const Vector2& value)
+    {
+        this->bMoveLocal_ = false;
+        this->movement_ -= value.x;
+    }
+
+    void PongBat::moveRightLeft(const Vector2& value)
+    {
+        this->bMoveLocal_ = true;
+        this->movement_ = value.x;
+    }
+}


Property changes on: branches/miniprojects/src/orxonox/objects/worldentities/PongBat.cc
___________________________________________________________________
Added: svn:eol-style
   + native

Modified: branches/miniprojects/src/orxonox/objects/worldentities/PongBat.h
===================================================================
--- branches/miniprojects/src/orxonox/objects/worldentities/PongBat.h	2009-03-23 10:26:46 UTC (rev 2824)
+++ branches/miniprojects/src/orxonox/objects/worldentities/PongBat.h	2009-03-23 10:32:02 UTC (rev 2825)
@@ -1,74 +1,74 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-#ifndef _PongBat_H__
-#define _PongBat_H__
-
-#include "OrxonoxPrereqs.h"
-
-#include "objects/worldentities/ControllableEntity.h"
-
-namespace orxonox
-{
-    class _OrxonoxExport PongBat : public ControllableEntity
-    {
-        public:
-            PongBat(BaseObject* creator);
-            virtual ~PongBat() {}
-
-            void registerVariables();
-            virtual void tick(float dt);
-
-            virtual void moveFrontBack(const Vector2& value);
-            virtual void moveRightLeft(const Vector2& value);
-
-            void setSpeed(float speed)
-                { this->speed_ = speed; }
-            float getSpeed() const
-                { return this->speed_; }
-
-            void setFieldHeight(float height)
-                { this->fieldHeight_ = height; }
-            float getFieldHeight() const
-                { return this->fieldHeight_; }
-
-            void setLength(float length)
-                { this->length_ = length; }
-            float getLength() const
-                { return this->length_; }
-
-        private:
-            float movement_;
-            bool bMoveLocal_;
-            float speed_;
-            float length_;
-            float fieldHeight_;
-    };
-}
-
-#endif /* _PongBat_H__ */
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _PongBat_H__
+#define _PongBat_H__
+
+#include "OrxonoxPrereqs.h"
+
+#include "objects/worldentities/ControllableEntity.h"
+
+namespace orxonox
+{
+    class _OrxonoxExport PongBat : public ControllableEntity
+    {
+        public:
+            PongBat(BaseObject* creator);
+            virtual ~PongBat() {}
+
+            void registerVariables();
+            virtual void tick(float dt);
+
+            virtual void moveFrontBack(const Vector2& value);
+            virtual void moveRightLeft(const Vector2& value);
+
+            void setSpeed(float speed)
+                { this->speed_ = speed; }
+            float getSpeed() const
+                { return this->speed_; }
+
+            void setFieldHeight(float height)
+                { this->fieldHeight_ = height; }
+            float getFieldHeight() const
+                { return this->fieldHeight_; }
+
+            void setLength(float length)
+                { this->length_ = length; }
+            float getLength() const
+                { return this->length_; }
+
+        private:
+            float movement_;
+            bool bMoveLocal_;
+            float speed_;
+            float length_;
+            float fieldHeight_;
+    };
+}
+
+#endif /* _PongBat_H__ */


Property changes on: branches/miniprojects/src/orxonox/objects/worldentities/PongBat.h
___________________________________________________________________
Added: svn:eol-style
   + native

Modified: branches/miniprojects/src/orxonox/objects/worldentities/PongCenterpoint.cc
===================================================================
--- branches/miniprojects/src/orxonox/objects/worldentities/PongCenterpoint.cc	2009-03-23 10:26:46 UTC (rev 2824)
+++ branches/miniprojects/src/orxonox/objects/worldentities/PongCenterpoint.cc	2009-03-23 10:32:02 UTC (rev 2825)
@@ -1,80 +1,80 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-#include "OrxonoxStableHeaders.h"
-#include "PongCenterpoint.h"
-
-#include "core/CoreIncludes.h"
-#include "core/XMLPort.h"
-#include "objects/gametypes/Pong.h"
-
-namespace orxonox
-{
-    CreateFactory(PongCenterpoint);
-
-    PongCenterpoint::PongCenterpoint(BaseObject* creator) : StaticEntity(creator)
-    {
-        RegisterObject(PongCenterpoint);
-
-        this->width_ = 200;
-        this->height_ = 120;
-        this->ballspeed_ = 100;
-        this->batspeed_ = 60;
-        this->batlength_ = 0.25;
-
-        this->checkGametype();
-    }
-
-    void PongCenterpoint::XMLPort(Element& xmlelement, XMLPort::Mode mode)
-    {
-        SUPER(PongCenterpoint, XMLPort, xmlelement, mode);
-
-        XMLPortParam(PongCenterpoint, "dimension", setFieldDimension, getFieldDimension, xmlelement, mode);
-        XMLPortParam(PongCenterpoint, "balltemplate", setBalltemplate, getBalltemplate, xmlelement, mode);
-        XMLPortParam(PongCenterpoint, "battemplate", setBattemplate, getBattemplate, xmlelement, mode);
-        XMLPortParam(PongCenterpoint, "ballspeed", setBallSpeed, getBallSpeed, xmlelement, mode);
-        XMLPortParam(PongCenterpoint, "batspeed", setBatSpeed, getBatSpeed, xmlelement, mode);
-        XMLPortParam(PongCenterpoint, "batlength", setBatLength, getBatLength, xmlelement, mode);
-    }
-
-    void PongCenterpoint::changedGametype()
-    {
-        SUPER(PongCenterpoint, changedGametype);
-
-        this->checkGametype();
-    }
-
-    void PongCenterpoint::checkGametype()
-    {
-        if (this->getGametype() && this->getGametype()->isA(Class(Pong)))
-        {
-            Pong* pong_gametype = dynamic_cast<Pong*>(this->getGametype());
-            pong_gametype->setCenterpoint(this);
-        }
-    }
-}
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "OrxonoxStableHeaders.h"
+#include "PongCenterpoint.h"
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "objects/gametypes/Pong.h"
+
+namespace orxonox
+{
+    CreateFactory(PongCenterpoint);
+
+    PongCenterpoint::PongCenterpoint(BaseObject* creator) : StaticEntity(creator)
+    {
+        RegisterObject(PongCenterpoint);
+
+        this->width_ = 200;
+        this->height_ = 120;
+        this->ballspeed_ = 100;
+        this->batspeed_ = 60;
+        this->batlength_ = 0.25;
+
+        this->checkGametype();
+    }
+
+    void PongCenterpoint::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(PongCenterpoint, XMLPort, xmlelement, mode);
+
+        XMLPortParam(PongCenterpoint, "dimension", setFieldDimension, getFieldDimension, xmlelement, mode);
+        XMLPortParam(PongCenterpoint, "balltemplate", setBalltemplate, getBalltemplate, xmlelement, mode);
+        XMLPortParam(PongCenterpoint, "battemplate", setBattemplate, getBattemplate, xmlelement, mode);
+        XMLPortParam(PongCenterpoint, "ballspeed", setBallSpeed, getBallSpeed, xmlelement, mode);
+        XMLPortParam(PongCenterpoint, "batspeed", setBatSpeed, getBatSpeed, xmlelement, mode);
+        XMLPortParam(PongCenterpoint, "batlength", setBatLength, getBatLength, xmlelement, mode);
+    }
+
+    void PongCenterpoint::changedGametype()
+    {
+        SUPER(PongCenterpoint, changedGametype);
+
+        this->checkGametype();
+    }
+
+    void PongCenterpoint::checkGametype()
+    {
+        if (this->getGametype() && this->getGametype()->isA(Class(Pong)))
+        {
+            Pong* pong_gametype = dynamic_cast<Pong*>(this->getGametype());
+            pong_gametype->setCenterpoint(this);
+        }
+    }
+}


Property changes on: branches/miniprojects/src/orxonox/objects/worldentities/PongCenterpoint.cc
___________________________________________________________________
Added: svn:eol-style
   + native

Modified: branches/miniprojects/src/orxonox/objects/worldentities/PongCenterpoint.h
===================================================================
--- branches/miniprojects/src/orxonox/objects/worldentities/PongCenterpoint.h	2009-03-23 10:26:46 UTC (rev 2824)
+++ branches/miniprojects/src/orxonox/objects/worldentities/PongCenterpoint.h	2009-03-23 10:32:02 UTC (rev 2825)
@@ -1,93 +1,93 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-#ifndef _PongCenterpoint_H__
-#define _PongCenterpoint_H__
-
-#include "OrxonoxPrereqs.h"
-
-#include "objects/worldentities/StaticEntity.h"
-
-namespace orxonox
-{
-    class _OrxonoxExport PongCenterpoint : public StaticEntity
-    {
-        public:
-            PongCenterpoint(BaseObject* creator);
-            virtual ~PongCenterpoint() {}
-
-            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
-
-            virtual void changedGametype();
-
-            void setBalltemplate(const std::string& balltemplate)
-                { this->balltemplate_ = balltemplate; }
-            const std::string& getBalltemplate() const
-                { return this->balltemplate_; }
-
-            void setBattemplate(const std::string& battemplate)
-                { this->battemplate_ = battemplate; }
-            const std::string& getBattemplate() const
-                { return this->battemplate_; }
-
-            void setFieldDimension(const Vector2& dimension)
-                { this->width_ = dimension.x; this->height_ = dimension.y; }
-            Vector2 getFieldDimension() const
-                { return Vector2(this->width_, this->height_); }
-
-            void setBallSpeed(float ballspeed)
-                { this->ballspeed_ = ballspeed; }
-            float getBallSpeed() const
-                { return this->ballspeed_; }
-
-            void setBatSpeed(float batspeed)
-                { this->batspeed_ = batspeed; }
-            float getBatSpeed() const
-                { return this->batspeed_; }
-
-            void setBatLength(float batlength)
-                { this->batlength_ = batlength; }
-            float getBatLength() const
-                { return this->batlength_; }
-
-        private:
-            void checkGametype();
-
-            std::string balltemplate_;
-            std::string battemplate_;
-
-            float ballspeed_;
-            float batspeed_;
-            float batlength_;
-
-            float width_;
-            float height_;
-    };
-}
-
-#endif /* _PongCenterpoint_H__ */
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _PongCenterpoint_H__
+#define _PongCenterpoint_H__
+
+#include "OrxonoxPrereqs.h"
+
+#include "objects/worldentities/StaticEntity.h"
+
+namespace orxonox
+{
+    class _OrxonoxExport PongCenterpoint : public StaticEntity
+    {
+        public:
+            PongCenterpoint(BaseObject* creator);
+            virtual ~PongCenterpoint() {}
+
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+
+            virtual void changedGametype();
+
+            void setBalltemplate(const std::string& balltemplate)
+                { this->balltemplate_ = balltemplate; }
+            const std::string& getBalltemplate() const
+                { return this->balltemplate_; }
+
+            void setBattemplate(const std::string& battemplate)
+                { this->battemplate_ = battemplate; }
+            const std::string& getBattemplate() const
+                { return this->battemplate_; }
+
+            void setFieldDimension(const Vector2& dimension)
+                { this->width_ = dimension.x; this->height_ = dimension.y; }
+            Vector2 getFieldDimension() const
+                { return Vector2(this->width_, this->height_); }
+
+            void setBallSpeed(float ballspeed)
+                { this->ballspeed_ = ballspeed; }
+            float getBallSpeed() const
+                { return this->ballspeed_; }
+
+            void setBatSpeed(float batspeed)
+                { this->batspeed_ = batspeed; }
+            float getBatSpeed() const
+                { return this->batspeed_; }
+
+            void setBatLength(float batlength)
+                { this->batlength_ = batlength; }
+            float getBatLength() const
+                { return this->batlength_; }
+
+        private:
+            void checkGametype();
+
+            std::string balltemplate_;
+            std::string battemplate_;
+
+            float ballspeed_;
+            float batspeed_;
+            float batlength_;
+
+            float width_;
+            float height_;
+    };
+}
+
+#endif /* _PongCenterpoint_H__ */


Property changes on: branches/miniprojects/src/orxonox/objects/worldentities/PongCenterpoint.h
___________________________________________________________________
Added: svn:eol-style
   + native

Modified: branches/miniprojects/src/orxonox/objects/worldentities/TeamSpawnPoint.cc
===================================================================
--- branches/miniprojects/src/orxonox/objects/worldentities/TeamSpawnPoint.cc	2009-03-23 10:26:46 UTC (rev 2824)
+++ branches/miniprojects/src/orxonox/objects/worldentities/TeamSpawnPoint.cc	2009-03-23 10:32:02 UTC (rev 2825)
@@ -1,52 +1,52 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-#include "OrxonoxStableHeaders.h"
-#include "TeamSpawnPoint.h"
-
-#include "core/CoreIncludes.h"
-#include "core/XMLPort.h"
-
-namespace orxonox
-{
-    CreateFactory(TeamSpawnPoint);
-
-    TeamSpawnPoint::TeamSpawnPoint(BaseObject* creator) : SpawnPoint(creator)
-    {
-        RegisterObject(TeamSpawnPoint);
-
-        this->teamNumber_ = 0;
-    }
-
-    void TeamSpawnPoint::XMLPort(Element& xmlelement, XMLPort::Mode mode)
-    {
-        SUPER(TeamSpawnPoint, XMLPort, xmlelement, mode);
-
-        XMLPortParam(TeamSpawnPoint, "team", setTeamNumber, getTeamNumber, xmlelement, mode).defaultValues(0);
-    }
-}
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "OrxonoxStableHeaders.h"
+#include "TeamSpawnPoint.h"
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+
+namespace orxonox
+{
+    CreateFactory(TeamSpawnPoint);
+
+    TeamSpawnPoint::TeamSpawnPoint(BaseObject* creator) : SpawnPoint(creator)
+    {
+        RegisterObject(TeamSpawnPoint);
+
+        this->teamNumber_ = 0;
+    }
+
+    void TeamSpawnPoint::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(TeamSpawnPoint, XMLPort, xmlelement, mode);
+
+        XMLPortParam(TeamSpawnPoint, "team", setTeamNumber, getTeamNumber, xmlelement, mode).defaultValues(0);
+    }
+}


Property changes on: branches/miniprojects/src/orxonox/objects/worldentities/TeamSpawnPoint.cc
___________________________________________________________________
Added: svn:eol-style
   + native

Modified: branches/miniprojects/src/orxonox/objects/worldentities/TeamSpawnPoint.h
===================================================================
--- branches/miniprojects/src/orxonox/objects/worldentities/TeamSpawnPoint.h	2009-03-23 10:26:46 UTC (rev 2824)
+++ branches/miniprojects/src/orxonox/objects/worldentities/TeamSpawnPoint.h	2009-03-23 10:32:02 UTC (rev 2825)
@@ -1,56 +1,56 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-#ifndef _TeamSpawnPoint_H__
-#define _TeamSpawnPoint_H__
-
-#include "OrxonoxPrereqs.h"
-
-#include "SpawnPoint.h"
-
-namespace orxonox
-{
-    class _OrxonoxExport TeamSpawnPoint : public SpawnPoint
-    {
-        public:
-            TeamSpawnPoint(BaseObject* creator);
-            virtual ~TeamSpawnPoint() {}
-
-            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
-
-            void setTeamNumber(unsigned int team)
-                { this->teamNumber_ = team; }
-            unsigned int getTeamNumber() const
-                { return this->teamNumber_; }
-
-        private:
-            unsigned int teamNumber_;
-    };
-}
-
-#endif /* _TeamSpawnPoint_H__ */
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _TeamSpawnPoint_H__
+#define _TeamSpawnPoint_H__
+
+#include "OrxonoxPrereqs.h"
+
+#include "SpawnPoint.h"
+
+namespace orxonox
+{
+    class _OrxonoxExport TeamSpawnPoint : public SpawnPoint
+    {
+        public:
+            TeamSpawnPoint(BaseObject* creator);
+            virtual ~TeamSpawnPoint() {}
+
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+
+            void setTeamNumber(unsigned int team)
+                { this->teamNumber_ = team; }
+            unsigned int getTeamNumber() const
+                { return this->teamNumber_; }
+
+        private:
+            unsigned int teamNumber_;
+    };
+}
+
+#endif /* _TeamSpawnPoint_H__ */


Property changes on: branches/miniprojects/src/orxonox/objects/worldentities/TeamSpawnPoint.h
___________________________________________________________________
Added: svn:eol-style
   + native




More information about the Orxonox-commit mailing list