Changeset 6871 in orxonox.OLD for trunk/src/world_entities
- Timestamp:
- Jan 30, 2006, 9:39:58 PM (19 years ago)
- Location:
- trunk/src/world_entities
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/playable.cc
r6868 r6871 253 253 { 254 254 SYNCHELP_READ_BEGIN(); 255 255 256 256 byte flags; 257 257 258 258 SYNCHELP_READ_BYTE( flags, NWT_PL_FLAGS ); 259 259 260 260 bFire = (flags & FLAGS_bFire) != 0; 261 261 262 262 return SYNCHELP_READ_N; 263 263 } … … 267 267 SYNCHELP_WRITE_BEGIN(); 268 268 byte flags = 0; 269 269 270 270 if ( bFire ) 271 271 flags |= FLAGS_bFire; 272 272 273 273 274 274 SYNCHELP_WRITE_BYTE( flags, NWT_PL_FLAGS ); 275 275 oldFlags = flags; 276 276 277 277 278 278 return SYNCHELP_WRITE_N; 279 279 } … … 282 282 { 283 283 byte flags = 0; 284 284 285 285 if ( bFire ) 286 286 flags |= FLAGS_bFire; 287 287 288 288 return flags!=oldFlags; 289 289 } -
trunk/src/world_entities/playable.h
r6868 r6871 27 27 virtual ~Playable(); 28 28 29 virtual void enter() =0;30 virtual void leave() =0;29 virtual void enter() = 0; 30 virtual void leave() = 0; 31 31 32 32 virtual bool pickup(PowerUp* powerUp); … … 54 54 /** @return a List of Events in PEV_* sytle */ 55 55 inline const std::list<int>& getEventList() { return this->events; }; 56 56 57 57 int writeSync(const byte* data, int length, int sender); 58 58 int readSync(byte* data, int maxLength ); -
trunk/src/world_entities/player.h
r6443 r6871 30 30 bool setControllable(Playable* controllalble); 31 31 inline Playable* getControllable() { return this->controllable; }; 32 bool disconnectControllable(); 32 33 33 34 void weaponConfigChanged(); 34 bool disconnectControllable();35 35 36 36 // eventListener extension. -
trunk/src/world_entities/space_ships/helicopter.cc
r6805 r6871 213 213 } 214 214 215 void Helicopter::attachCamera() 216 { 215 void Helicopter::enter() 216 { 217 dynamic_cast<Element2D*>(this->getWeaponManager()->getFixedTarget())->setVisibility( true); 217 218 State::getCamera()->setParentSoft(this->getWeaponManager()->getFixedTarget()); 218 219 State::getCameraTarget()->setParentSoft(this->getWeaponManager()->getFixedTarget()); 219 220 }221 222 223 void Helicopter::enter()224 {225 dynamic_cast<Element2D*>(this->getWeaponManager()->getFixedTarget())->setVisibility( true);226 this->attachCamera();227 228 229 220 } 230 221 -
trunk/src/world_entities/space_ships/helicopter.h
r6805 r6871 25 25 virtual void enter(); 26 26 virtual void leave(); 27 virtual void attachCamera();28 27 29 28 virtual void postSpawn(); -
trunk/src/world_entities/space_ships/hover.cc
r6824 r6871 39 39 */ 40 40 Hover::~Hover () 41 {} 41 { 42 43 } 42 44 43 45 /** … … 185 187 } 186 188 187 void Hover::attachCamera() 188 { 189 190 void Hover::enter() 191 { 192 dynamic_cast<Element2D*>(this->getWeaponManager()->getFixedTarget())->setVisibility( true); 193 189 194 State::getCamera()->setParentSoft(&this->cameraNode); 190 195 State::getCamera()->setRelCoorSoft(-10, 0,0); 191 196 State::getCameraTarget()->setParentSoft(&this->cameraNode); 192 }193 194 195 void Hover::enter()196 {197 dynamic_cast<Element2D*>(this->getWeaponManager()->getFixedTarget())->setVisibility( true);198 this->attachCamera();199 200 201 197 } 202 198 -
trunk/src/world_entities/space_ships/hover.h
r6807 r6871 22 22 virtual void enter(); 23 23 virtual void leave(); 24 virtual void attachCamera();25 24 26 25 virtual void postSpawn();
Note: See TracChangeset
for help on using the changeset viewer.