Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7797


Ignore:
Timestamp:
Dec 22, 2010, 11:08:53 AM (13 years ago)
Author:
scheusso
Message:

trying to make forcefield synchronisable

Location:
code/branches/presentation2/src/modules/objects
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation2/src/modules/objects/ForceField.cc

    r7677 r7797  
    6060        this->setLength(2000);
    6161        this->mode_ = forceFieldMode::tube;
     62       
     63        this->registerVariables();
    6264    }
    6365
     
    8385        XMLPortParam(ForceField, "mode", setMode, getMode, xmlelement, mode);
    8486    }
     87   
     88    void ForceField::registerVariables()
     89    {
     90        registerVariable(this->velocity_, VariableDirection::ToClient);
     91        registerVariable(this->radius_, VariableDirection::ToClient);
     92        registerVariable(this->halfLength_, VariableDirection::ToClient);
     93        registerVariable(this->mode_, VariableDirection::ToClient);
     94    }
     95
    8596
    8697    /**
  • code/branches/presentation2/src/modules/objects/ForceField.h

    r7678 r7797  
    8888
    8989            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Creates a ForceField object through XML.
     90            void registerVariables(); //!< Registers the variables that should get synchronised over the network
    9091            virtual void tick(float dt); //!< A method that is called every tick.
     92           
    9193
    9294            /**
Note: See TracChangeset for help on using the changeset viewer.