Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Feb 24, 2015, 10:54:24 PM (9 years ago)
Author:
landauf
Message:

added command 'reloadLevel' (by default on F5) which reloads the level while the player's camera remains at the same position

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/orxonox/gametypes/Gametype.h

    r9980 r10281  
    4141#include "infos/GametypeInfo.h"
    4242#include "tools/Timer.h"
     43#include "gamestates/GSLevelMemento.h"
    4344
    4445namespace orxonox
     
    6364    };
    6465
    65     class _OrxonoxExport Gametype : public BaseObject, public Tickable
     66    class _OrxonoxExport Gametype : public BaseObject, public Tickable, public GSLevelMemento
    6667    {
    6768        friend class PlayerInfo;
     
    172173            virtual void spawnDeadPlayersIfRequested();
    173174
     175            virtual GSLevelMementoState* exportMementoState();
     176            virtual void importMementoState(const std::vector<GSLevelMementoState*>& states);
     177
    174178            SmartPtr<GametypeInfo> gtinfo_;
    175179
     
    201205            Timer showMenuTimer_;
    202206    };
     207
     208    /**
     209        @brief Keeps position and orientation of the camera, as well as the name of current scene.
     210    */
     211    struct _OrxonoxExport GametypeMementoState : public GSLevelMementoState
     212    {
     213        Vector3 cameraPosition_;
     214        Quaternion cameraOrientation_;
     215        std::string sceneName_;
     216    };
    203217}
    204218
Note: See TracChangeset for help on using the changeset viewer.