[Orxonox-commit 2280] r6996 - in code/branches/presentation3: data/gui/scripts src/libraries/core src/modules/pickup src/orxonox/gametypes src/orxonox/interfaces

dafrick at orxonox.net dafrick at orxonox.net
Thu May 27 22:44:11 CEST 2010


Author: dafrick
Date: 2010-05-27 22:44:10 +0200 (Thu, 27 May 2010)
New Revision: 6996

Modified:
   code/branches/presentation3/data/gui/scripts/KeyBindMenu.lua
   code/branches/presentation3/data/gui/scripts/PickupInventory.lua
   code/branches/presentation3/src/libraries/core/GUIManager.h
   code/branches/presentation3/src/modules/pickup/PickupManager.cc
   code/branches/presentation3/src/modules/pickup/PickupManager.h
   code/branches/presentation3/src/orxonox/gametypes/Gametype.cc
   code/branches/presentation3/src/orxonox/interfaces/Pickupable.cc
   code/branches/presentation3/src/orxonox/interfaces/Pickupable.h
   code/branches/presentation3/src/orxonox/interfaces/Rewardable.h
Log:
Loads of changes.
1) PickupInventory should now be working even for extreme cases.
2) Added support for inactive Spawnpoints in Gametype.
3) Made Pickupable rewardble. meaning from now on any Pickupable can be given as a reward for completing Quests.
4) Added some keybinds to KeybindMenu, such as PickupInventory, QuestGUI and Chat.


Modified: code/branches/presentation3/data/gui/scripts/KeyBindMenu.lua
===================================================================
--- code/branches/presentation3/data/gui/scripts/KeyBindMenu.lua	2010-05-27 20:38:08 UTC (rev 6995)
+++ code/branches/presentation3/data/gui/scripts/KeyBindMenu.lua	2010-05-27 20:44:10 UTC (rev 6996)
@@ -27,6 +27,10 @@
     table.insert(commandList, "openConsole")
     table.insert(commandList, "OverlayGroup toggleVisibility Debug")
     table.insert(commandList, "OverlayGroup toggleVisibility Stats")
+    table.insert(commandList, "OrxonoxOverlay toggleVisibility QuestGUI")
+    table.insert(commandList, "OrxonoxOverlay toggleVisibility PickupInventory")
+    table.insert(commandList, "startchat")
+    table.insert(commandList, "startchat_small")
     table.insert(commandList, "mouseLook")
     table.insert(commandList, "pause")
 
@@ -52,6 +56,10 @@
     table.insert(nameList, "Open Console")
     table.insert(nameList, "Show Debug")
     table.insert(nameList, "Show Stats")
+    table.insert(nameList, "Show Quests")
+    table.insert(nameList, "Show Pickups")
+    table.insert(nameList, "Show Chat")
+    table.insert(nameList, "Show small Chat")
     table.insert(nameList, "Look Around")
     table.insert(nameList, "Pause")
 

Modified: code/branches/presentation3/data/gui/scripts/PickupInventory.lua
===================================================================
--- code/branches/presentation3/data/gui/scripts/PickupInventory.lua	2010-05-27 20:38:08 UTC (rev 6995)
+++ code/branches/presentation3/data/gui/scripts/PickupInventory.lua	2010-05-27 20:44:10 UTC (rev 6996)
@@ -2,9 +2,9 @@
 
 local P = createMenuSheet("PickupInventory")
 
-P.carrierList = {}
 P.wrapper = nil
 P.detailsWindows = {}
+P.detailPickups = {}
 P.pickupsList = {}
 
 P.showing = false
@@ -16,7 +16,10 @@
 P.buttonWidth = 85
 
 function P.onLoad()
-    carrierList = {}
+    P.wrapper = nil
+    P.detailsWindows = {}
+    P.detailPickups = {}
+    P.pickupsList = {}
 end
 
 function P.onShow()
@@ -26,17 +29,50 @@
 
 function P.onHide()
     P.showing = false
-    P.cleanup()
+    P.cleanup(true)
 end
 
 function P.update()
     if P.showing == false then
         return
     end
