home *** CD-ROM | disk | FTP | other *** search
/ Enter 2005 March / ENTER.ISO / files / fwp-0.0.6-win32-installer.exe / Laser.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  2005-01-07  |  696 b   |  35 lines

  1. #include "Laser.h"
  2.  
  3. #include "Game.h"
  4. #include "log.h"
  5.  
  6. Laser::Laser(Vehicle* vehicle, vec3_t mountPoint): Weapon(vehicle, mountPoint){
  7.     this->type = GAME_WEAPON_LASER;
  8.     this->name = "Laser";
  9.     this->model = Game::preloadedGameMedia.laserModel;
  10.  
  11.     this->maxAmmo = 0;
  12.     this->ammo = 0;
  13.     this->ammoCosts = 0;
  14.     this->maxEnergy = 30;
  15.     this->energy = 30.0f;
  16.     this->energyCosts = 5;
  17.  
  18.     fireIntervalMillis = 300;
  19.  
  20.     vectorInit3d(0.0f, -0.19f, 0.85f, muzzlePoint);
  21.  
  22.     this->animator = new Animator( *Game::preloadedGameMedia.laserAnimator );
  23. }
  24.  
  25. void Laser::fire(){
  26. //    if(!isReadyToFire())
  27. //        return;
  28.  
  29.  
  30. //    log("LASER FIRED!\n");
  31.     // TODO: tja, mach mal...
  32.     Weapon::fire();
  33. }
  34.  
  35.