Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6424 in orxonox.OLD for trunk/src/world_entities


Ignore:
Timestamp:
Jan 7, 2006, 11:07:22 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: merged the branche network back to the trunk
merged with command:
svn merge https://svn.orxonox.net/orxonox/branches/network . -r 6351:HEAD
no conflicts

Location:
trunk/src/world_entities
Files:
17 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/camera.cc

    r6222 r6424  
    1111   ### File Specific:
    1212   main-programmer: Christian Meyer
    13    co-programmer: ...
     13   co-programmer: Benjamin Grauer
    1414*/
    1515#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WORLD_ENTITY
     
    1717#include "camera.h"
    1818
    19 #include "world.h"
    20 #include "world_entity.h"
    21 #include "vector.h"
    22 #include "event.h"
    2319#include "event_handler.h"
    2420
    2521using namespace std;
    2622
    27 ////////////
    28 // CAMERA //
    29 ////////////
    3023
    3124/**
     
    5851*/
    5952Camera::~Camera()
    60 {
    61 }
     53{}
    6254
    6355/**
     
    115107  currentMode = mode;
    116108  switch (mode)
    117     {
     109  {
    118110    default:
    119111    case VIEW_NORMAL:
    120112      this->toFovy = 60.0;
    121 /*      this->setParentSoft("TrackNode");
    122       this->target->setParentSoft("TrackNode"); */
     113      /*      this->setParentSoft("TrackNode");
     114            this->target->setParentSoft("TrackNode"); */
    123115      this->setRelCoorSoft(-10, 5, 0);
    124116      this->target->setRelCoorSoft(0,0,0);
    125117      break;
    126118    case VIEW_BEHIND:
    127 //      this->toFovy = 120.0;
    128 //      this->setRelCoorSoft(Vector(3.5, 0, 0));
    129   //    this->target->setRelCoorSoft(Vector(10,0,0));
    130 
    131 //       if (!strcmp(this->target->getParent()->getName(), "Player"))
    132 //         this->target->setParentSoft("TrackNode");
    133 //       else
    134 //         this->target->setParentSoft("Player");
    135 //       this->getParent()->debugNode(0);
    136 
    137 //      this->setParent("main-Turret");
    138 //      this->setParentMode(PNODE_ALL);
    139 //      this->target->setParentSoft("Player");
     119      //      this->toFovy = 120.0;
     120      //      this->setRelCoorSoft(Vector(3.5, 0, 0));
     121      //    this->target->setRelCoorSoft(Vector(10,0,0));
     122
     123      //       if (!strcmp(this->target->getParent()->getName(), "Player"))
     124      //         this->target->setParentSoft("TrackNode");
     125      //       else
     126      //         this->target->setParentSoft("Player");
     127      //       this->getParent()->debugNode(0);
     128
     129      //      this->setParent("main-Turret");
     130      //      this->setParentMode(PNODE_ALL);
     131      //      this->target->setParentSoft("Player");
    140132
    141133      break;
    142134    case VIEW_FRONT:
    143135      this->toFovy = 120.0;
    144 /*       this->setParentSoft("Player");
    145        this->target->setParentSoft("Player");*/
    146        this->setRelCoorSoft(4, 0, 0, 5);
    147        this->target->setRelCoorSoft(Vector(10,0,0), 5);
    148 //      this->target->setRelDirSoft(Quaternion(M_PI/4.0, Vector(0,1,0)));
     136      /*       this->setParentSoft("Player");
     137             this->target->setParentSoft("Player");*/
     138      this->setRelCoorSoft(4, 0, 0, 5);
     139      this->target->setRelCoorSoft(Vector(10,0,0), 5);
     140      //      this->target->setRelDirSoft(Quaternion(M_PI/4.0, Vector(0,1,0)));
    149141      break;
    150142    case VIEW_LEFT:
    151143      this->toFovy = 90;
    152 /*      this->setParentSoft("TrackNode");
    153       this->target->setParentSoft("TrackNode");*/
     144      /*      this->setParentSoft("TrackNode");
     145            this->target->setParentSoft("TrackNode");*/
    154146      this->setRelCoorSoft(0, 1, -10, .5);
    155147      this->target->setRelCoorSoft(0,0,0);
     
    157149    case VIEW_RIGHT:
    158150      this->toFovy = 90;
    159 /*      this->setParentSoft("TrackNode");
    160       this->target->setParentSoft("TrackNode");*/
     151      /*      this->setParentSoft("TrackNode");
     152            this->target->setParentSoft("TrackNode");*/
    161153      this->setRelCoorSoft(Vector(0, 1, 10));
    162154      this->target->setRelCoorSoft(0,0,0);
     
    164156    case VIEW_TOP:
    165157      this->toFovy= 120;
    166 /*      this->setParentSoft("TrackNode");
    167       this->target->setParentSoft("TrackNode");*/
     158      /*      this->setParentSoft("TrackNode");
     159            this->target->setParentSoft("TrackNode");*/
    168160      this->setRelCoorSoft(Vector(30, 50, 0));
    169161      this->target->setRelCoorSoft(35,0,0);
    170     }
     162  }
    171163}
    172164
     
    216208  // switching back to Modeling Matrix
    217209  glMatrixMode (GL_MODELVIEW);
    218 //  this->target->getParent()->getParent()->debugDraw(0, 2, Vector(1,0,0));
     210  //  this->target->getParent()->getParent()->debugDraw(0, 2, Vector(1,0,0));
    219211}
    220212
     
    226218{
    227219  if( event.type == KeyMapper::PEV_VIEW0)
    228     {
    229       this->setViewMode(VIEW_NORMAL);
    230     }
     220  {
     221    this->setViewMode(VIEW_NORMAL);
     222  }
    231223  else if( event.type == KeyMapper::PEV_VIEW1)
    232     {
    233       this->setViewMode(VIEW_BEHIND);
    234     }
     224  {
     225    this->setViewMode(VIEW_BEHIND);
     226  }
    235227  else if( event.type == KeyMapper::PEV_VIEW2)
    236     {
    237       this->setViewMode(VIEW_FRONT);
    238     }
     228  {
     229    this->setViewMode(VIEW_FRONT);
     230  }
    239231  else if( event.type == KeyMapper::PEV_VIEW3)
    240     {
    241       this->setViewMode(VIEW_LEFT);
    242     }
     232  {
     233    this->setViewMode(VIEW_LEFT);
     234  }
    243235  else if( event.type == KeyMapper::PEV_VIEW4)
    244     {
    245       this->setViewMode(VIEW_RIGHT);
    246     }
     236  {
     237    this->setViewMode(VIEW_RIGHT);
     238  }
    247239  else if( event.type == KeyMapper::PEV_VIEW5)
    248     {
    249       this->setViewMode(VIEW_TOP);
    250     }
     240  {
     241    this->setViewMode(VIEW_TOP);
     242  }
    251243}
    252244
     
    260252{
    261253  this->setClassID(CL_CAMERA_TARGET, "CameraTarget");
    262 //  this->setParentMode(PNODE_MOVEMENT);
    263 }
    264 
     254  //  this->setParentMode(PNODE_MOVEMENT);
     255}
     256
  • trunk/src/world_entities/power_ups/laser_power_up.cc

    r6222 r6424  
    1919#include "factory.h"
    2020#include "state.h"
     21#include "network_game_manager.h"
    2122
    2223#include "primitive_model.h"
     
    118119}
    119120
     121int LaserPowerUp::writeBytes( const byte * data, int length, int sender )
     122{
     123  setRequestedSync( false );
     124  setIsOutOfSync( false );
     125
     126  SYNCHELP_READ_BEGIN();
     127
     128  SYNCHELP_READ_FKT( PowerUp::writeState );
     129
     130  return SYNCHELP_READ_N;
     131}
     132
     133
     134
     135int LaserPowerUp::readBytes( byte * data, int maxLength, int * reciever )
     136{
     137  if ( isOutOfSync() && !requestedSync() && this->getHostID()!=this->getOwner() )
     138  {
     139    (NetworkGameManager::getInstance())->sync( this->getUniqueID(), this->getOwner() );
     140    setRequestedSync( true );
     141  }
     142
     143  int rec = this->getRequestSync();
     144  if ( rec > 0 )
     145  {
     146    *reciever = rec;
     147
     148    SYNCHELP_WRITE_BEGIN();
     149
     150    SYNCHELP_WRITE_FKT( PowerUp::readState );
     151
     152    return SYNCHELP_WRITE_N;
     153  }
     154
     155  *reciever = 0;
     156  return 0;
     157}
     158
  • trunk/src/world_entities/power_ups/laser_power_up.h

    r5511 r6424  
    2323  virtual void draw() const;
    2424
     25  virtual int writeBytes(const byte* data, int length, int sender);
     26  virtual int readBytes(byte* data, int maxLength, int * reciever );
     27
    2528  private:
    2629   void init();
  • trunk/src/world_entities/power_ups/param_power_up.cc

    r6243 r6424  
    2525#include "factory.h"
    2626#include "load_param.h"
     27#include "network_game_manager.h"
    2728
    2829using namespace std;
     
    5354void ParamPowerUp::init()
    5455{
     56  this->setClassID(CL_PARAM_POWER_UP, "ParamPowerUp");
    5557  this->value = 0;
    5658  this->max_value = 0;
     
    6365  static_cast<PowerUp*>(this)->loadParams(root);
    6466  LoadParam(root, "type", this, ParamPowerUp, setType);
    65   if(root->FirstChildElement("value") != NULL) {
     67
     68  if( root != NULL && root->FirstChildElement("value") != NULL) {
     69
    6670    LoadParam(root, "value", this, ParamPowerUp, setValue);
    6771  }
     
    116120}
    117121
     122int ParamPowerUp::writeBytes( const byte * data, int length, int sender )
     123{
     124  setRequestedSync( false );
     125  setIsOutOfSync( false );
    118126
     127  SYNCHELP_READ_BEGIN();
     128
     129  SYNCHELP_READ_FKT( PowerUp::writeState );
     130
     131  int i;
     132  SYNCHELP_READ_INT( i );
     133  this->type = (EnumParamPowerUpType)i;
     134  SYNCHELP_READ_INT( this->value );
     135
     136  if ( this->value != 0 )
     137  {
     138    SYNCHELP_READ_INT( this->min_value );
     139    SYNCHELP_READ_INT( this->max_value );
     140  }
     141
     142  return SYNCHELP_READ_N;
     143}
     144
     145
     146
     147int ParamPowerUp::readBytes( byte * data, int maxLength, int * reciever )
     148{
     149  if ( isOutOfSync() && !requestedSync() && this->getHostID()!=this->getOwner() )
     150  {
     151    (NetworkGameManager::getInstance())->sync( this->getUniqueID(), this->getOwner() );
     152    setRequestedSync( true );
     153  }
     154
     155  int rec = this->getRequestSync();
     156  if ( rec > 0 )
     157  {
     158    *reciever = rec;
     159
     160    SYNCHELP_WRITE_BEGIN();
     161
     162    SYNCHELP_WRITE_FKT( PowerUp::readState );
     163
     164    int i = this->type;
     165    SYNCHELP_WRITE_INT( i );
     166    SYNCHELP_WRITE_INT( this->value );
     167
     168    if ( this->value != 0 )
     169    {
     170      SYNCHELP_WRITE_INT( this->min_value );
     171      SYNCHELP_WRITE_INT( this->max_value );
     172    }
     173
     174    return SYNCHELP_WRITE_N;
     175  }
     176
     177  *reciever = 0;
     178  return 0;
     179}
     180
  • trunk/src/world_entities/power_ups/param_power_up.h

    r6113 r6424  
    3030  int getValue();
    3131
     32  virtual int writeBytes(const byte* data, int length, int sender);
     33  virtual int readBytes(byte* data, int maxLength, int * reciever );
     34
    3235protected:
    3336  virtual void respawn();
  • trunk/src/world_entities/power_ups/power_up.cc

    r6282 r6424  
    2525PowerUp::PowerUp(float r, float g, float b)
    2626{
     27  this->setClassID(CL_POWER_UP, "PowerUp");
     28
    2729  this->respawnType = RESPAWN_NONE;
    2830/*  if(!PowerUp::sphereModel) {*/
     
    5254void PowerUp::collidesWith (WorldEntity* entity, const Vector& location)
    5355{
    54  if(entity->isA(CL_EXTENDABLE))
     56  if(entity->isA(CL_EXTENDABLE))
    5557  {
    5658    if(dynamic_cast<Extendable*>(entity)->pickup(this))
     
    9496}
    9597
     98/**
     99 * data copied in data will bee sent to another host
     100 * @param data pointer to data
     101 * @param maxLength max length of data
     102 * @return the number of bytes writen
     103 */
     104int PowerUp::readState( byte * data, int maxLength )
     105{
     106  SYNCHELP_WRITE_BEGIN();
     107  SYNCHELP_WRITE_FKT( WorldEntity::readState );
     108  return SYNCHELP_WRITE_N;
     109}
     110
     111/**
     112 * Writes data from network containing information about the state
     113 * @param data pointer to data
     114 * @param length length of data
     115 * @param sender hostID of sender
     116 */
     117int PowerUp::writeState( const byte * data, int length, int sender )
     118{
     119  SYNCHELP_READ_BEGIN();
     120  SYNCHELP_READ_FKT( WorldEntity::writeState );
     121  return SYNCHELP_READ_N;
     122}
     123
  • trunk/src/world_entities/power_ups/power_up.h

    r6282 r6424  
    2626  void setRespawnType(const char* type);
    2727
     28  int       writeState(const byte* data, int length, int sender);
     29  int       readState(byte* data, int maxLength );
     30
    2831protected:
    2932  PowerUp(float r, float g, float b);
  • trunk/src/world_entities/power_ups/turret_power_up.cc

    r6222 r6424  
    1818#include "turret_power_up.h"
    1919#include "factory.h"
     20#include "network_game_manager.h"
    2021#include "state.h"
    2122
     
    118119}
    119120
     121int TurretPowerUp::writeBytes( const byte * data, int length, int sender )
     122{
     123  setRequestedSync( false );
     124  setIsOutOfSync( false );
     125
     126  SYNCHELP_READ_BEGIN();
     127
     128  SYNCHELP_READ_FKT( PowerUp::writeState );
     129
     130  return SYNCHELP_READ_N;
     131}
     132
     133
     134
     135int TurretPowerUp::readBytes( byte * data, int maxLength, int * reciever )
     136{
     137  if ( isOutOfSync() && !requestedSync() && this->getHostID()!=this->getOwner() )
     138  {
     139    (NetworkGameManager::getInstance())->sync( this->getUniqueID(), this->getOwner() );
     140    setRequestedSync( true );
     141  }
     142
     143  int rec = this->getRequestSync();
     144  if ( rec > 0 )
     145  {
     146    *reciever = rec;
     147
     148    SYNCHELP_WRITE_BEGIN();
     149
     150    SYNCHELP_WRITE_FKT( PowerUp::readState );
     151
     152    return SYNCHELP_WRITE_N;
     153  }
     154
     155  *reciever = 0;
     156  return 0;
     157}
  • trunk/src/world_entities/power_ups/turret_power_up.h

    r5511 r6424  
    2323  virtual void draw() const;
    2424
     25  virtual int writeBytes(const byte* data, int length, int sender);
     26  virtual int readBytes(byte* data, int maxLength, int * reciever );
     27
    2528  private:
    2629   void init();
  • trunk/src/world_entities/power_ups/weapon_power_up.cc

    r6243 r6424  
    2020#include "state.h"
    2121#include "list.h"
     22#include "network_game_manager.h"
    2223
    2324#include "primitive_model.h"
     
    8586  this->weapon = dynamic_cast<Weapon*>(Factory::fabricate(name));
    8687}
     88
     89int WeaponPowerUp::writeBytes( const byte * data, int length, int sender )
     90{
     91  setRequestedSync( false );
     92  setIsOutOfSync( false );
     93
     94  SYNCHELP_READ_BEGIN();
     95
     96  SYNCHELP_READ_FKT( PowerUp::writeState );
     97
     98  //TODO: sync weapon class ( see loadParams )
     99
     100  return SYNCHELP_READ_N;
     101}
     102
     103
     104
     105int WeaponPowerUp::readBytes( byte * data, int maxLength, int * reciever )
     106{
     107  if ( isOutOfSync() && !requestedSync() && this->getHostID()!=this->getOwner() )
     108  {
     109    (NetworkGameManager::getInstance())->sync( this->getUniqueID(), this->getOwner() );
     110    setRequestedSync( true );
     111  }
     112
     113  int rec = this->getRequestSync();
     114  if ( rec > 0 )
     115  {
     116    *reciever = rec;
     117
     118    SYNCHELP_WRITE_BEGIN();
     119
     120    SYNCHELP_WRITE_FKT( PowerUp::readState );
     121
     122    //TODO: sync weapon class ( see loadParams )
     123
     124    return SYNCHELP_WRITE_N;
     125  }
     126
     127  *reciever = 0;
     128  return 0;
     129}
  • trunk/src/world_entities/power_ups/weapon_power_up.h

    r6113 r6424  
    2222  void setWeaponClass(const char* name);
    2323
     24  virtual int writeBytes(const byte* data, int length, int sender);
     25  virtual int readBytes(byte* data, int maxLength, int * reciever );
     26
    2427protected:
    2528  virtual void respawn();
  • trunk/src/world_entities/space_ships/space_ship.cc

    r6341 r6424  
    3131#include "key_mapper.h"
    3232#include "event_handler.h"
     33
     34#include "network_game_manager.h"
    3335
    3436#include "power_ups/weapon_power_up.h"
     
    121123  PRINTF(4)("SPACESHIP INIT\n");
    122124
    123   //  EventHandler::getInstance()->grabEvents(true);
     125    EventHandler::getInstance()->grabEvents(true);
    124126
    125127  bUp = bDown = bLeft = bRight = bAscend = bDescend = bRollL = bRollR = false;
     
    516518  }
    517519}
     520
     521
     522int SpaceShip::writeBytes( const byte * data, int length, int sender )
     523{
     524  setRequestedSync( false );
     525  setIsOutOfSync( false );
     526
     527  SYNCHELP_READ_BEGIN();
     528
     529  SYNCHELP_READ_FKT( WorldEntity::writeState );
     530
     531  return SYNCHELP_READ_N;
     532}
     533
     534int SpaceShip::readBytes( byte * data, int maxLength, int * reciever )
     535{
     536  if ( isOutOfSync() && !requestedSync() && this->getHostID()!=this->getOwner() )
     537  {
     538    (NetworkGameManager::getInstance())->sync( this->getUniqueID(), this->getOwner() );
     539    setRequestedSync( true );
     540  }
     541
     542  int rec = this->getRequestSync();
     543  if ( rec > 0 )
     544  {
     545    *reciever = rec;
     546
     547    SYNCHELP_WRITE_BEGIN();
     548
     549    SYNCHELP_WRITE_FKT( WorldEntity::readState );
     550
     551    return SYNCHELP_WRITE_N;
     552  }
     553
     554  *reciever = 0;
     555  return 0;
     556}
  • trunk/src/world_entities/space_ships/space_ship.h

    r6243 r6424  
    4444    bool pickup(PowerUp* powerUp);
    4545
     46    virtual int       writeBytes(const byte* data, int length, int sender);
     47    virtual int       readBytes(byte* data, int maxLength, int * reciever);
     48
    4649
    4750  private:
  • trunk/src/world_entities/spawning_point.cc

    r6139 r6424  
    1616
    1717#include "spawning_point.h"
     18
    1819#include "load_param.h"
    1920#include "factory.h"
     21
    2022#include "compiler.h"
    21 #include "world.h" /* only temp. until the object manager is implemented*/
     23
    2224
    2325/**
     
    9799            this->frequency, this->seed);
    98100  BaseObject* spawningEntity = Factory::fabricate(this->classID);
    99   if( likely(this->world != NULL))
    100     this->world->spawn(dynamic_cast<WorldEntity*>(spawningEntity));
     101
     102//   if( likely(this->world != NULL))
     103//     this->world->spawn(dynamic_cast<WorldEntity*>(spawningEntity));
    101104}
    102105
  • trunk/src/world_entities/weapons/ground_turret.cc

    r6341 r6424  
    119119void GroundTurret::draw () const
    120120{
    121   glMatrixMode(GL_MODELVIEW);
    122   glPushMatrix();
    123   float matrix[4][4];
    124 
    125   /* translate */
    126   glTranslatef (this->getAbsCoor ().x,
    127                 this->getAbsCoor ().y,
    128                 this->getAbsCoor ().z);
    129   /* rotate */
    130   this->getAbsDir().matrix(matrix);
    131   glMultMatrixf((float*)matrix);
    132 
    133   if (this->getModel())
    134     this->getModel()->draw();
    135 
    136   glPopMatrix();
     121  WorldEntity::draw();
     122
    137123  if (this->left != NULL)
    138124    this->left->draw();
  • trunk/src/world_entities/world_entity.cc

    r6341 r6424  
    3535    ->defaultValues(2, "models/ships/fighter.obj", 1.0);
    3636
     37SHELL_COMMAND(debugEntity, WorldEntity, debugWE);
    3738
    3839/**
     
    4849
    4950  this->obbTree = NULL;
     51
     52  this->md2TextureFileName = NULL;
    5053
    5154  if (root != NULL)
     
    105108void WorldEntity::loadModel(const char* fileName, float scaling, unsigned int modelNumber)
    106109{
     110  this->scaling = scaling;
    107111  if ( fileName != NULL && strcmp(fileName, "") )
    108112  {
     
    123127      return;
    124128    }
    125 
     129    if (scaling == 0.0)
     130    {
     131      scaling = 1.0;
     132      PRINTF(1)("YOU GAVE ME A CRAPY SCALE resetting to 1\n");
     133    }
    126134    if(strstr(fileName, ".obj"))
    127135    {
     
    343351}
    344352
     353
     354/**
     355 * Debug the WorldEntity
     356 */
     357void WorldEntity::debugEntity() const
     358{
     359  PRINT(0)("WorldEntity %s::%s  (DEBUG)\n", this->getClassName(), this->getName());
     360  this->debugNode();
     361  PRINT(0)("List: %s ; ModelCount %d - ", ObjectManager::OMListToString(this->objectListNumber) , this->models.size());
     362  for (unsigned int i = 0; i < this->models.size(); i++)
     363  {
     364    if (models[i] != NULL)
     365      PRINT(0)(" : %d:%s", i, this->models[i]->getName());
     366  }
     367  PRINT(0)("\n");
     368
     369}
     370
     371
    345372/**
    346373 * Writes data from network containing information about the state
     
    359386  SYNCHELP_READ_FLOAT( scaling );
    360387  //check if modelFileName is relative to datadir or absolute
    361   if ( strstr(modelFileName, ResourceManager::getInstance()->getDataDir()) )
    362   {
    363     loadModel( modelFileName+strlen(ResourceManager::getInstance()->getDataDir()), scaling );
    364   }
    365   else
    366   {
    367     loadModel( modelFileName, scaling );
     388
     389  if ( strcmp(modelFileName, "") )
     390  {
     391
     392    if ( strstr(modelFileName, ResourceManager::getInstance()->getDataDir()) )
     393    {
     394      loadModel( modelFileName+strlen(ResourceManager::getInstance()->getDataDir()), scaling );
     395    }
     396    else
     397    {
     398      loadModel( modelFileName, scaling );
     399    }
    368400  }
    369401  delete[] modelFileName;
     402
     403  SYNCHELP_READ_STRINGM( modelFileName );
     404  if ( strcmp(modelFileName, "") )
     405    this->md2TextureFileName = modelFileName;
    370406
    371407  return SYNCHELP_READ_N;
     
    386422  SYNCHELP_WRITE_STRING( getModel( 0 )->getName() );
    387423  SYNCHELP_WRITE_FLOAT( scaling );
     424  if ( this->md2TextureFileName!=NULL && strcmp(this->md2TextureFileName, "") )
     425  {
     426    SYNCHELP_WRITE_STRING(this->md2TextureFileName);
     427  }
     428  else
     429  {
     430    SYNCHELP_WRITE_STRING("");
     431  }
     432
    388433  return SYNCHELP_WRITE_N;
    389434}
  • trunk/src/world_entities/world_entity.h

    r6341 r6424  
    6060  void drawBVTree(unsigned int depth, int drawMode) const;
    6161
     62
     63  void debugWE() { this->debugEntity(); };  ///FIXME
     64  void debugEntity() const;
     65
     66
    6267  /* @returns the Count of Faces on this WorldEntity */
    6368  //unsigned int getFaceCount () const { return (this->model != NULL)?this->model->getFaceCount():0; };
Note: See TracChangeset for help on using the changeset viewer.