+
+    -- Update opened detail windows.
+    for k,v in pairs(P.detailsWindows) do
+        if v ~= nil then
+            local pickup = P.detailPickups[k]
+            if pickup ~= nil and pickup ~= 0 then
+                local useButton = winMgr:getWindow("orxonox/PickupInventory/Details" .. k .. "/UseButton")
+                local dropButton = winMgr:getWindow("orxonox/PickupInventory/Details" .. k .. "/DropButton")
+                if orxonox.PickupManager:getInstance():isValidPickup(pickup) == false then
+                    useButton:setEnabled(false)
+                    dropButton:setEnabled(false)
+                    P.detailPickups[k] = nil
+                else
+                    useButton:setEnabled(true)
+                    if pickup:isUsed() == true then
+                        useButton:setText("unuse")
+                        orxonox.GUIManager:subscribeEventHelper(useButton, "Clicked", P.name .. ".InventoryUseDetailButton_clicked")
+                    else
+                        useButton:setText("use")
+                        orxonox.GUIManager:subscribeEventHelper(useButton, "Clicked", P.name .. ".InventoryUnuseDetailButton_clicked")
+                    end
+
+                    if pickup:isPickedUp() == false then
+                        useButton:setEnabled(false)
+                        dropButton:setEnabled(false)
+                        P.detailPickups[k] = nil
+                    end
+                end
+            end
+        end
+    end
+
+    -- Update main inventory.
+    P.cleanup(false)
+    P.createInventory()
+    -- TODO: Recover scrolling position
     
-    P.cleanup()
-    
-    P.createInventory()
 end
 
 function P.createInventory()
@@ -82,13 +118,13 @@
 
     local title = winMgr:createWindow("MenuWidgets/StaticText", name .. "/Title")
     title:setPosition(CEGUI.UVector2(CEGUI.UDim(0, P.imageHeight+5), CEGUI.UDim(0, (P.imageHeight-P.textHeight)/2)))
-    title:setSize(CEGUI.UVector2(CEGUI.UDim(0.4, 0), CEGUI.UDim(0, P.textHeight)))
+    title:setSize(CEGUI.UVector2(CEGUI.UDim(0.3, 0), CEGUI.UDim(0, P.textHeight)))
     title:setText(representation:getPickupName())
     title:setProperty("FrameEnabled", "set:False")
     item:addChildWindow(title)
 
     local useButton = winMgr:createWindow("MenuWidgets/Button", name .. "/UseButton")
-    useButton:setPosition(CEGUI.UVector2(CEGUI.UDim(0.4, P.imageHeight+10),CEGUI.UDim(0, (P.imageHeight-P.textHeight)/2)))
+    useButton:setPosition(CEGUI.UVector2(CEGUI.UDim(0.3, P.imageHeight+10),CEGUI.UDim(0, (P.imageHeight-P.textHeight)/2)))
     useButton:setSize(CEGUI.UVector2(CEGUI.UDim(0, P.buttonWidth), CEGUI.UDim(0, P.textHeight)))
     if pickup:isUsed() == false then
         useButton:setText("use")
@@ -100,14 +136,14 @@
     item:addChildWindow(useButton)
 
     local dropButton = winMgr:createWindow("MenuWidgets/Button", name .. "/DropButton")
-    dropButton:setPosition(CEGUI.UVector2(CEGUI.UDim(0.4, P.imageHeight+15+P.buttonWidth),CEGUI.UDim(0, (P.imageHeight-P.textHeight)/2)))
+    dropButton:setPosition(CEGUI.UVector2(CEGUI.UDim(0.3, P.imageHeight+15+P.buttonWidth),CEGUI.UDim(0, (P.imageHeight-P.textHeight)/2)))
     dropButton:setSize(CEGUI.UVector2(CEGUI.UDim(0, P.buttonWidth), CEGUI.UDim(0, P.textHeight)))
     dropButton:setText("drop")
     orxonox.GUIManager:subscribeEventHelper(dropButton, "Clicked", P.name .. ".InventoryDropButton_clicked")
     item:addChildWindow(dropButton)
 
     local detailsButton = winMgr:createWindow("MenuWidgets/Button", name .. "/DetailsButton")
-    detailsButton:setPosition(CEGUI.UVector2(CEGUI.UDim(0.4, P.imageHeight+20+2*P.buttonWidth),CEGUI.UDim(0, (P.imageHeight-P.textHeight)/2)))
+    detailsButton:setPosition(CEGUI.UVector2(CEGUI.UDim(0.3, P.imageHeight+20+2*P.buttonWidth),CEGUI.UDim(0, (P.imageHeight-P.textHeight)/2)))
     detailsButton:setSize(CEGUI.UVector2(CEGUI.UDim(0, P.buttonWidth), CEGUI.UDim(0, P.textHeight)))
     detailsButton:setText("details")
     orxonox.GUIManager:subscribeEventHelper(detailsButton, "Clicked", P.name .. ".InventoryDetailsButton_clicked")
