Mercurial > sumwars
changeset 20:2917d63a5f91
=serveraction entfernt
author | wuha |
---|---|
date | Sat, 04 Oct 2008 10:45:24 +0000 |
parents | 2c21cc2d5d5c |
children | e8ef7e6f62b5 |
files | src/core/action.h src/core/creature.h src/core/serveraction.h |
diffstat | 3 files changed, 28 insertions(+), 123 deletions(-) [+] |
line wrap: on
line diff
--- a/src/core/action.h Fri Oct 03 21:08:58 2008 +0000 +++ b/src/core/action.h Sat Oct 04 10:45:24 2008 +0000 @@ -425,6 +425,30 @@ * \brief Nummer der Animation (falls mehrere fuer dieselbe Situation vorhanden sind) */ char m_animation_number; + + /** + * \var m_type; + * \brief Typ der vorhergehenden Aktion + */ + ActionType m_prev_type; + + /** + * \var m_goal_coordinate_x; + * \brief x-Koordinate des Zieles + */ + float m_goal_coordinate_x; + + /** + * \var m_goal_coordinate_y; + * \brief y-Koordinate des Zieles + */ + float m_goal_coordinate_y; + + /** + * \var m_goal_object_id; + * \brief ID des Zielobjekts + */ + int m_goal_object_id; /** * \var static const ActionInfo m_base_info[192]
--- a/src/core/creature.h Fri Oct 03 21:08:58 2008 +0000 +++ b/src/core/creature.h Sat Oct 04 10:45:24 2008 +0000 @@ -34,7 +34,7 @@ #include <algorithm> #include "world.h" #include "serverwobject.h" -#include "serveraction.h" +#include "action.h" #include "command.h" #include "damage.h" #include "itemlist.h" @@ -86,11 +86,11 @@ /** - * \fn ServerAction* getAction() + * \fn Action* getAction() * \brief Gibt einen Zeiger auf die aktuelle Aktion zurück * \return Action*, Zeiger auf die aktuelle Aktion */ - ServerAction* getAction() + Action* getAction() { return &m_action; } @@ -457,7 +457,7 @@ * \var m_action; * \brief Aktion die gerade ausgeführt wird */ - ServerAction m_action; + Action m_action; /** * \var m_command;
--- a/src/core/serveraction.h Fri Oct 03 21:08:58 2008 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,119 +0,0 @@ -/* - Ein kleines Rollenspiel - Copyright (C) 2007 Hans Wulf - - 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. -*/ - -/** - * \file action.h - * \defgroup action \ Aktionen - * \ingroup command - * \brief Stellt einzelne Aktionen zur Realisierung eines Kommandos zur Verfügung - * \author Hans Wulf - * \version 1.0 - * \date 2007/05/28 - * \note Beinhaltet die Klasse Action - */ -#ifndef SERVERACTION_H -#define SERVERACTION_H - -#include <string> -#include "action.h" - -/** - * \class Action - * \brief Beschreibt eine Aktion, welche eine Figur ausführen kann. Eine Aktion ist dabei die kleinste Einheit einer Handlung. - */ - -/** - * \struct ServerAction - * \brief Genauere Beschreibung einer Aktion auf Serverseite - */ -struct ServerAction : public Action -{ -//Public stuff - -public: - - - - - - //Fields - //Constructors - /** - * \fn Action(ActionType type, float goal_coordinate_x, float goal_coordinate_y, int goal_object_id, float time) - * \brief Legt ein neues Action Objekt an - * \param type initialisiert den Typ der Aktion - * \param goal_coordinate_x initialisiert die x-Koordinate des Zielpunkts - * \param goal_coordinate_y initialisiert die y-Koordinate des Zielpunkts - * \param goal_object_id initialisiert ID des Zielobjekts - * \param time initialisiert Gesamtdauer der Aktion - */ - ServerAction(ActionType type, float goal_coordinate_x, float goal_coordinate_y, int goal_object_id, float time) : Action(type) - { - m_goal_coordinate_x= goal_coordinate_x; - m_goal_coordinate_y = goal_coordinate_y; - m_goal_object_id= goal_object_id; - m_time = time; - m_elapsed_time =0; - - } - - /** - * \fn ServerAction() : Action() - * \brief Legt eine leere Aktion an - */ - ServerAction() : Action() - { - - } - - //Fields - /** - * \var m_type; - * \brief Typ der vorhergehenden Aktion - */ - ActionType m_prev_type; - - /** - * \var m_goal_coordinate_x; - * \brief x-Koordinate des Zieles - */ - float m_goal_coordinate_x; - - /** - * \var m_goal_coordinate_y; - * \brief y-Koordinate des Zieles - */ - float m_goal_coordinate_y; - - /** - * \var m_goal_object_id; - * \brief ID des Zielobjekts - */ - int m_goal_object_id; - - - - - - -}; - - - -#endif //SERVERACTION_H