Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 6, 2006, 7:11:34 PM (18 years ago)
Author:
rennerc
Message:

ParamPowerUp now syncs state correctly
fixed a bug in worldEntity

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/network/src/world_entities/power_ups/param_power_up.cc

    r6420 r6421  
    129129  SYNCHELP_READ_FKT( PowerUp::writeState );
    130130
     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
    131142  return SYNCHELP_READ_N;
    132143}
     
    151162    SYNCHELP_WRITE_FKT( PowerUp::readState );
    152163
     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
    153174    return SYNCHELP_WRITE_N;
    154175  }
Note: See TracChangeset for help on using the changeset viewer.