@@ -116,12 +152,15 @@
     return item
 end
 
-function P.cleanup()
+function P.cleanup(destroyDetails)
     if P.wrapper ~= nil then
         winMgr:destroyWindow(P.wrapper)
     end
     
     --Destroy details windows.
+    if destroyDetails == false then
+        return
+    end
     for k,v in pairs(P.detailsWindows) do
         if v ~= nil then
             winMgr:destroyWindow(v)
@@ -142,13 +181,10 @@
 function P.createDetailsWindow(pickupIndex)
     local pickup = P.pickupsList[pickupIndex]
     local representation = orxonox.PickupManager:getInstance():getPickupRepresentation(pickup)
+
+    local index = P.getNewDetailNumber()
+    local name = "orxonox/PickupInventory/Details" .. index
     
-    local headerOffset = 35
-    --Design parameters
-    local imageSize = 100
-    
-    local name = "orxonox/PickupInventory/Pickup" .. pickupIndex .. "/Details" .. P.getNewDetailNumber()
-    
     local window = winMgr:createWindow("MenuWidgets/FrameWindow", name)
     window:setSize(CEGUI.UVector2(CEGUI.UDim(0.5,0),CEGUI.UDim(0.4,0)))
     orxonox.GUIManager:subscribeEventHelper(window, "CloseClicked", P.name .. ".closeDetailWindow")
@@ -191,10 +227,10 @@
     useButton:setSize(CEGUI.UVector2(CEGUI.UDim(0, P.buttonWidth), CEGUI.UDim(0, P.textHeight)))
     if pickup:isUsed() == false then
         useButton:setText("use")
-        orxonox.GUIManager:subscribeEventHelper(useButton, "Clicked", P.name .. ".InventoryUseButton_clicked")
+        orxonox.GUIManager:subscribeEventHelper(useButton, "Clicked", P.name .. ".InventoryUseDetailButton_clicked")
     else
         useButton:setText("unuse")
-        orxonox.GUIManager:subscribeEventHelper(useButton, "Clicked", P.name .. ".InventoryUnuseButton_clicked")
+        orxonox.GUIManager:subscribeEventHelper(useButton, "Clicked", P.name .. ".InventoryUnuseDetailButton_clicked")
     end
     wrapper:addChildWindow(useButton)
     
@@ -202,13 +238,15 @@
     dropButton:setPosition(CEGUI.UVector2(CEGUI.UDim(0, P.detailImageSize+10+P.buttonWidth+10),CEGUI.UDim(1, -40)))
     dropButton:setSize(CEGUI.UVector2(CEGUI.UDim(0, P.buttonWidth), CEGUI.UDim(0, P.textHeight)))
     dropButton:setText("drop")
-    orxonox.GUIManager:subscribeEventHelper(dropButton, "Clicked", P.name .. ".InventoryDropButton_clicked")
+    orxonox.GUIManager:subscribeEventHelper(dropButton, "Clicked", P.name .. ".InventoryDropDetailButton_clicked")
     wrapper:addChildWindow(dropButton)
+
+    P.detailsWindows[index] = window
+    P.detailPickups[index] = pickup
     
-    table.insert(P.detailsWindows, window)
-    
 end
 
+-- TODO: Smarter
 function P.getNewDetailNumber()
     local number = table.getn(P.detailsWindows)
     for k,v in pairs(P.detailsWindows) do
@@ -216,7 +254,7 @@
             number = k-1
         end
     end
-    return number
+    return number+1
 end
 
 function P.InventoryUseButton_clicked(e)
@@ -239,17 +277,32 @@
     P.createDetailsWindow(pickupIndex)
 end
 
+function P.InventoryUseDetailButton_clicked(e)
+    local pickupIndex = P.windowToPickupHelper(e)
+    orxonox.PickupManager:getInstance():usePickup(P.detailPickups[pickupIndex], true)
+end
+
+function P.InventoryUnuseDetailButton_clicked(e)
+    local pickupIndex = P.windowToPickupHelper(e)
+    orxonox.PickupManager:getInstance():usePickup(P.detailPickups[pickupIndex], false)
+end
+
+function P.InventoryDropDetailButton_clicked(e)
+    local pickupIndex = P.windowToPickupHelper(e)
+    orxonox.PickupManager:getInstance():dropPickup(P.detailPickups[pickupIndex])
+end
+
 function P.closeDetailWindow(e)
     --Get some numbers from the window
     local we = CEGUI.toWindowEventArgs(e)
     local name = we.window:getName()
     local match = string.gmatch(name, "%d+")
