- Timestamp:
- Apr 27, 2005, 6:56:01 PM (20 years ago)
- Location:
- orxonox/trunk/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/util/animation/animation3d.cc
r3993 r4000 105 105 { 106 106 tmpKeyFrame = this->keyFrameList->firstElement(); 107 this->setAnimFuncMov(animFuncMov);108 this->setAnimFuncRot(animFuncRot);107 //this->setAnimFuncMov(animFuncMov); 108 //this->setAnimFuncRot(animFuncRot); 109 109 } 110 110 else -
orxonox/trunk/src/world_entities/player.cc
r3980 r4000 55 55 Weapon* wpLeft = new TestGun(this, Vector(-2.6, 0.1, -3.0), Quaternion(), 1); 56 56 57 this->weaponMan->addWeapon(wpRight, W_CONFIG0 );58 this->weaponMan->addWeapon(wpLeft, W_CONFIG1 );57 this->weaponMan->addWeapon(wpRight, W_CONFIG0, W_SLOT0); 58 this->weaponMan->addWeapon(wpLeft, W_CONFIG1, W_SLOT1); 59 59 this->weaponMan->addWeapon(wpRight, W_CONFIG2); 60 60 this->weaponMan->addWeapon(wpLeft, W_CONFIG2); -
orxonox/trunk/src/world_entities/test_gun.cc
r3993 r4000 61 61 this->projectileOffset = Vector(1.0, 0.0, -0.35); 62 62 63 //this->animation1->addKeyFrame(Vector(-2.6, 0.1, 3.0), Quaternion(), 0.1, ANIM_LINEAR);64 //this->animation1->addKeyFrame(Vector(-3.0, 0.1, 3.0), Quaternion(), 0.5, ANIM_LINEAR);65 //this->animation1->addKeyFrame(Vector(-2.6, 0.1, 3.0), Quaternion(), 0.1, ANIM_LINEAR);66 67 63 this->animation1->addKeyFrame(Vector(0, 0, 0), Quaternion(), 0.1, ANIM_LINEAR, ANIM_CONSTANT); 68 64 this->animation1->addKeyFrame(Vector(-0.4, 0, 0), Quaternion(), 0.1, ANIM_LINEAR, ANIM_CONSTANT); … … 79 75 this->projectileOffset = Vector(1.0, 0.0, 0.5); 80 76 81 //this->animation1->addKeyFrame(Vector(-2.6, 0.1, -2.5), Quaternion(), 0.1, ANIM_LINEAR);82 //this->animation1->addKeyFrame(Vector(-3.0, 0.1, -2.5), Quaternion(), 0.5, ANIM_LINEAR);83 //this->animation1->addKeyFrame(Vector(-2.6, 0.1, -2.5), Quaternion(), 0.1, ANIM_LINEAR);84 85 77 this->objectComponent1->setRelCoor(Vector(0,0,0.35)); 86 78 this->animation1->addKeyFrame(Vector(0, 0, 0), Quaternion(), 0.1, ANIM_LINEAR, ANIM_CONSTANT); … … 88 80 this->animation1->addKeyFrame(Vector(0, 0, 0), Quaternion(), 0.0, ANIM_LINEAR, ANIM_CONSTANT); 89 81 90 91 82 this->animation2->addKeyFrame(Vector(-2.6, 0.1, -2.0), Quaternion(), 0.1, ANIM_LINEAR, ANIM_CONSTANT); 92 83 this->animation2->addKeyFrame(Vector(-2.6, 0.1, -3.0), Quaternion(), 0.1, ANIM_LINEAR, ANIM_CONSTANT); … … 94 85 this->animation3->addKeyFrame(Vector(-2.6, 0.1, -3.0), Quaternion(), 0.1, ANIM_LINEAR, ANIM_CONSTANT); 95 86 this->animation3->addKeyFrame(Vector(-2.6, 0.1, -2.0), Quaternion(), 0.1, ANIM_LINEAR, ANIM_CONSTANT); 96 //this->animation2->addKeyFrame(Vector(0, 0, 0.0), Quaternion(), 0.1, ANIM_LINEAR, ANIM_LINEAR);97 //this->animation2->addKeyFrame(Vector(0, 0, 2.0), Quaternion(), 0.1, ANIM_LINEAR, ANIM_LINEAR);98 //this->animation2->addKeyFrame(Vector(0, 0, 0.0), Quaternion(), 0.1, ANIM_LINEAR, ANIM_LINEAR);99 87 } 100 88 … … 120 108 void TestGun::activate() 121 109 { 122 if( this->leftRight == W_RIGHT) printf("ACTIVATE right weapon\n");123 else printf("ACTIVATE left weapon\n");124 125 110 this->animation2->replay(); 126 111 } … … 136 121 void TestGun::deactivate() 137 122 { 138 printf("DEACTIVATE\n");139 123 this->animation3->replay(); 140 124 } … … 209 193 void TestGun::draw () 210 194 { 211 //this->getRelCoor().debug();212 //this->getAbsCoor().debug();213 //this->objectComponent1->getRelCoor().debug();214 //this->objectComponent1->getAbsCoor().debug();215 216 195 /* draw gun body */ 217 196 glMatrixMode(GL_MODELVIEW); -
orxonox/trunk/src/world_entities/weapon.cc
r3993 r4000 112 112 PRINTF(4)("Changing weapon configuration: from %i to next\n", this->currConfID); 113 113 114 Weapon* w; 115 for(int i = 0; i < W_MAX_SLOTS; ++i) 116 { 117 w = this->configs[this->currConfID].slots[i]; 118 if( w != NULL) w->deactivate(); 119 } 120 int i; 114 int i, lastConfID; 115 lastConfID = this->currConfID; 121 116 for(i = this->currConfID + 1; i < W_MAX_CONFIGS && !this->configs[i].bUsed; ++i); 122 117 if( i == W_MAX_CONFIGS) this->currConfID = W_CONFIG0; 123 118 else this->currConfID = i; 124 PRINTF(4)("\tto %i\n", this->currConfID); 125 126 for(int i = 0; i < W_MAX_SLOTS; ++i) 127 { 128 w = this->configs[this->currConfID].slots[i]; 129 if( w != NULL) w->activate(); 119 120 121 Weapon *w1, *w2; 122 for(int j = 0; j < W_MAX_SLOTS; ++j) 123 { 124 w1 = this->configs[lastConfID].slots[j]; 125 w2 = this->configs[this->currConfID].slots[j]; 126 127 if( w1 == w2) 128 { 129 printf("no need for change\n"); 130 } 131 else 132 { 133 if( w1 != NULL ) 134 { 135 w1->deactivate(); 136 printf("deactivating %i,%i\n", j,lastConfID); 137 } 138 if( w2 != NULL) 139 { 140 w2->activate(); 141 printf("activating %i,%i\n", j, this->currConfID); 142 } 143 } 130 144 } 131 145 }
Note: See TracChangeset
for help on using the changeset viewer.