Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 29, 2006, 3:28:41 PM (18 years ago)
Author:
patrick
Message:

trunk: merged the network branche back to trunk.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/power_ups/weapon_power_up.cc

    r7370 r7954  
    103103}
    104104
    105 int WeaponPowerUp::writeBytes( const byte * data, int length, int sender )
    106 {
    107   setRequestedSync( false );
    108   setIsOutOfSync( false );
    109 
    110   SYNCHELP_READ_BEGIN();
    111 
    112   SYNCHELP_READ_FKT( PowerUp::writeState, NWT_WPU_WE_STATE );
    113 
    114   //TODO: sync weapon class ( see loadParams )
    115 
    116   return SYNCHELP_READ_N;
    117 }
    118 
    119 
    120 
    121 int WeaponPowerUp::readBytes( byte * data, int maxLength, int * reciever )
    122 {
    123   if ( isOutOfSync() && !requestedSync() && this->getHostID()!=this->getOwner() )
    124   {
    125     (NetworkGameManager::getInstance())->sync( this->getUniqueID(), this->getOwner() );
    126     setRequestedSync( true );
    127   }
    128 
    129   int rec = this->getRequestSync();
    130   if ( rec > 0 )
    131   {
    132     *reciever = rec;
    133 
    134     SYNCHELP_WRITE_BEGIN();
    135 
    136     SYNCHELP_WRITE_FKT( PowerUp::readState, NWT_WPU_WE_STATE );
    137 
    138     //TODO: sync weapon class ( see loadParams )
    139 
    140     return SYNCHELP_WRITE_N;
    141   }
    142 
    143   *reciever = 0;
    144   return 0;
    145 }
Note: See TracChangeset for help on using the changeset viewer.