-    local pickupNr = tonumber(match())
     local detailNr = tonumber(match())
     
-    local window = P.detailsWindows[detailNr+1]
+    local window = P.detailsWindows[detailNr]
     winMgr:destroyWindow(window)
-    P.detailsWindows[detailNr+1] = nil
+    P.detailsWindows[detailNr] = nil
+    P.detailPickups[detailNr] = nil
 end
 
 function P.InventoryBackButton_clicked(e)

Modified: code/branches/presentation3/src/libraries/core/GUIManager.h
===================================================================
--- code/branches/presentation3/src/libraries/core/GUIManager.h	2010-05-27 20:38:08 UTC (rev 6995)
+++ code/branches/presentation3/src/libraries/core/GUIManager.h	2010-05-27 20:44:10 UTC (rev 6996)
@@ -83,6 +83,8 @@
 
         //! Creates a new InputState to be used with a GUI Sheet
         const std::string& createInputState(const std::string& name, TriBool::Value showCursor = TriBool::True, TriBool::Value useKeyboard = TriBool::True, bool bBlockJoyStick = false); // tolua_export
+        LuaState* getLuaState(void)
+            { return this->luaState_.get(); }
 
         //! Returns the root window for all menu sheets
         CEGUI::Window* getMenuRootWindow() { return this->menuRootWindow_; } // tolua_export
@@ -101,11 +103,11 @@
         static void subscribeEventHelper(CEGUI::Window* window, const std::string& event, const std::string& function); //tolua_export
 
         static GUIManager& getInstance() { return Singleton<GUIManager>::getInstance(); } // tolua_export
-
+        
     private:
         GUIManager(const GUIManager& instance); //!< private and undefined copy c'tor (this is a singleton class)
-
         void executeCode(const std::string& str);
+        
         template <typename FunctionType>
         bool protectedCall(FunctionType function);
 

Modified: code/branches/presentation3/src/modules/pickup/PickupManager.cc
===================================================================
--- code/branches/presentation3/src/modules/pickup/PickupManager.cc	2010-05-27 20:38:08 UTC (rev 6995)
+++ code/branches/presentation3/src/modules/pickup/PickupManager.cc	2010-05-27 20:44:10 UTC (rev 6996)
@@ -38,6 +38,7 @@
 #include "core/GUIManager.h"
 #include "core/ScopedSingletonManager.h"
 #include "core/Identifier.h"
+#include "util/Convert.h"
 #include "interfaces/PickupCarrier.h"
 #include "infos/PlayerInfo.h"
 #include "worldentities/pawns/Pawn.h"
@@ -63,7 +64,6 @@
         RegisterRootObject(PickupManager);
         
         this->defaultRepresentation_ = new PickupRepresentation();
-        this->pickupsIndex_ = 0;
         
         COUT(3) << "PickupManager created." << std::endl;
     }
@@ -153,7 +153,6 @@
     int PickupManager::getNumPickups(void)
     {
         this->pickupsList_.clear();
-        this->pickupsIndex_ = 0;
         
         PlayerInfo* player = GUIManager::getInstance().getPlayer(PickupManager::guiName_s);
         PickupCarrier* carrier = NULL;
@@ -168,7 +167,7 @@
             std::set<Pickupable*> pickups = (*it)->getPickups();
             for(std::set<Pickupable*>::iterator pickup = pickups.begin(); pickup != pickups.end(); pickup++)
             {
-                this->pickupsList_.insert(*pickup);
+                this->pickupsList_.insert(std::pair<Pickupable*, WeakPtr<Pickupable> >(*pickup, WeakPtr<Pickupable>(*pickup)));
             }
         }
         delete carriers;
