Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 5, 2008, 1:19:22 AM (17 years ago)
Author:
scheusso
Message:

a lot of changes in order to make it possible to have mulpiple clients with each one a new ship
camera changes
object changes
synchronisable: backsyncronisation should be possible now
gamestatemanager/gamestateclient: functions for backsyncronisation
some changes in order to get the input system (the old one) on the client working
TODO something with the camera position is wrong at the moment (clientside)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/network3/src/orxonox/objects/WorldEntity.cc

    r1191 r1232  
    190190        XMLPortObject(WorldEntity, WorldEntity, "attached", attachWorldEntity, getAttachedWorldEntity, xmlelement, mode, false, true);
    191191       
    192         //create();
     192        WorldEntity::create();
    193193    }
    194194
     
    197197    {
    198198      // register coordinates
    199       registerVar( (void*) &(this->getPosition().x), sizeof(this->getPosition().x), network::DATA);
    200       registerVar( (void*) &(this->getPosition().y), sizeof(this->getPosition().y), network::DATA);
    201       registerVar( (void*) &(this->getPosition().z), sizeof(this->getPosition().z), network::DATA);
     199      registerVar( (void*) &(this->getPosition().x), sizeof(this->getPosition().x), network::DATA, 0x3);
     200      registerVar( (void*) &(this->getPosition().y), sizeof(this->getPosition().y), network::DATA, 0x3);
     201      registerVar( (void*) &(this->getPosition().z), sizeof(this->getPosition().z), network::DATA, 0x3);
    202202      // register orientation
    203       registerVar( (void*) &(this->getOrientation().w), sizeof(this->getOrientation().w), network::DATA);
    204       registerVar( (void*) &(this->getOrientation().x), sizeof(this->getOrientation().x), network::DATA);
    205       registerVar( (void*) &(this->getOrientation().y), sizeof(this->getOrientation().y), network::DATA);
    206       registerVar( (void*) &(this->getOrientation().z), sizeof(this->getOrientation().z), network::DATA);
     203      registerVar( (void*) &(this->getOrientation().w), sizeof(this->getOrientation().w), network::DATA, 0x3);
     204      registerVar( (void*) &(this->getOrientation().x), sizeof(this->getOrientation().x), network::DATA, 0x3);
     205      registerVar( (void*) &(this->getOrientation().y), sizeof(this->getOrientation().y), network::DATA, 0x3);
     206      registerVar( (void*) &(this->getOrientation().z), sizeof(this->getOrientation().z), network::DATA, 0x3);
    207207      // register velocity_
    208       registerVar( (void*) &(this->getVelocity().x), sizeof(this->getVelocity().x), network::DATA);
    209       registerVar( (void*) &(this->getVelocity().y), sizeof(this->getVelocity().y), network::DATA);
    210       registerVar( (void*) &(this->getVelocity().z), sizeof(this->getVelocity().z), network::DATA);
     208      registerVar( (void*) &(this->getVelocity().x), sizeof(this->getVelocity().x), network::DATA, 0x3);
     209      registerVar( (void*) &(this->getVelocity().y), sizeof(this->getVelocity().y), network::DATA, 0x3);
     210      registerVar( (void*) &(this->getVelocity().z), sizeof(this->getVelocity().z), network::DATA, 0x3);
    211211      // register rotationAxis/rate
    212       registerVar( (void*) &(this->getRotationRate()), sizeof(this->getRotationRate()), network::DATA);
    213       registerVar( (void*) &(this->getRotationAxis().x), sizeof(this->getRotationAxis().x), network::DATA);
    214       registerVar( (void*) &(this->getRotationAxis().y), sizeof(this->getRotationAxis().y), network::DATA);
    215       registerVar( (void*) &(this->getRotationAxis().z), sizeof(this->getRotationAxis().z), network::DATA);
     212      registerVar( (void*) &(this->getRotationRate()), sizeof(this->getRotationRate()), network::DATA, 0x3);
     213      registerVar( (void*) &(this->getRotationAxis().x), sizeof(this->getRotationAxis().x), network::DATA, 0x3);
     214      registerVar( (void*) &(this->getRotationAxis().y), sizeof(this->getRotationAxis().y), network::DATA, 0x3);
     215      registerVar( (void*) &(this->getRotationAxis().z), sizeof(this->getRotationAxis().z), network::DATA, 0x3);
    216216      // register scale of node
    217       registerVar( (void*) &(this->getScale().x), sizeof(this->getScale().x), network::DATA);
    218       registerVar( (void*) &(this->getScale().y), sizeof(this->getScale().y), network::DATA);
    219       registerVar( (void*) &(this->getScale().z), sizeof(this->getScale().z), network::DATA);
     217      registerVar( (void*) &(this->getScale().x), sizeof(this->getScale().x), network::DATA, 0x3);
     218      registerVar( (void*) &(this->getScale().y), sizeof(this->getScale().y), network::DATA, 0x3);
     219      registerVar( (void*) &(this->getScale().z), sizeof(this->getScale().z), network::DATA, 0x3);
    220220      //register staticity
    221       registerVar( (void*) &(this->bStatic_), sizeof(this->bStatic_), network::DATA);
     221      registerVar( (void*) &(this->bStatic_), sizeof(this->bStatic_), network::DATA, 0x3);
     222      //register acceleration
     223      // register velocity_
     224      registerVar( (void*) &(this->getAcceleration().x), sizeof(this->getAcceleration().x), network::DATA, 0x3);
     225      registerVar( (void*) &(this->getAcceleration().y), sizeof(this->getAcceleration().y), network::DATA, 0x3);
     226      registerVar( (void*) &(this->getAcceleration().z), sizeof(this->getAcceleration().z), network::DATA, 0x3);
    222227    }
    223228
Note: See TracChangeset for help on using the changeset viewer.