Changeset 12378 for code/branches/OrxoBlox_FS19/src/modules
- Timestamp:
- May 16, 2019, 2:53:00 PM (6 years ago)
- Location:
- code/branches/OrxoBlox_FS19/src/modules/weapons
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/OrxoBlox_FS19/src/modules/weapons/projectiles/BallProjectile.cc
r12376 r12378 104 104 Vector3 myPosition = otherObject->getPosition(); 105 105 btVector3 positionOtherObject = contactPoint.getPositionWorldOnA(); 106 //orxout() << "About to Bounce >D" << endl;107 //if (positionOtherObject.y < 0) {108 //this.destroy()109 //}S110 //else {111 106 112 107 int distance_X = positionOtherObject.getX() - myPosition.x; … … 143 138 bool BallProjectile::processCollision(WorldEntity* otherObject, btManifoldPoint& contactPoint, const btCollisionShape* cs) 144 139 { 145 146 //orxout() << "wanna bounce..." << endl;147 140 bool result = BasicProjectile::processCollision(otherObject, contactPoint, cs); 148 141 if (result == true) { 149 142 if (otherObject->isA(Class(OrxoBloxStones))) { 150 143 Bounce(otherObject, contactPoint, cs); 151 } 152 } 153 //orxout() << "BOUNCED!" << endl; 154 144 orxout() << "BOUNCED!" << endl; 145 } 146 } 155 147 return result; 156 148 } … … 289 281 } 290 282 283 void BallProjectile::destroyObject(void) 284 { 285 if(GameMode::isMaster()) { 286 } 287 } 288 289 291 290 292 291 } -
code/branches/OrxoBlox_FS19/src/modules/weapons/projectiles/BallProjectile.h
r12368 r12378 65 65 66 66 private: 67 67 void destroyObject() override; 68 68 void registerVariables(); 69 69 void changeTexture(); -
code/branches/OrxoBlox_FS19/src/modules/weapons/projectiles/BasicProjectile.cc
r12376 r12378 85 85 bool BasicProjectile::processCollision(WorldEntity* otherObject, btManifoldPoint& contactPoint, const btCollisionShape* cs) 86 86 { 87 //orxout() << "OMG A COLLISION" << endl;88 87 if (!this->bDestroy_ && GameMode::isMaster()) 89 88 { … … 93 92 if (getDestroyAfterCollision()) 94 93 { 94 orxout() << "Destroy that stuff" << endl; 95 95 this->bDestroy_ = true; // If something is hit, the object is destroyed and can't hit something else. 96 96 // The projectile is destroyed by its tick()-function (in the following tick). … … 173 173 void BasicProjectile::destroyCheck(void) 174 174 { 175 if(GameMode::isMaster() && this->bDestroy_) 175 if(GameMode::isMaster() && this->bDestroy_) { 176 orxout() << "Set true, smhow" << endl; 176 177 this->destroy(); 178 } 177 179 } 178 180 … … 183 185 void BasicProjectile::destroyObject(void) 184 186 { 185 if(GameMode::isMaster()) 187 if(GameMode::isMaster()) { 188 orxout() << "Deleted myself" << endl; 186 189 this->destroy(); 190 } 187 191 } 188 192 } -
code/branches/OrxoBlox_FS19/src/modules/weapons/weaponmodes/BallGun.cc
r12371 r12378 60 60 this->reloadTime_ = 0.25f; 61 61 this->damage_ = 0.0f; //default 15 62 this->speed_ = 50;62 this->speed_ = 100; 63 63 this->delay_ = 100; 64 64 this->setMunitionName("BallMunition"); … … 104 104 void BallGun::fire() 105 105 { 106 orxout() << "fire" << endl;107 106 this->delayTimer_.startTimer(); 108 107 } … … 115 114 { 116 115 assert( this->getWeapon() && this->getWeapon()->getWeaponPack() && this->getWeapon()->getWeaponPack()->getWeaponSystem() && this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn() ); 117 orxout() << "SHOT!" << endl;118 116 // Create the projectile. 119 117 Projectile* projectile = new BallProjectile(this->getContext());
Note: See TracChangeset
for help on using the changeset viewer.