@@ -198,16 +197,26 @@
 
     void PickupManager::dropPickup(orxonox::Pickupable* pickup)
     {
+        std::map<Pickupable*, WeakPtr<Pickupable> >::iterator it = this->pickupsList_.find(pickup);
+        if(pickup == NULL || it == this->pickupsList_.end() || it->second.get() == NULL)
+            return;
+
         if(!pickup->isPickedUp())
             return;
-        
+
         PickupCarrier* carrier = pickup->getCarrier();
         if(pickup != NULL && carrier != NULL)
+        {
             carrier->drop(pickup);
+        }
     }
 
     void PickupManager::usePickup(orxonox::Pickupable* pickup, bool use)
     {
+        std::map<Pickupable*, WeakPtr<Pickupable> >::iterator it = this->pickupsList_.find(pickup);
+        if(pickup == NULL || it == this->pickupsList_.end() || it->second.get() == NULL)
+            return;
+        
         if(!pickup->isPickedUp())
             return;
 

Modified: code/branches/presentation3/src/modules/pickup/PickupManager.h
===================================================================
--- code/branches/presentation3/src/modules/pickup/PickupManager.h	2010-05-27 20:38:08 UTC (rev 6995)
+++ code/branches/presentation3/src/modules/pickup/PickupManager.h	2010-05-27 20:44:10 UTC (rev 6996)
@@ -38,6 +38,7 @@
 
 #include <map>
 #include "util/Singleton.h"
+#include "core/WeakPtr.h"
 #include "pickup/PickupIdentifier.h"
 #include "PickupRepresentation.h"
 
@@ -71,12 +72,12 @@
             
             // tolua_begin
             int getNumPickups(void);
-            orxonox::Pickupable* popPickup(void) { this->pickupsIndex_++; return *(this->pickupsIterator_++); }
-            int getPickupIndex(void) { return this->pickupsIndex_-1; }
+            orxonox::Pickupable* popPickup(void) { return (this->pickupsIterator_++)->first; }
             orxonox::PickupRepresentation* getPickupRepresentation(orxonox::Pickupable* pickup) { if(pickup != NULL) return this->getRepresentation(pickup->getPickupIdentifier()); return NULL; }
 
             void dropPickup(orxonox::Pickupable* pickup);
             void usePickup(orxonox::Pickupable* pickup, bool use);
+            bool isValidPickup(orxonox::Pickupable* pickup) { std::map<Pickupable*, WeakPtr<Pickupable> >::iterator it = this->pickupsList_.find(pickup); if(it == this->pickupsList_.end()) return false; return it->second.get() != NULL; }
             // tolua_end
             
         private:
@@ -86,9 +87,8 @@
             PickupRepresentation* defaultRepresentation_; //!< The default PickupRepresentation.
             std::map<const PickupIdentifier*, PickupRepresentation*, PickupIdentifierCompare> representations_; //!< Map linking PickupIdentifiers (representing types if Pickupables) and PickupRepresentations.
 
-            std::set<Pickupable*> pickupsList_;
-            std::set<Pickupable*>::iterator pickupsIterator_;
-            int pickupsIndex_;
+            std::map<Pickupable*, WeakPtr<Pickupable> > pickupsList_;
+            std::map<Pickupable*, WeakPtr<Pickupable> >::iterator pickupsIterator_;
 
             std::vector<PickupCarrier*>* getAllCarriers(PickupCarrier* carrier);
         

Modified: code/branches/presentation3/src/orxonox/gametypes/Gametype.cc
===================================================================
--- code/branches/presentation3/src/orxonox/gametypes/Gametype.cc	2010-05-27 20:38:08 UTC (rev 6995)
+++ code/branches/presentation3/src/orxonox/gametypes/Gametype.cc	2010-05-27 20:44:10 UTC (rev 6996)
@@ -308,15 +308,32 @@
     {
         if (this->spawnpoints_.size() > 0)
         {
+            SpawnPoint* fallbackSpawnPoint = NULL;
             unsigned int randomspawn = static_cast<unsigned int>(rnd(static_cast<float>(this->spawnpoints_.size())));
             unsigned int index = 0;
+            std::set<SpawnPoint*> activeSpawnPoints = this->spawnpoints_;
             for (std::set<SpawnPoint*>::const_iterator it = this->spawnpoints_.begin(); it != this->spawnpoints_.end(); ++it)
             {
                 if (index == randomspawn)
-                    return (*it);
+                    fallbackSpawnPoint = (*it);
 
+                if (!(*it)->isActive())
+                    activeSpawnPoints.erase(*it);
+
                 ++index;
             }
+
+            randomspawn = static_cast<unsigned int>(rnd(static_cast<float>(this->spawnpoints_.size())));
+            index = 0;
+            for (std::set<SpawnPoint*>::const_iterator it = activeSpawnPoints.begin(); it != activeSpawnPoints.end(); ++it)
+            {
+                if (index == randomspawn)
+                    return (*it);
+                
+                ++index;
+            }
+
+            return fallbackSpawnPoint;
         }
         return 0;
     }

Modified: code/branches/presentation3/src/orxonox/interfaces/Pickupable.cc
===================================================================
--- code/branches/presentation3/src/orxonox/interfaces/Pickupable.cc	2010-05-27 20:38:08 UTC (rev 6995)
+++ code/branches/presentation3/src/orxonox/interfaces/Pickupable.cc	2010-05-27 20:44:10 UTC (rev 6996)
@@ -33,9 +33,14 @@
 
 #include "Pickupable.h"
 
+#include "core/LuaState.h"
+#include "core/GUIManager.h"
 #include "core/Identifier.h"
 #include "core/CoreIncludes.h"
+#include "util/Convert.h"
+#include "infos/PlayerInfo.h"
 #include "pickup/PickupIdentifier.h"
+#include "worldentities/pawns/Pawn.h"
 #include "PickupCarrier.h"
 
 namespace orxonox
@@ -90,6 +95,8 @@
         
         this->used_ = used;
         this->changedUsed();
+
+        GUIManager::getInstance().getLuaState()->doString("PickupInventory.update()");
         return true;
     }
     
