- Timestamp:
- Jan 28, 2007, 9:48:53 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/cameraman.cc
r10461 r10463 151 151 BaseObject* object = ObjectListBase::getBaseObject(className, objectName); 152 152 if( object != NULL && object->isA(PNode::staticClassID())) 153 { 153 154 cameras[camNo]->lookAt(dynamic_cast<PNode*>(object)); 155 } 154 156 } 155 157 … … 162 164 { 163 165 dynamic_cast<Camera*>(newCam)->lookAt(dynamic_cast<PNode*>(object)); 164 State::setCamera(); 166 this->setCam( dynamic_cast<Camera*>(newCam)); 167 State::setCamera( dynamic_cast<Camera*>(newCam), dynamic_cast<CameraTarget*>(object)); 165 168 } 166 169 } … … 170 173 BaseObject* object = ObjectListBase::getBaseObject(className, objectName); 171 174 if( object != NULL && object->isA(PNode::staticClassID())) 175 { 172 176 currentCam->lookAt(dynamic_cast<PNode*>(object)); 177 State::setCamera(this->currentCam, dynamic_cast<CameraTarget*>(object)); 178 } 173 179 } 174 180 … … 176 182 { 177 183 currentCam->target->atach(target); 184 State::setCamera(this->currentCam, dynamic_cast<CameraTarget*>(target)); 185 178 186 } 179 187 … … 185 193 { 186 194 this->atachCurrTarget(dynamic_cast<PNode*>(object)); 195 State::setCamera(this->currentCam, dynamic_cast<CameraTarget*>(object)); 187 196 return; 188 197 } … … 200 209 { 201 210 dynamic_cast<Camera*>(targetCam)->target->atach(dynamic_cast<PNode*>(object)); 211 State::setCamera(this->currentCam, dynamic_cast<CameraTarget*>(object)); 202 212 return; 203 213 }
Note: See TracChangeset
for help on using the changeset viewer.