Changeset 7954 in orxonox.OLD for trunk/src/world_entities/power_ups/laser_power_up.cc
- Timestamp:
- May 29, 2006, 3:28:41 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/power_ups/laser_power_up.cc
r7193 r7954 120 120 } 121 121 122 int LaserPowerUp::writeBytes( const byte * data, int length, int sender )123 {124 setRequestedSync( false );125 setIsOutOfSync( false );126 122 127 SYNCHELP_READ_BEGIN();128 129 SYNCHELP_READ_FKT( PowerUp::writeState, NWT_LPU_WE_STATE );130 131 return SYNCHELP_READ_N;132 }133 134 135 136 int LaserPowerUp::readBytes( byte * data, int maxLength, int * reciever )137 {138 if ( isOutOfSync() && !requestedSync() && this->getHostID()!=this->getOwner() )139 {140 (NetworkGameManager::getInstance())->sync( this->getUniqueID(), this->getOwner() );141 setRequestedSync( true );142 }143 144 int rec = this->getRequestSync();145 if ( rec > 0 )146 {147 *reciever = rec;148 149 SYNCHELP_WRITE_BEGIN();150 151 SYNCHELP_WRITE_FKT( PowerUp::readState, NWT_LPU_WE_STATE );152 153 return SYNCHELP_WRITE_N;154 }155 156 *reciever = 0;157 return 0;158 }159
Note: See TracChangeset
for help on using the changeset viewer.