@@ -195,6 +202,7 @@
         
         this->pickedUp_ = pickedUp;
         this->changedPickedUp();
+        GUIManager::getInstance().getLuaState()->doString("PickupInventory.update()");
         return true;
     }
         
@@ -272,5 +280,21 @@
     {
         SUPER(Pickupable, clone, item);
     }
+
+    /**
+    @brief
+        Method to transcribe a Pickupable as a Rewardable to the player.
+    @param player
+        A pointer to the PlayerInfo, do whatever you want with it.
+    @return
+        Return true if successful.
+    */
+    bool Pickupable::reward(PlayerInfo* player)
+    {
+        ControllableEntity* entity = player->getControllableEntity();
+        Pawn* pawn = static_cast<Pawn*>(entity);
+        PickupCarrier* carrier = static_cast<PickupCarrier*>(pawn);
+        return carrier->pickup(this);
+    }
     
 }

Modified: code/branches/presentation3/src/orxonox/interfaces/Pickupable.h
===================================================================
--- code/branches/presentation3/src/orxonox/interfaces/Pickupable.h	2010-05-27 20:38:08 UTC (rev 6995)
+++ code/branches/presentation3/src/orxonox/interfaces/Pickupable.h	2010-05-27 20:44:10 UTC (rev 6996)
@@ -40,6 +40,7 @@
 #include "core/Super.h"
 
 #include "core/OrxonoxClass.h"
+#include "Rewardable.h"
 
 namespace orxonox // tolua_export
 { // tolua_export
@@ -51,7 +52,7 @@
         Damian 'Mozork' Frick
     */
     class _OrxonoxExport Pickupable  // tolua_export
-        : virtual public OrxonoxClass
+        : virtual public OrxonoxClass, public Rewardable
     {  // tolua_export
         protected:
             Pickupable(); //!< Default constructor.
@@ -140,6 +141,10 @@
             PickupCarrier* carrier_; //!< The carrier of the pickup.
             std::list<Identifier*> targets_; //!< The possible targets of this pickup.
 
+        // For implementing the Rewardable interface:
+        public:
+            virtual bool reward(PlayerInfo* player); //!< Method to transcribe a Pickupable as a Rewardable to the player.
+
     };  // tolua_export
     
     SUPER_FUNCTION(10, Pickupable, changedUsed, false);

Modified: code/branches/presentation3/src/orxonox/interfaces/Rewardable.h
===================================================================
--- code/branches/presentation3/src/orxonox/interfaces/Rewardable.h	2010-05-27 20:38:08 UTC (rev 6995)
+++ code/branches/presentation3/src/orxonox/interfaces/Rewardable.h	2010-05-27 20:44:10 UTC (rev 6996)
@@ -47,7 +47,7 @@
     @author
         Damian 'Mozork' Frick
     */
-    class _OrxonoxExport Rewardable : public OrxonoxClass
+    class _OrxonoxExport Rewardable : virtual public OrxonoxClass
     {
         public:
             Rewardable();
@@ -58,7 +58,7 @@
                 Method to transcribe a rewardable object to the player.
                 Must be implemented by every class inheriting from Rewardable.
             @param player
-                A pointer to the ControllableEntity, do whatever you want with it.
+                A pointer to the PlayerInfo, do whatever you want with it.
             @return
                 Return true if successful.
             */




More information about the Orxonox-commit mailing list