Changeset 5801 in orxonox.OLD for branches/world_entities/src/world_entities/weapons/ground_turret.cc
- Timestamp:
- Nov 27, 2005, 7:10:01 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/world_entities/src/world_entities/weapons/ground_turret.cc
r5797 r5801 81 81 * @todo: make the class Loadable 82 82 */ 83 // LoadParamXML(root, "Weapons", this, GroundTurret, loadWeapon); 83 const TiXmlElement* element; 84 85 element = root->FirstChildElement("weapon-left"); 86 if (element != NULL) element = element->FirstChildElement(); 87 this->left = dynamic_cast<Weapon*>( Factory::getFirst()->fabricate( element) ); 88 if (this->left) 89 { 90 this->left->setParent(this); 91 this->left->setRelCoor(0,10,-5); 92 } 93 94 element = root->FirstChildElement("weapon-right"); 95 if (element != NULL) if (element != NULL) element = element->FirstChildElement(); 96 this->right = dynamic_cast<Weapon*>( Factory::getFirst()->fabricate( element) ); 97 if (this->right) 98 { 99 this->right->setParent(this); 100 this->right->setRelCoor(0,10,5); 101 } 84 102 } 85 86 103 87 104 /** … … 113 130 if (this->model) 114 131 this->model->draw(); 115 if (left != NULL) 132 133 glPopMatrix(); 134 if (this->left != NULL) 116 135 this->left->draw(); 117 136 if (this->right != NULL) 118 137 this->right->draw(); 119 120 glPopMatrix();121 138 } 122 139
Note: See TracChangeset
for help on using the changeset viewer.