Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 18, 2017, 12:40:00 PM (7 years ago)
Author:
patricwi
Message:

rolled back to functional without 2 branches

Location:
code/branches/Presentation_HS17
Files:
11 deleted
17 edited

Legend:

Unmodified
Added
Removed
  • code/branches/Presentation_HS17

  • code/branches/Presentation_HS17/src/orxonox/CMakeLists.txt

    r11686 r11690  
    5252ADD_SUBDIRECTORY(items)
    5353ADD_SUBDIRECTORY(overlays)
    54 ADD_SUBDIRECTORY(scriptablecontroller)
    5554ADD_SUBDIRECTORY(sound)
    5655ADD_SUBDIRECTORY(weaponsystem)
  • code/branches/Presentation_HS17/src/orxonox/Level.cc

    r11686 r11690  
    4242#include "overlays/OverlayGroup.h"
    4343#include "LevelManager.h"
    44 #include "scriptablecontroller/scriptable_controller.h"
    4544
    4645namespace orxonox
     
    5756        this->xmlfilename_ = this->getFilename();
    5857        this->xmlfile_ = nullptr;
    59         this->controller_.reset(new ScriptableController());
    6058    }
    6159
     
    8078        XMLPortParam(Level, "plugins",  setPluginsString,  getPluginsString,  xmlelement, mode);
    8179        XMLPortParam(Level, "gametype", setGametypeString, getGametypeString, xmlelement, mode).defaultValues("Gametype");
    82 
    83         XMLPortParamLoadOnly(Level, "script", setScript, xmlelement, mode);
    8480
    8581        XMLPortObject(Level, MeshLodInformation, "lodinformation", addLodInfo, getLodInfo, xmlelement, mode);
  • code/branches/Presentation_HS17/src/orxonox/Level.h

    r11686 r11690  
    4242namespace orxonox
    4343{
    44     class ScriptableController;
    45 
    4644    class _OrxonoxExport Level : public BaseObject, public Synchronisable, public Context
    4745    {
     
    5654
    5755            MeshLodInformation* getLodInfo(std::string meshName) const;
    58 
    59             inline ScriptableController *getScriptableController(void)
    60                 { return this->controller_.get(); }
    61 
    62             inline const std::string &getScript(void)
    63                 { return this->level_script_; }
    6456
    6557
     
    8678            void networkcallback_applyXMLFile();
    8779
    88             inline void setScript(const std::string &script)
    89                 { this->level_script_ = script; }
    90 
    91 
    9280            std::string                    pluginsString_;
    9381            std::list<PluginReference*>    plugins_;
     82
    9483            std::string                    gametype_;
    9584            std::string                    xmlfilename_;
     
    9786            std::list<BaseObject*>         objects_;
    9887            std::map<std::string,MeshLodInformation*>  lodInformation_;
    99 
    100             std::unique_ptr<ScriptableController> controller_;
    101             std::string           level_script_;
    10288    };
    10389}
  • code/branches/Presentation_HS17/src/orxonox/controllers/CMakeLists.txt

    r11685 r11690  
    1919  FightingController.cc
    2020  MasterController.cc
    21   AutonomousDroneController.cc
    22   ArrowController.cc
    2321)
  • code/branches/Presentation_HS17/src/orxonox/graphics/Model.cc

    r11685 r11690  
    7373
    7474        XMLPortParam(Model, "lodLevel", setLodLevel, getLodLevel, xmlelement, mode);
     75
    7576        XMLPortParam(Model, "mesh", setMeshSource, getMeshSource, xmlelement, mode);
    7677        XMLPortParam(Model, "renderQueueGroup", setRenderQueueGroup, getRenderQueueGroup, xmlelement, mode);
  • code/branches/Presentation_HS17/src/orxonox/infos/GametypeInfo.cc

    r11686 r11690  
    4343#include "interfaces/GametypeMessageListener.h"
    4444#include "interfaces/NotificationListener.h"
    45 #include "scriptablecontroller/scriptable_controller.h"
    46 #include "Level.h"
    4745
    4846#include "PlayerInfo.h"
     
    7876        this->spawned_ = false;
    7977        this->readyToSpawn_ = false;
    80         this->isFirstSpawn_ = true;
    8178
    8279        this->registerVariables();
     
    313310        {
    314311            if(this->hasStarted() && !this->hasEnded())
     312
    315313                this->setSpawnedHelper(player, true);
    316         }
    317 
    318         // TODO We might want to handle the subsequent spawns as well somehow
    319         if(player->isHumanPlayer() && player->isLocalPlayer() && this->isFirstSpawn_)
    320         {
    321             this->isFirstSpawn_ = false;
    322             this->getLevel()->getScriptableController()->setPlayer(player);
    323 
    324             // This handles paths relative to the 'level' directory
    325             std::string script = this->getLevel()->getScript();
    326             if(script.at(0) != '/')
    327                 script = "../levels/" + script; // Not very dynamic
    328             this->getLevel()->getScriptableController()->runScript(script);
    329314        }
    330315    }
  • code/branches/Presentation_HS17/src/orxonox/infos/GametypeInfo.h

    r11686 r11690  
    8383            inline bool isStartCountdownRunning() const
    8484                { return this->bStartCountdownRunning_; }
    85 
     85           
    8686            void changedStartCountdownRunning(void); // Is called when the start countdown has been either started or stopped.
    8787
     
    168168            bool spawned_; //!< Whether the local Player is currently spawned.
    169169            bool readyToSpawn_; //!< Whether the local Player is ready to spawn.
    170             bool isFirstSpawn_;
    171170    };
    172171}
  • code/branches/Presentation_HS17/src/orxonox/infos/HumanPlayer.cc

    r11686 r11690  
    3838#include "gametypes/Gametype.h"
    3939#include "overlays/OverlayGroup.h"
    40 #include "Level.h"
    41 #include "scriptablecontroller/scriptable_controller.h"
    4240
    4341namespace orxonox
  • code/branches/Presentation_HS17/src/orxonox/items/ShipPart.cc

    r11686 r11690  
    4242#include "items/PartDestructionEvent.h"
    4343#include "chat/ChatManager.h"
    44 #include "Level.h"
    45 #include "scriptablecontroller/scriptable_controller.h"
    4644
    4745
     
    217215            }
    218216        }
    219 
    220         // This is a bit hacky, but it takes away damage control from the pawn, so it has to handle
    221         // that as well.
    222         this->getLevel()->getScriptableController()->pawnHit(parent_, originator, parent_->getHealth(), parent_->getShieldHealth());
    223 
    224217        if (this->health_ < 0)
    225218            this->death();
  • code/branches/Presentation_HS17/src/orxonox/worldentities/CMakeLists.txt

    r11685 r11690  
    1313  ExplosionPart.cc
    1414  Actionpoint.cc
    15   AutonomousDrone.cc
    16   Arrow.cc
    1715  NameableStaticEntity.cc
    1816)
  • code/branches/Presentation_HS17/src/orxonox/worldentities/ControllableEntity.cc

    r11686 r11690  
    3939
    4040#include "Scene.h"
    41 #include "Level.h"
    4241#include "infos/PlayerInfo.h"
    4342#include "controllers/NewHumanController.h"
     
    6867        this->camera_ = nullptr;
    6968        this->xmlcontroller_ = nullptr;
     69        //this->controller_ = nullptr;
    7070        this->reverseCamera_ = nullptr;
    7171        this->bDestroyWhenPlayerLeft_ = false;
  • code/branches/Presentation_HS17/src/orxonox/worldentities/ControllableEntity.h

    r11686 r11690  
    175175            inline int getTeam() const
    176176                { return this->team_; }
    177 
    178177
    179178        protected:
  • code/branches/Presentation_HS17/src/orxonox/worldentities/MobileEntity.cc

    r11686 r11690  
    3636
    3737#include "Scene.h"
    38 #include "Level.h"
    39 #include "scriptablecontroller/scriptable_controller.h"
    4038
    4139namespace orxonox
     
    7472                this->setAngularVelocity(rotationAxis.normalisedCopy() * rotationRate.valueRadians());
    7573        }
    76 
    77         if(!this->id_.empty() && this->getLevel() != nullptr)
    78             this->getLevel()->getScriptableController()->registerMobileEntity(this->id_, this);
    7974    }
    8075
  • code/branches/Presentation_HS17/src/orxonox/worldentities/WorldEntity.cc

    r11686 r11690  
    4444#include "core/XMLPort.h"
    4545#include "Scene.h"
    46 #include "Level.h"
    4746#include "collisionshapes/WorldEntityCollisionShape.h"
    48 #include "scriptablecontroller/scriptable_controller.h"
    4947
    5048namespace orxonox
     
    8179        this->parentID_ = OBJECTID_UNKNOWN;
    8280        this->bDeleteWithParent_ = true;
    83         this->id_ = -1;
    8481
    8582        this->node_->setPosition(Vector3::ZERO);
     
    163160        XMLPortParamTemplate(WorldEntity, "scale3D",     setScale3D,     getScale3D,     xmlelement, mode, const Vector3&);
    164161        XMLPortParam        (WorldEntity, "scale",       setScale,       getScale,       xmlelement, mode);
    165         XMLPortParamLoadOnly(WorldEntity, "id",          setID,                xmlelement, mode);
    166162        XMLPortParamLoadOnly(WorldEntity, "lookat",      lookAt_xmlport,       xmlelement, mode);
    167163        XMLPortParamLoadOnly(WorldEntity, "direction",   setDirection_xmlport, xmlelement, mode);
     
    185181        // Attached collision shapes
    186182        XMLPortObject(WorldEntity, CollisionShape, "collisionShapes", attachCollisionShape, getAttachedCollisionShape, xmlelement, mode);
    187 
    188         if(!this->id_.empty() && this->getLevel() != nullptr)
    189             this->getLevel()->getScriptableController()->registerWorldEntity(this->id_, this);
    190183    }
    191184
  • code/branches/Presentation_HS17/src/orxonox/worldentities/WorldEntity.h

    r11686 r11690  
    110110            virtual void changedActivity(void) override;
    111111            virtual void changedVisibility(void) override;
    112 
    113             inline std::string getID(void)
    114                 { return this->id_; }
    115 
    116             inline void setID(std::string id)
    117                 { this->id_ = id; }
    118112
    119113            virtual void setPosition(const Vector3& position) = 0;
     
    448442
    449443            btRigidBody*  physicalBody_; //!< Bullet rigid body. Everything physical is applied to this instance.
    450             std::string   id_;           //!< Used by the ScriptableController to identify objects
    451444
    452445        private:
  • code/branches/Presentation_HS17/src/orxonox/worldentities/pawns/Pawn.cc

    r11686 r11690  
    5050#include "sound/WorldSound.h"
    5151#include "core/object/ObjectListIterator.h"
    52 #include "Level.h"
    53 #include "scriptablecontroller/scriptable_controller.h"
    5452
    5553#include "controllers/FormationController.h"
     
    162160
    163161        XMLPortParam ( RadarViewable, "radarname", setRadarName, getRadarName, xmlelement, mode );
    164 
    165         if(!this->id_.empty() && this->getLevel() != nullptr)
    166             this->getLevel()->getScriptableController()->registerPawn(this->id_, this);
    167162    }
    168163
     
    287282        {
    288283            // Health-damage cannot be absorbed by shields.
    289             // Shield-damage only reduces shield health.
     284            // Shield-damage only reduces shield health. 
    290285            // Normal damage can be (partially) absorbed by shields.
    291286
     
    307302                this->setHealth(this->health_ - (damage - shielddamage) - healthdamage);
    308303            }
    309             this->getLevel()->getScriptableController()->pawnHit(this, originator, this->health_, this->shieldHealth_);
    310304
    311305            this->lastHitOriginator_ = originator;
     
    408402            }
    409403        }
    410 
    411         this->getLevel()->getScriptableController()->pawnKilled(this);
    412404    }
    413405    void Pawn::goWithStyle()
     
    633625        {
    634626            // delete all debug models
    635             for(Model* model : debugWeaponSlotModels_)
     627            for(Model* model : debugWeaponSlotModels_) 
    636628            {
    637629                model->destroy();
Note: See TracChangeset for help on using the changeset viewer.