Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10618 in orxonox.OLD for trunk/src/world_entities


Ignore:
Timestamp:
Apr 4, 2007, 12:13:53 PM (18 years ago)
Author:
bknecht
Message:

merged cleanup into trunk (only improvements)

Location:
trunk
Files:
46 deleted
46 edited
46 copied

Legend:

Unmodified
Added
Removed
  • trunk

    • Property svn:ignore
      •  

        old new  
        1616OrxonoxPlayability.kdevses
        1717OrxonoxPlayability.kdevelop.pcs
         18orxonox.backtrace
         19orxonox.kdevses
         20orxonox.kdevelop.pcs
  • trunk/src/world_entities/Makefile.am

    r10437 r10618  
    77## THESE ARE THE BASE CLASSES OF ALL WORLD_ENTITIES
    88libORXwe_a_SOURCES = world_entity.cc \
    9                      cameraman.cc \
     9                     tools/cameraman.cc \
    1010                     playable.cc\
    1111                     player.cc \
     
    1818                     projectiles/projectile.cc \
    1919                     extendable.cc\
    20                      power_ups/power_up.cc \
    21                      power_ups/param_power_up.cc \
    22                      power_ups/weapon_power_up.cc\
    23                      spawning_point.cc\
     20                     items/power_ups/power_up.cc \
     21                     items/power_ups/param_power_up.cc \
     22                     items/power_ups/weapon_power_up.cc\
     23                     tools/spawning_point.cc\
    2424                     effects/explosion.cc\
    2525                     effects/billboard.cc\
     
    3131
    3232noinst_HEADERS = world_entity.h\
    33                  cameraman.h\
     33                 tools/cameraman.h\
    3434                 extendable.h\
    3535                 playable.h \
     
    4242                 weapons/ammo_container.h\
    4343                 projectiles/projectile.h \
    44                  power_ups/power_up.h\
    45                  power_ups/param_power_up.h\
    46                  power_ups/weapon_power_up.h \
    47                  spawning_point.h\
     44                 items/power_ups/power_up.h\
     45                 items/power_ups/param_power_up.h\
     46                 items/power_ups/weapon_power_up.h \
     47                 tools/spawning_point.h\
    4848                 effects/explosion.h\
    4949                 effects/billboard.h\
  • trunk/src/world_entities/WorldEntities.am

    r10516 r10618  
    1414                world_entities/npcs/mover.cc \
    1515                \
    16                 world_entities/environment.cc \
    17                 world_entities/skysphere.cc \
    18                 world_entities/skybox.cc \
    19                 world_entities/skydome.cc \
    20                 world_entities/terrain.cc \
    21                 world_entities/satellite.cc \
    22                 world_entities/movie_entity.cc \
    23                 world_entities/recorder.cc \
    24                 world_entities/character_attributes.cc \
    25                 world_entities/test_entity.cc \
    26                 world_entities/test_entity2.cc \
    27                 world_entities/blackscreen.cc \
    28                 world_entities/scrolling_screen.cc \
    29                 world_entities/planet.cc \
    30                 world_entities/bsp_entity.cc \
    31                 world_entities/mount_point.cc \
    32                 world_entities/sound_entity.cc \
    33                 world_entities/camera.cc \
    34                 \
    35                 world_entities/questGUI/quest_gui.cc \
    36                 world_entities/questGUI/quest.cc \
    3716                \
    3817                world_entities/weapons/weapon_slot.cc \
     
    5231                world_entities/weapons/heavy_blaster.cc \
    5332                world_entities/weapons/swarm_launcher.cc \
    54                 world_entities/weapons/spike_launcher.cc \
    5533                world_entities/weapons/spike_thrower.cc \
    5634                world_entities/weapons/acid_launcher.cc \
     
    7452                world_entities/projectiles/spike_ball.cc \
    7553                \
    76                 world_entities/power_ups/turret_power_up.cc \
    77                 world_entities/power_ups/laser_power_up.cc \
     54                world_entities/items/power_ups/turret_power_up.cc \
     55                world_entities/items/power_ups/laser_power_up.cc \
    7856                \
    7957                world_entities/space_ships/space_ship.cc \
     
    9270                world_entities/environments/model_entity.cc \
    9371                world_entities/environments/building.cc \
    94                 world_entities/environments/rotor.cc \
     72                world_entities/environments/rotor.cc \
    9573                world_entities/environments/mapped_water.cc \
    96                 \
    97                 world_entities/elements/image_entity.cc \
    98                 world_entities/elements/text_element.cc \
    99                 world_entities/elements/glgui_radar.cc \
    100                 \
    101                 world_entities/effects/lightning_bolt.cc \
    102                 world_entities/effects/blink.cc \
    103                 \
    104                 world_entities/script_trigger.cc \
    105                 \
    106                 \
    107                 world_entities/particles/particle_emitter.cc \
    108                 world_entities/particles/dot_emitter.cc \
    109                 world_entities/particles/box_emitter.cc \
    110                 world_entities/particles/plane_emitter.cc \
    111         world_entities/particles/emitter_node.cc \
    112                 \
    113                 world_entities/particles/particle_system.cc \
    114                 world_entities/particles/sprite_particles.cc \
    115                 world_entities/particles/spark_particles.cc \
    116                 world_entities/particles/model_particles.cc \
    117                 world_entities/particles/dot_particles.cc \
    118                 \
    119                 world_entities/particles/quick_animation.cc \
     74                world_entities/environments/environment.cc \
     75                world_entities/environments/skysphere.cc \
     76                world_entities/environments/skybox.cc \
     77                world_entities/environments/skydome.cc \
     78                world_entities/environments/terrain.cc \
     79                world_entities/environments/planet.cc \
     80                world_entities/environments/bsp_entity.cc \
    12081                \
    12182                \
     
    12990                world_entities/weather_effects/snow_effect.cc \
    13091                world_entities/weather_effects/lightning_effect.cc \
    131                 world_entities/weather_effects/lense_flare.cc
     92                world_entities/weather_effects/lense_flare.cc \
     93                world_entities/elements/image_entity.cc \
     94                \
     95                world_entities/elements/text_element.cc \
     96                world_entities/elements/glgui_radar.cc \
     97                \
     98                world_entities/effects/lightning_bolt.cc \
     99                world_entities/effects/blink.cc \
     100                \
     101                world_entities/tools/movie_entity.cc \
     102                world_entities/tools/recorder.cc \
     103                world_entities/tools/blackscreen.cc \
     104                world_entities/tools/scrolling_screen.cc \
     105                world_entities/tools/mount_point.cc \
     106                world_entities/tools/sound_entity.cc \
     107                world_entities/tools/camera.cc \
     108                world_entities/tools/script_trigger.cc \
     109                \
     110                \
     111                world_entities/particles/particle_emitter.cc \
     112                world_entities/particles/dot_emitter.cc \
     113                world_entities/particles/box_emitter.cc \
     114                world_entities/particles/plane_emitter.cc \
     115                world_entities/particles/emitter_node.cc \
     116                world_entities/particles/particle_system.cc \
     117                world_entities/particles/sprite_particles.cc \
     118                world_entities/particles/spark_particles.cc \
     119                world_entities/particles/model_particles.cc \
     120                world_entities/particles/dot_particles.cc \
     121                world_entities/particles/quick_animation.cc \
     122                \
     123                \
     124                \
     125                world_entities/questGUI/quest_gui.cc \
     126                world_entities/questGUI/quest.cc
     127
    132128
    133129
     
    147143                npcs/mover.h \
    148144                \
    149                 environment.h \
    150                 skysphere.h \
    151                 skybox.h \
    152                 skydome.h \
    153                 terrain.h \
    154                 satellite.h \
    155                 movie_entity.h \
    156                 recorder.h \
     145                environments/environment.h \
     146                environments/skysphere.h \
     147                environments/skybox.h \
     148                environments/skydome.h \
     149                environments/terrain.h \
     150                tools/movie_entity.h \
     151                tools/recorder.h \
    157152                character_attributes.h \
    158                 test_entity.h \
    159                 test_entity2.h \
    160                 blackscreen.h \
    161                 scrolling_screen.h \
    162                 planet.h \
    163                 bsp_entity.h \
    164                 mount_point.h \
    165                 sound_entity.h \
    166                 camera.h \
     153                tools/blackscreen.h \
     154                tools/scrolling_screen.h \
     155                environments/planet.h \
     156                environments/bsp_entity.h \
     157                tools/mount_point.h \
     158                tools/sound_entity.h \
     159                tools/camera.h \
    167160                \
    168161                questGUI/quest_gui.h \
     
    185178                weapons/heavy_blaster.h \
    186179                weapons/swarm_launcher.h \
    187                 weapons/spike_launcher.h \
    188180                weapons/spike_thrower.h \
    189181                weapons/acid_launcher.h \
     
    208200                projectiles/spike_ball.h \
    209201                \
    210                 power_ups/turret_power_up.h \
    211                 power_ups/laser_power_up.h \
     202                items/power_ups/turret_power_up.h \
     203                items/power_ups/laser_power_up.h \
    212204                \
    213205                space_ships/space_ship.h \
  • trunk/src/world_entities/creatures/fps_player.cc

    r10567 r10618  
    3232
    3333#include "aabb.h"
    34 #include "bsp_entity.h"
     34#include "environments/bsp_entity.h"
    3535
    3636#include "key_mapper.h"
     
    381381  if( !this->isOnGround())
    382382  {
    383     this->fallVelocity += 300.0f * time;
     383    if(this->fallVelocity + 300.0F*time < 10000.0f)this->fallVelocity += 300.0f * time;
    384384    velocity -= Vector(0.0, 1.0, 0.0) * this->fallVelocity;
    385385
     
    390390    this->fallVelocity = 0.0f;
    391391  }
    392 
    393   this->shiftCoor( velocity*time );
    394 
    395 
     392  if((velocity *time).len() < 10.0f) this->shiftCoor( velocity*time );
     393  else{ 
     394         velocity.normalize();
     395         velocity *= 10.0f;
     396         this->shiftCoor( velocity );
     397       }
    396398
    397399
  • trunk/src/world_entities/effects/billboard.cc

    r10501 r10618  
    2222#include "glincl.h"
    2323#include "state.h"
    24 #include "cameraman.h"
    25 #include "camera.h"
     24#include "tools/cameraman.h"
     25#include "tools/camera.h"
    2626
    2727#include "debug.h"
     
    134134  this->material->select();
    135135
    136   const CameraMan* man = State::getCameraman();
    137   const Camera* camera = man->getCurrentCam(); //!< @todo MUST be different
     136  const Camera* camera = State::getCamera();
    138137  Vector cameraPos = camera->getAbsCoor();
    139138  Vector cameraTargetPos = camera->getTarget()->getAbsCoor();
  • trunk/src/world_entities/effects/blink.cc

    r10530 r10618  
    11/*
     2   orxonox - the future of 3D-vertical-scrollers
    23
    34   Copyright (C) 2006 orx
  • trunk/src/world_entities/effects/trail.cc

    r10511 r10618  
    2121#include "util/loading/load_param.h"
    2222#include "util/loading/factory.h"
    23 
    24 #include "quaternion.h"
    25 #include "vector.h"
    2623
    2724#include "graphics_engine.h"
  • trunk/src/world_entities/effects/wobblegrid.cc

    r10557 r10618  
    2424#include "grid.h"
    2525
    26 #include "cameraman.h"
    27 #include "camera.h"
    28 
    29 #include <assert.h>
     26#include "tools/cameraman.h"
     27#include "tools/camera.h"
     28
     29#include <cassert>
    3030#include "debug.h"
    3131
     
    9393  this->angularSpeed = M_PI; //180;
    9494  this->setModel(this->grid);
     95 
     96  this->angle = 0;
    9597
    9698  this->setUpdateFunction((*sinf));
     
    201203void Wobblegrid::orient()
    202204{
    203      
    204      CameraMan* cman = State::getCameraman();
    205      Camera* c = cman->getCurrentCam();
     205
     206  Camera* c = State::getCamera();
    206207
    207208  Vector view = this->getAbsCoor() - c->getAbsCoor();
  • trunk/src/world_entities/elements/glgui_energywidgetvertical.cc

    r10516 r10618  
    6666    this->_image->setBackgroundTexture(Texture());
    6767    this->_image->setBackgroundColor(Color(1,1,1,0));
    68     this->_image->loadImageFromFile("textures/evil-flower.png");
     68//     this->_image->loadImageFromFile("textures/evil-flower.png");
    6969    //this->_image.setRelCoor2D(borderLeft(), borderTop() + this->_bar.getSizeX2D());
    7070    this->_image->setRelCoor2D(0,0);
  • trunk/src/world_entities/extendable.h

    r9869 r10618  
    1313
    1414
    15 #include "power_ups/power_up.h"
     15#include "items/power_ups/power_up.h"
    1616//! A class for Extendable Entities
    1717class Extendable : virtual public BaseObject {
  • trunk/src/world_entities/npcs/generic_npc.cc

    r10511 r10618  
    3131#include "sound/resource_sound_buffer.h"
    3232
    33 #include "bsp_entity.h"
     33#include "environments/bsp_entity.h"
    3434
    3535
  • trunk/src/world_entities/npcs/mover.cc

    r10519 r10618  
    2121#include "mover.h"
    2222#include "state.h"
    23 #include "camera.h"
     23#include "tools/camera.h"
    2424
    2525
  • trunk/src/world_entities/npcs/npc.cc

    r10552 r10618  
    4646#include "weapons/heavy_blaster.h"
    4747#include "weapons/swarm_launcher.h"
    48 #include "weapons/spike_launcher.h"
    4948#include "weapons/spike_thrower.h"
    5049#include "weapons/acid_launcher.h"
     
    5352#include "weapons/cannon.h"
    5453
    55 #include "mount_point.h"
     54#include "tools/mount_point.h"
    5655#include "weapons/weapon_slot.h"
    5756
  • trunk/src/world_entities/npcs/npc_test1.cc

    r9869 r10618  
    2222
    2323#include "state.h"
    24 #include "power_ups/turret_power_up.h"
    25 #include "power_ups/laser_power_up.h"
     24#include "items/power_ups/turret_power_up.h"
     25#include "items/power_ups/laser_power_up.h"
    2626
    2727ObjectListDefinition(NPCTest1);
  • trunk/src/world_entities/particles/sprite_particles.cc

    r10532 r10618  
    2323#include "state.h"
    2424#include "shell_command.h"
    25 #include "camera.h"
    26 #include "cameraman.h"
     25#include "tools/camera.h"
     26#include "tools/cameraman.h"
    2727
    2828
     
    141141//     Vector view = cameraTargetPos - cameraPos;
    142142
    143     const CameraMan* man = State::getCameraman();
    144     const Camera* camera = man->getCurrentCam(); //!< @todo MUST be different
     143    Camera* camera = State::getCamera();
    145144    Vector cameraPos = camera->getAbsCoor();
    146145    Vector cameraTargetPos = camera->getTarget()->getAbsCoor();
  • trunk/src/world_entities/playable.cc

    r10368 r10618  
    2121#include "player.h"
    2222#include "state.h"
    23 #include "camera.h"
     23#include "tools/camera.h"
    2424
    2525#include "util/loading/load_param.h"
    2626
    27 #include "power_ups/weapon_power_up.h"
    28 #include "power_ups/param_power_up.h"
     27#include "items/power_ups/weapon_power_up.h"
     28#include "items/power_ups/param_power_up.h"
    2929
    3030#include "game_rules.h"
  • trunk/src/world_entities/projectiles/hbolt.cc

    r10545 r10618  
    4949
    5050  this->angle = 0;
    51   this->rotationSpeed = 600;
     51//   this->rotationSpeed = 600;
    5252
    5353  this->emitter = new DotEmitter(100, 5, M_2_PI);
     
    146146    this->deactivate();
    147147
    148   this->angle += this->rotationSpeed * dt;
     148  this->angle += HBolt::rotationSpeed * dt;
    149149
    150150  for( ObjectList<NPC>::const_iterator eIterator = NPC::objectList().begin(); eIterator !=NPC::objectList().end(); eIterator++)
     
    177177  glPushAttrib(GL_ENABLE_BIT);
    178178  glDisable(GL_LIGHTING);
    179   glDisable(GL_FOG);
     179//   glDisable(GL_FOG);
    180180
    181181  glMatrixMode(GL_MODELVIEW);
    182182  glPushMatrix();
    183183
    184 
    185   glTranslatef (this->getAbsCoor ().x,
    186                   this->getAbsCoor ().y,
    187                   this->getAbsCoor ().z);
    188 
    189   this->halo->draw();
    190 
    191   Vector tmpRot = this->getAbsDir().getSpacialAxis();
    192   glRotatef (this->getAbsDir().getSpacialAxisAngle(), tmpRot.x, tmpRot.y, tmpRot.z );
    193   glRotatef(this->angle, 0.0, 0.0, 1.0);
    194 
    195   this->getModel()->draw();
     184//     float matrix[4][4];
     185    glTranslatef (this->getAbsCoor ().x, this->getAbsCoor ().y, this->getAbsCoor ().z);
     186    Vector tmpRot = this->getAbsDir().getSpacialAxis();
     187    glRotatef (this->getAbsDir().getSpacialAxisAngle(), tmpRot.x, tmpRot.y, tmpRot.z );
     188    glRotatef(this->angle, 0.0, 0.0, 1.0);
     189//     glMultMatrixf((float*)matrix);
     190    this->getModel()->draw();
     191    this->halo->draw();
    196192
    197193  glPopMatrix();
  • trunk/src/world_entities/projectiles/hbolt.h

    r10368 r10618  
    4242
    4343    float                             angle;
    44     float                             rotationSpeed;
     44    static const float                rotationSpeed = 600;
    4545
    4646    Billboard*                        halo;
  • trunk/src/world_entities/projectiles/lbolt.cc

    r10545 r10618  
    5959
    6060  this->angle = 0;
    61   this->rotationSpeed = 130;
    6261
    6362  this->halo = new Billboard();
     
    148147    this->deactivate();
    149148
    150   angle += rotationSpeed * dt;
     149  angle += LBolt::rotationSpeed * dt;
    151150
    152151  for( ObjectList<NPC>::const_iterator eIterator = NPC::objectList().begin(); eIterator !=NPC::objectList().end(); eIterator++)
     
    182181  glPushMatrix();
    183182
    184   float matrix[4][4];
    185   glTranslatef (this->getAbsCoor ().x, this->getAbsCoor ().y, this->getAbsCoor ().z);
     183    float matrix[4][4];
     184    glTranslatef (this->getAbsCoor ().x, this->getAbsCoor ().y, this->getAbsCoor ().z);
     185    Vector tmpRot = this->getAbsDir().getSpacialAxis();
     186    glRotatef (this->getAbsDir().getSpacialAxisAngle(), tmpRot.x, tmpRot.y, tmpRot.z );
     187    glRotatef(this->angle, 1.0, 0.0, 0.0);
     188    this->getAbsDir().matrix (matrix);
     189    glMultMatrixf((float*)matrix);
     190    this->getModel()->draw();
    186191
    187   glRotatef(angle, 1.0, 0.0, 0.0);
    188   this->getAbsDir().matrix (matrix);
    189   glMultMatrixf((float*)matrix);
    190   this->getModel()->draw();
    191 
    192   this->halo->draw();
     192    this->halo->draw();
    193193
    194194  glPopMatrix();
    195 
    196195  glPopAttrib();
    197196}
  • trunk/src/world_entities/projectiles/lbolt.h

    r10368 r10618  
    4343
    4444    float                             angle;
    45     float                             rotationSpeed;
     45    static const float                rotationSpeed = 1080;
    4646
    4747    Billboard*                        halo;
  • trunk/src/world_entities/projectiles/mbolt.cc

    r10545 r10618  
    8282  //this->trail->setParent( this);
    8383  this->trail->setTexture( "textures/laser.png");
    84   this->trail->setAbsCoor(this->getAbsCoor() - Vector(.7,0,0));
     84//   this->trail->setAbsCoor(this->getAbsCoor() - Vector(.7,0,0));
     85  this->trail->setAbsCoor(this->getAbsCoor() - this->getVelocity().getNormalized() * .7);
    8586
    8687}
  • trunk/src/world_entities/projectiles/projectile_weapon.h

    r10368 r10618  
    11/*!
    22 * @file projectile_weapon.h
    3  * a projectile_weapon, that is been shooted by a weapon
     3 * a projectile_weapon is a projetile fireing projectile.
    44 *
    5  * You can use this class to make some ProjectileWeapons/Bullets/Lasers/Rockets/etc.
     5 * You can use this class to make some Multi-Stage Projectiles.
     6 * See Spike_Ball for an implemeted example.
    67 *
    78 */
  • trunk/src/world_entities/projectiles/swarm_projectile.cc

    r10547 r10618  
    3939SwarmProjectile::SwarmProjectile () : Projectile()
    4040{
    41 
    42 /*  this->loadModel("models/projectiles/orx-rocket.obj", 0.5);*/
    43   this->loadModel("models/projectiles/swarm_projectile.obj", .25); // no double rescale (see draw())
     41  this->loadModel("models/projectiles/swarm_projectile.obj", .333); // no double rescale (see draw())
    4442  this->loadExplosionSound("sounds/explosions/explosion_4.wav");
    4543
     
    5957  this->elecDamage = 0;
    6058
    61   this->trail = new Trail(2.5,4,.2, this);
    62   //this->trail->setParent( this);
     59  this->trail = new Trail(2.5, 4, .2, this);
    6360  this->trail->setTexture( "textures/laser.png");
     61
     62//   this->maxVelocity = 300;
     63
     64  this->smoke = new Trail(20, 10, .3, this);
     65  this->smoke->setTexture ("textures/engine.png");
     66
     67  this->angle = 0;
     68
    6469
    6570
     
    8388  // delete this->emitter;
    8489  delete this->trail;
     90  delete this->smoke;
    8591}
    8692
     
    113119  this->setHealth(10.0* (float)rand()/(float)RAND_MAX);
    114120
    115   this->maxVelocity = 300;
    116 
    117   this->rotationSpeed = 360;
     121//   this->maxVelocity = 300;
     122
     123//   this->rotationSpeed = 360;
    118124  this->angle = 0;
    119125
     
    216222
    217223  this->trail->tick(time);
     224  this->smoke->tick(time);
    218225
    219226  this->angle += this->rotationSpeed * time;
     227
    220228  while (this->angle > 360)
     229  {
    221230    this->angle -= 360;
     231  }
    222232
    223233  this->lastDir = this->curDir;
     
    272282  glTranslatef(-.9,0,0);
    273283  this->trail->draw();
     284  glTranslatef( -1.1, 0, 0);
     285  this->smoke->draw();
    274286  glPopMatrix();
    275287}
  • trunk/src/world_entities/projectiles/swarm_projectile.h

    r10368 r10618  
    11/*!
    22 * @file swarm_projectile.h
    3  * @brief a SwarmProjectile Projectile
     3 * @brief a Swarm_Missile Projectile
    44*/
    55
     
    4040
    4141    Trail*                            trail;
     42    Trail*                            smoke;
    4243
    4344    ParticleEmitter*                  emitter;
    4445    float                             agility;
    45     float                             maxVelocity;
     46    const static float                maxVelocity = 100;
    4647    float                             speed;
    4748    Vector                            diffVector ;
     
    5758
    5859    // spinning missle
    59     float                             rotationSpeed;
     60    const static float                rotationSpeed = 360;
    6061    float                             angle;
    6162};
  • trunk/src/world_entities/questGUI/quest.cc

    r10374 r10618  
    2222#include "quest.h"
    2323
    24 #include "event_handler.h"
    25 
    26 #include "state.h"
    27 
    2824#include "util/loading/load_param.h"
    2925#include "util/loading/factory.h"
    3026
    31 #include "graphics_engine.h"
    32 #include "camera.h"
    33 #include "sound_engine.h"
     27#include "glgui.h"
    3428
    35 #include "sound_source.h"
    36 
    37 #include "glgui.h"
    38 #include "menu/glgui_imagebutton.h"
    39 #include "glgui_multiline_text.h"
    40 #include <glgui_image.h>
    41 
    42 
    43 #include "shell_command.h"
    4429
    4530
     
    5237  this->registerObject(this, Quest::_objectList);
    5338 
    54   this->Status = false;
     39  this->status = false;
    5540
    5641  if( root != NULL)
     
    9681void Quest::setQuestActive()
    9782{
    98   this->Status = true;
     83  this->status = true;
    9984}
    10085
    10186void Quest::setQuestInactive()
    10287{
    103   this->Status = false;
     88  this->status = false;
    10489}
    105 
    106 const bool Quest::getQuestStatus()
    107 {
    108   return this->Status;
    109 }
  • trunk/src/world_entities/questGUI/quest.h

    r10374 r10618  
    2020   virtual void loadParams(const TiXmlElement* root = NULL);
    2121   
    22    inline void setQuestName(const std::string& questName)                { this->questName = questName; }
    23    inline const std::string& getQuestName()                              { return this->questName; }
    24    inline void setQuestDescription(const std::string& questDescription)  { this->questDescription = questDescription; }
    25    inline const std::string& getQuestDescription()                       { return this->questDescription; }
    26    inline void setQuestPicture(const std::string& questPicture)          { this->questPicture = questPicture; }
    27    inline const std::string& getQuestPicture()                           { return this->questPicture; }
    28    inline void setQuestDifficulty(const std::string& questDifficulty)    { this->questDifficulty = questDifficulty; }
    29    inline const std::string& getQuestDifficulty()                        { return this->questDifficulty; }
     22   inline void setQuestName(const std::string& questName) { this->questName = questName; }
     23   inline const std::string& getQuestName() const { return this->questName; }
    3024   
    31    inline void setQuestPersons(const std::string& questPersons)          { this->questPersons = questPersons; }
    32    inline const std::string& getQuestPersons()                        { return this->questPersons; }
     25   inline void setQuestDescription(const std::string& questDescription) { this->questDescription = questDescription; }
     26   inline const std::string& getQuestDescription() const { return this->questDescription; }
    3327   
    34    inline void setRewardDescription(const std::string& rewardDescription){ this->rewardDescription  = rewardDescription; }
    35    inline const std::string& getRewardDescription()                      { return this->rewardDescription; }
    36    inline void setRewardPicture(const std::string& rewardPicture)        { this->rewardPicture  = rewardPicture; }
    37    inline const std::string& getRewardPicture()                          { return this->rewardPicture; }
     28   inline void setQuestPicture(const std::string& questPicture) { this->questPicture = questPicture; }
     29   inline const std::string& getQuestPicture() const { return this->questPicture; }
     30   
     31   inline void setQuestDifficulty(const std::string& questDifficulty) { this->questDifficulty = questDifficulty; }
     32   inline const std::string& getQuestDifficulty() const { return this->questDifficulty; }
     33   
     34   inline void setQuestPersons(const std::string& questPersons) { this->questPersons = questPersons; }
     35   inline const std::string& getQuestPersons() const { return this->questPersons; }
     36   
     37   inline void setRewardDescription(const std::string& rewardDescription) { this->rewardDescription  = rewardDescription; }
     38   inline const std::string& getRewardDescription() const { return this->rewardDescription; }
     39   
     40   inline void setRewardPicture(const std::string& rewardPicture) { this->rewardPicture  = rewardPicture; }
     41   inline const std::string& getRewardPicture() const { return this->rewardPicture; }
     42   
    3843   void setQuestActive();
    3944   void setQuestInactive();
    40    const bool getQuestStatus();
     45   const bool getQuestStatus() const { return status; };
    4146   
    4247
    4348   
    4449  private:
    45     bool                    Status;
     50    bool                    status;
    4651    std::string             questName;
    4752    std::string             questDescription;
  • trunk/src/world_entities/questGUI/quest_gui.cc

    r10507 r10618  
    33/*
    44   orxonox - the future of 3D-vertical-scrollers
    5 
     5 
    66   Copyright (C) 1004 orx
    7 
     7 
    88   This program is free software; you can redistribute it and/or modify
    99   it under the terms of the GNU General Public License as published by
    1010   the Free Software Foundation; either version 2, or (at your option)
    1111   any later version.
    12 
     12 
    1313   ### File Specific:
    1414   main-programmer    std::string             questName;
     
    1818    std::string             rewardDescription;
    1919    std::string             rewardPicture;: Andreas Hejj
    20 
     20 
    2121*/
    2222
     
    2727#include "quest_gui.h"
    2828
    29 #include "event_handler.h"
    30 
    31 #include "state.h"
    32 
    3329#include "util/loading/load_param.h"
    3430#include "util/loading/factory.h"
    3531
    36 #include "graphics_engine.h"
    37 #include "camera.h"
    3832#include "sound_engine.h"
    3933
    40 #include "sound_source.h"
    41 
    42 #include "glgui_widget.h"
     34
    4335#include "glgui.h"
    4436#include "menu/glgui_imagebutton.h"
    4537#include "glgui_multiline_text.h"
    46 #include <glgui_image.h>
    4738
    4839#include "event_handler.h"
     
    5041#include "quest.h"
    5142
    52 #include "shell_command.h"
    53 
    5443ObjectListDefinition(QuestGUI);
    55 
    5644CREATE_FACTORY(QuestGUI);
    57 
    58 
    5945
    6046#include "script_class.h"
    6147CREATE_SCRIPTABLE_CLASS(QuestGUI,
    6248                        addMethod("startGUI", Executor0<QuestGUI, lua_State*>(&QuestGUI::startGUI))
    63                       ->addMethod("stopGUI",  Executor0<QuestGUI, lua_State*>(&QuestGUI::stopGUI))
    64                       ->addMethod("isActive", Executor0ret<QuestGUI, lua_State*,bool>(&QuestGUI::isActive))
     49                        ->addMethod("stopGUI",  Executor0<QuestGUI, lua_State*>(&QuestGUI::stopGUI))
     50                        ->addMethod("isActive", Executor0ret<QuestGUI, lua_State*,bool>(&QuestGUI::isActive))
    6551                       );
    6652
     
    6955QuestGUI::QuestGUI(const TiXmlElement* root)
    7056{
     57  this->questBox = NULL;
     58  this->bKillGui = false;
     59  this->bActive = false;
     60
    7161  if (root != NULL)
    7262  {
    73   this->registerObject(this, QuestGUI::_objectList);
    74 
    75   this->toList(OM_GROUP_00);
    76 
    77   this->questBox = NULL;
    78 
    79   this->bKillGui = false;
    80 
    81   this->bActive = false;
    82 
    83   this->myQuest = new Quest(root);
    84 
    85   if(root)
    86     this->loadParams( root);
     63    this->registerObject(this, QuestGUI::_objectList);
     64    this->toList(OM_GROUP_00);
     65    this->myQuest = new Quest(root);
     66
     67    if(root)
     68      this->loadParams( root);
    8769  }
    8870}
     
    11597{
    11698  this->bKillGui = false;
    117 
    11899
    119100  if (questBox == NULL)
     
    254235void QuestGUI::stopGUI()
    255236{
    256     this->bKillGui = true;
     237  this->bKillGui = true;
    257238}
    258239
  • trunk/src/world_entities/questGUI/quest_gui.h

    r10492 r10618  
    44
    55#include "world_entity.h"
    6 #include "glgui.h"
    7 #include <glgui_image.h>
    8 #include <vector>
    96
    107class Quest;
     8namespace OrxGui { class GLGuiBox; }
    119
    1210class QuestGUI : public WorldEntity
     
    2826
    2927  private:
    30     Quest*                  myQuest;
    31     bool                    bKillGui;
    32     bool                    bActive;
     28    Quest*                 myQuest;
     29    bool                   bKillGui;
     30    bool                   bActive;
    3331
    34     OrxGui::GLGuiBox*       headerBox;
    35     OrxGui::GLGuiBox*       outlineBox;
    36     OrxGui::GLGuiBox*       labelBox;
    37     OrxGui::GLGuiImage*     placeImage;
    3832    OrxGui::GLGuiBox*       questBox;
    39     OrxGui::GLGuiImage*     questImage;
    40     OrxGui::GLGuiBox*       rewardBox;
    41     OrxGui::GLGuiImage*     rewardImage;
    42     OrxGui::GLGuiBox*       answerBox;
    43     OrxGui::GLGuiImage*     placeImage2;
    44     OrxGui::GLGuiBox*       acceptBox;
    45     OrxGui::GLGuiBox*       refuseBox;
    46 
    47 
    48     OrxSound::SoundSource*  selectorSource;
     33   
     34   
    4935
    5036    void accept();
  • trunk/src/world_entities/space_ships/space_ship.cc

    r10552 r10618  
    2727#include "weapons/heavy_blaster.h"
    2828#include "weapons/swarm_launcher.h"
    29 #include "weapons/spike_launcher.h"
    3029#include "weapons/spike_thrower.h"
    3130#include "weapons/acid_launcher.h"
     
    5049#include "shared_network_data.h"
    5150
    52 #include "power_ups/weapon_power_up.h"
    53 #include "power_ups/param_power_up.h"
     51#include "items/power_ups/weapon_power_up.h"
     52#include "items/power_ups/param_power_up.h"
    5453
    5554#include "graphics_engine.h"
     
    5958#include "state.h"
    6059#include "player.h"
    61 #include "camera.h"
    62 #include "cameraman.h"
     60#include "tools/camera.h"
     61#include "tools/cameraman.h"
    6362
    6463
     
    6766
    6867#include "track/track.h"
    69 #include "math.h"
    7068
    7169
     
    616614  {
    617615    this->bRight = event.bPressed;
    618     printf("ShipCoors: %f , %f, %f \n", this->getAbsCoor().x, this->getAbsCoor().y, this->getAbsCoor().z);
     616//     printf("ShipCoors: %f , %f, %f \n", this->getAbsCoor().x, this->getAbsCoor().y, this->getAbsCoor().z);
    619617  }
    620618  else if( event.type == KeyMapper::PEV_FORWARD)
     
    11431141void SpaceShip::setCameraDistance(float dist)
    11441142{
    1145 
    1146   CameraMan* cm = State::getCameraman();
    1147   Camera* c = cm->getCurrentCam();
     1143  Camera* c = State::getCamera();
    11481144  c->setViewTopDistance(dist);
    11491145
     
    11551151{
    11561152
    1157   CameraMan* cm = State::getCameraman();
    1158   Camera* c = cm->getCurrentCam();
     1153  Camera* c = State::getCamera();
    11591154  c->setViewTopFovy(fovy);
    11601155
     
    11651160void SpaceShip::updateTravelDistance()
    11661161{
    1167      CameraMan* cm = State::getCameraman();
    1168      Camera* c = cm->getCurrentCam();
    1169 
     1162
     1163  Camera* c = State::getCamera();
    11701164
    11711165  float x = 1.25 * this->actionWidthPercentage * fabsf(c->getAbsCoor().y) * tan(c->getFovy()*M_PI /360.0);
  • trunk/src/world_entities/spectator.cc

    r10401 r10618  
    2525#include "src/world_entities/npcs/generic_npc.h"
    2626
     27#include "src/lib/util/loading/load_param.h"
     28
     29#include "player.h"
     30
    2731
    2832ObjectListDefinition(Spectator);
    2933CREATE_FACTORY(Spectator);
    3034
    31 
     35Spectator* Spectator::ghost = NULL;
     36Playable* Spectator::regularPlayable = NULL;
    3237
    3338#include "state.h"
     39#include "shell_command.h"
     40             
     41SHELL_COMMAND( enableGhost, Spectator, enableGhost )
     42             ->describe("fly around")
     43             ->setAlias("ghost");
    3444
    3545
     
    109119/**
    110120 * loads the Settings of a Spectator from an XML-element.
    111  * @param root the XML-element to load the Spaceship's properties from
     121 * @param root the XML-element to load the Spectator's properties from
    112122 */
    113123void Spectator::loadParams(const TiXmlElement* root)
    114124{
    115125  Playable::loadParams(root);
     126 
     127  LoadParam(root, "allowGhost", this, Spectator, allowGhost)
     128    .describe("Allows the Player to fly around");
     129}
     130
     131
     132
     133void Spectator::allowGhost( bool flag )
     134{
     135  PRINTF(0)( "SPECTATOR ALLOWGHOST: %d\n", flag );
     136  if ( flag )
     137  {
     138    assert( ghost == NULL && "only one flySpectator allowed" );
     139   
     140    ghost = this;
     141  }
     142  else
     143  {
     144    ghost = NULL;
     145  }
     146}
     147
     148
     149void Spectator::enableGhost( )
     150{
     151  if ( !ghost )
     152  {
     153    Spectator* spec = new Spectator();
     154    spec->allowGhost( true );
     155  }
     156 
     157  if ( !regularPlayable )
     158  {
     159    if ( !State::getPlayer() || !State::getPlayer()->getPlayable() )
     160      return;
     161   
     162    regularPlayable = State::getPlayer()->getPlayable();
     163   
     164    ghost->setAbsCoor( regularPlayable->getAbsCoor() );
     165    ghost->setAbsDir( regularPlayable->getAbsDir() );
     166   
     167    State::getPlayer()->setPlayable( ghost );
     168  }
     169  else
     170  {
     171    if ( !State::getPlayer() || !State::getPlayer()->getPlayable() )
     172      return;
     173   
     174    State::getPlayer()->setPlayable( regularPlayable );
     175    regularPlayable = NULL;
     176  }
    116177}
    117178
     
    242303    this->yMouse += event.yRel;
    243304  }
    244   else if( event.type == KeyMapper::PEV_JUMP)
    245   {
     305  else if( event.type == KeyMapper::PEV_FIRE1 )
     306  {
     307    PRINTF(0)( "CURRENT POS: (%f, %f, %f) ROT (%f, (%f, %f, %f))\n", this->getAbsCoorX(), this->getAbsCoorY(), this->getAbsCoorZ(), this->getAbsDir().w, this->getAbsDir().v.x, this->getAbsDir().v.y, this->getAbsDir().v.z );
    246308//     FPSPlayer * fps = new FPSPlayer();
    247309//     //GenericNPC* fps = new GenericNPC();
     
    263325
    264326
     327
  • trunk/src/world_entities/spectator.h

    r9869 r10618  
    3030
    3131    virtual void process(const Event &event);
     32   
     33    void allowGhost( bool flag );
     34   
     35    static void enableGhost();
    3236
    3337  private:
     
    4549    float                 angleX;
    4650    float                 angleY;
     51   
     52    static Spectator*     ghost;
     53    static Playable*      regularPlayable;
    4754
    4855};
  • trunk/src/world_entities/weapons/acid_launcher.cc

    r10539 r10618  
    2929#include "util/state.h"
    3030
    31 #include "math/quaternion.h"
    32 
    3331#include "util/loading/factory.h"
    3432
     
    3937using namespace std;
    4038
    41 ObjectListDefinition(AcidLauncher);
    42 CREATE_FACTORY(AcidLauncher);
     39ObjectListDefinition ( AcidLauncher );
     40CREATE_FACTORY ( AcidLauncher );
    4341
    4442/**
     
    4846 */
    4947AcidLauncher::AcidLauncher()
    50   : Weapon()
     48    : Weapon()
    5149{
    5250  this->init();
     
    5654 * creates a new AcidLauncher from a TiXmlElement
    5755 */
    58 AcidLauncher::AcidLauncher(const TiXmlElement* root)
     56AcidLauncher::AcidLauncher ( const TiXmlElement* root )
    5957{
    6058  this->init();
    61   if (root != NULL)
    62     this->loadParams(root);
     59  if ( root != NULL )
     60    this->loadParams ( root );
    6361}
    6462
     
    7371void AcidLauncher::init()
    7472{
    75   this->registerObject(this, AcidLauncher::_objectList);
    76 /*
    77   Animation3D* animation1 = this->getAnimation(WS_ACTIVATING, this);
    78   Animation3D* animation2 = this->getAnimation(WS_DEACTIVATING, this);
     73  this->registerObject ( this, AcidLauncher::_objectList );
     74  /*
     75    Animation3D* animation1 = this->getAnimation(WS_ACTIVATING, this);
     76    Animation3D* animation2 = this->getAnimation(WS_DEACTIVATING, this);
    7977
    80   animation1->addKeyFrame(Vector(0, -.5, 0), Quaternion(), 0.3, ANIM_LINEAR, ANIM_CONSTANT);
    81   animation1->addKeyFrame(Vector(0, 0, 0), Quaternion(), 0.3, ANIM_LINEAR, ANIM_CONSTANT);
    82   animation2->addKeyFrame(Vector(0, 0, 0), Quaternion(), 0.3, ANIM_LINEAR, ANIM_CONSTANT);
    83   animation2->addKeyFrame(Vector(0, -.5, 0), Quaternion(), 0.3, ANIM_LINEAR, ANIM_CONSTANT);
     78    animation1->addKeyFrame(Vector(0, -.5, 0), Quaternion(), 0.3, ANIM_LINEAR, ANIM_CONSTANT);
     79    animation1->addKeyFrame(Vector(0, 0, 0), Quaternion(), 0.3, ANIM_LINEAR, ANIM_CONSTANT);
     80    animation2->addKeyFrame(Vector(0, 0, 0), Quaternion(), 0.3, ANIM_LINEAR, ANIM_CONSTANT);
     81    animation2->addKeyFrame(Vector(0, -.5, 0), Quaternion(), 0.3, ANIM_LINEAR, ANIM_CONSTANT);
    8482
    85   animation1->setInfinity(ANIM_INF_CONSTANT);
    86   animation2->setInfinity(ANIM_INF_CONSTANT);
    87 */
    88   this->setStateDuration(WS_SHOOTING, 1.0f);
     83    animation1->setInfinity(ANIM_INF_CONSTANT);
     84    animation2->setInfinity(ANIM_INF_CONSTANT);
     85  */
     86  this->setStateDuration ( WS_SHOOTING, 1.0f );
    8987
    90   this->setStateDuration(WS_RELOADING, 1.0f);
    91   this->setStateDuration(WS_ACTIVATING, .4);
    92   this->setStateDuration(WS_DEACTIVATING, .4);
     88  this->setStateDuration ( WS_RELOADING, 1.0f );
     89  this->setStateDuration ( WS_ACTIVATING, .4 );
     90  this->setStateDuration ( WS_DEACTIVATING, .4 );
    9391
    94   this->setEnergyMax(100);
    95   this->increaseEnergy(100);
     92  this->setEnergyMax ( 100 );
     93  this->increaseEnergy ( 100 );
    9694  //this->minCharge = 2;
    9795
    98   this->setCapability(WTYPE_ALLDIRS | WTYPE_TURRET | WTYPE_DIRECTIONAL | WTYPE_LIGHT);
    99   this->setProjectileTypeC("AcidSplash");
     96  this->setCapability ( WTYPE_ALLDIRS | WTYPE_TURRET | WTYPE_DIRECTIONAL | WTYPE_LIGHT );
     97  this->setProjectileTypeC ( "AcidSplash" );
    10098//   this->loadModel("models/guns/turret1.obj", 1.0);
    10199
    102   this->setEmissionPoint(2.0, 0, 0);
    103   this->getProjectileFactory()->prepare(10);
     100  this->setEmissionPoint ( 2.0, 0, 0 );
     101  this->getProjectileFactory()->prepare ( 10 );
    104102
    105   this->setActionSound(WA_SHOOT, "sounds/explosions/explosion_1.wav");
    106   this->setActionSound(WA_ACTIVATE, "sounds/voices/rockets.wav");
    107   this->setActionSound(WA_RELOAD, "sounds/voices/reload.wav");
     103  this->setActionSound ( WA_SHOOT, "sounds/explosions/explosion_1.wav" );
     104  this->setActionSound ( WA_ACTIVATE, "sounds/voices/rockets.wav" );
     105//   this->setActionSound(WA_RELOAD, "sounds/voices/reload.wav");
    108106
    109107}
    110108
    111 void AcidLauncher::loadParams(const TiXmlElement* root)
     109void AcidLauncher::loadParams ( const TiXmlElement* root )
    112110{
    113   Weapon::loadParams(root);
     111  Weapon::loadParams ( root );
    114112}
    115113
    116114void AcidLauncher::activate()
    117 {
    118 }
     115{}
    119116
    120117void AcidLauncher::deactivate()
     118{}
     119
     120void AcidLauncher::tick ( float dt )
    121121{
    122 }
    123 
    124 void AcidLauncher::tick(float dt)
    125 {
    126   if (!Weapon::tickW(dt))
     122  if ( !Weapon::tickW ( dt ) )
    127123    return;
    128   if (this->energyWidget != NULL && !this->isEnergyWidgetInitialized)
    129   {
    130     this->energyWidget->setDisplayedImage("textures/gui/gui_acid.png");
     124  if ( this->energyWidget != NULL && !this->isEnergyWidgetInitialized ) {
     125    this->energyWidget->setDisplayedImage ( "textures/gui/gui_acid.png" );
    131126    this->isEnergyWidgetInitialized = true;
    132127  }
     
    157152
    158153  Projectile* pj = NULL;
    159   for( int i=0; i < 1; i++)
    160   {
    161       pj  = this->getProjectile();
    162       if (pj == NULL)
    163         return;
     154  for ( int i=0; i < 1; i++ ) {
     155    pj  = this->getProjectile();
     156    if ( pj == NULL )
     157      return;
    164158
    165       fired = true;
    166       pj->setVelocity(this->getVelocity()+(this->getAbsDir().apply(Vector(1,0,0))*165.0 + VECTOR_RAND(10)));
     159    fired = true;
     160    pj->setVelocity ( this->getVelocity() + ( this->getAbsDir().apply ( Vector ( 1,0,0 ) ) *165.0 + VECTOR_RAND ( 10 ) ) );
    167161
    168       pj->setParent(PNode::getNullParent());
    169       pj->setAbsCoor(this->getEmissionPoint() + VECTOR_RAND(.1));
    170       pj->setAbsDir(this->getAbsDir()+Quaternion(0,VECTOR_RAND(5)));
    171       pj->activate();
     162    pj->setParent ( PNode::getNullParent() );
     163    pj->setAbsCoor ( this->getEmissionPoint() + VECTOR_RAND ( .1 ) );
     164    pj->setAbsDir ( this->getAbsDir() +Quaternion ( 0,VECTOR_RAND ( 5 ) ) );
     165    pj->activate();
    172166  }
    173167}
  • trunk/src/world_entities/weapons/acid_launcher.h

    r10368 r10618  
    1212
    1313class AcidLauncher : public Weapon
    14   {
    15   ObjectListDeclaration(AcidLauncher);
     14{
     15    ObjectListDeclaration ( AcidLauncher );
    1616  public:
    1717    AcidLauncher ();
    18     AcidLauncher(const TiXmlElement* root);
     18    AcidLauncher ( const TiXmlElement* root );
    1919    virtual ~AcidLauncher ();
    2020
    2121    void init();
    22     virtual void loadParams(const TiXmlElement* root);
     22    virtual void loadParams ( const TiXmlElement* root );
    2323
    2424    virtual void activate();
    2525    virtual void deactivate();
    2626
    27     virtual void tick(float dt);
     27    virtual void tick ( float dt );
    2828    virtual void fire();
    2929
    3030
    3131  private:
    32   };
     32};
    3333
    3434#endif /* _ACID_LAUNCHER_H */
  • trunk/src/world_entities/weapons/aiming_turret.cc

    r10419 r10618  
    100100  this->setActionSound(WA_SHOOT, "sounds/explosions/explosion_3.wav");
    101101  this->setActionSound(WA_ACTIVATE, "sounds/voices/rockets.wav");
    102   this->setActionSound(WA_RELOAD, "sounds/voices/reload.wav");
     102//   this->setActionSound(WA_RELOAD, "sounds/voices/reload.wav");
    103103
    104104}
  • trunk/src/world_entities/weapons/boomerang_gun.cc

    r10419 r10618  
    9696  this->setActionSound(WA_SHOOT, "sounds/explosions/explosion_3.wav");
    9797  this->setActionSound(WA_ACTIVATE, "sounds/voices/rockets.wav");
    98   this->setActionSound(WA_RELOAD, "sounds/voices/reload.wav");
     98//   this->setActionSound(WA_RELOAD, "sounds/voices/reload.wav");
    9999
    100100}
  • trunk/src/world_entities/weapons/heavy_blaster.cc

    r10548 r10618  
     1/*
     2   orxonox - the future of 3D-vertical-scrollers
     3
     4   Copyright (C) 2004-2006 orx
     5
     6   This program is free software; you can redistribute it and/or modify
     7   it under the terms of the GNU General Public License as published by
     8   the Free Software Foundation; either version 2, or (at your option)
     9   any later version.
     10
     11   ### File Specific
     12   main-programmer: Marc Schaerrer, Nicolas Schlumberger
     13   co-programmer:
     14
     15*/
     16
    117#include "heavy_blaster.h"
    218#include "world_entities/projectiles/projectile.h"
  • trunk/src/world_entities/weapons/light_blaster.cc

    r10539 r10618  
     1/*
     2   orxonox - the future of 3D-vertical-scrollers
     3
     4   Copyright (C) 2004-2006 orx
     5
     6   This program is free software; you can redistribute it and/or modify
     7   it under the terms of the GNU General Public License as published by
     8   the Free Software Foundation; either version 2, or (at your option)
     9   any later version.
     10
     11   ### File Specific
     12   main-programmer: Marc Schaerrer, Nicolas Schlumberger
     13   co-programmer:
     14
     15*/
     16
    117#include "light_blaster.h"
    218#include "world_entities/projectiles/projectile.h"
     
    3955  for (int i = 0; i < this->getBarrels(); i++)
    4056  {
    41    delete [] this->shootAnim[i];
     57   //delete [] this->shootAnim[i];
    4258   delete [] this->objComp[i];
    4359  }
    4460  delete [] this->emissionPoint;
    45    delete [] this->shootAnim;
     61   //delete [] this->shootAnim;
    4662   delete [] this->objComp;
    4763
     
    8298  this->objComp = new PNode**[this->getBarrels()];
    8399  this->emissionPoint = new PNode*[this->getBarrels()];
    84   this->shootAnim = new Animation3D**[this->getBarrels()];
     100//   this->shootAnim = new Animation3D**[this->getBarrels()];
    85101  for (int i = 0; i < this->getBarrels(); i++)
    86102  {
    87103    this->objComp[i] = new PNode* [this->getSegs()];
    88104    this->emissionPoint[i] = new PNode;
    89     this->emissionPoint[i]->setParent(this);             //< One EmissionPoint, that is a PNode connected to the weapon. You can set this to the exitting point of the Projectiles
     105    this->emissionPoint[i]->setParent(this);
    90106    this->emissionPoint[i]->setName("EmissionPoint");
    91107    this->emissionPoint[i]->addNodeFlags(PNODE_PROHIBIT_DELETE_WITH_PARENT);
    92     this->shootAnim[i] = new Animation3D* [this->getSegs()];
     108//     this->shootAnim[i] = new Animation3D* [this->getSegs()];
    93109    for(int j = 0; j < this->getSegs(); j++)
    94110    {
    95111      this->objComp[i][j] = new PNode;
    96       this->shootAnim[i][j] = new Animation3D(this->objComp[i][j]);
    97       this->shootAnim[i][j]->setInfinity(ANIM_INF_CONSTANT);
     112//       this->shootAnim[i][j] = new Animation3D(this->objComp[i][j]);
     113//       this->shootAnim[i][j]->setInfinity(ANIM_INF_CONSTANT);
    98114    }
    99115  }
    100 
    101   for (int i = 0; i < this->getBarrels(); i++ )
    102     this->emissionPoint[i]->setRelCoor(Vector(1.19, 0.0, 0.1));
     116/*
     117  this->emissionPoint[0]->setRelCoor(Vector(1.19, 0.0, 0.1));
     118  this->emissionPoint[1]->setRelCoor(Vector(1.19, -0.07, -0.05));
     119  this->emissionPoint[2]->setRelCoor(Vector(1.19, 0.07, -0.05));*/
     120
     121  this->emissionPoint[0]->setRelCoor(Vector(2.2, 0.0, 0.1));
     122  this->emissionPoint[1]->setRelCoor(Vector(2.2, -0.07, -0.05));
     123  this->emissionPoint[2]->setRelCoor(Vector(2.2, 0.07, -0.05));
    103124
    104125//   Animation3D* animation1 = this->getAnimation(WS_SHOOTING, this);
     
    112133//   this->setEmissionPoint(3.8, 1.2, 0);
    113134
    114   for (int i = 0; i < this->getBarrels(); i++){
    115     this->shootAnim[i][0]->addKeyFrame(Vector(), Quaternion(i * 120, Vector(1.0, 0.0, 0.0)), 0.049, ANIM_NULL, ANIM_LINEAR);
    116     this->shootAnim[i][0]->addKeyFrame(Vector(), Quaternion((i+1)*120, Vector(1.0, 0.0, 0.0)), 0.001, ANIM_NULL, ANIM_LINEAR);
    117   }
     135//   for (int i = 0; i < this->getBarrels(); i++){
     136//     this->shootAnim[i][0]->addKeyFrame(Vector(), Quaternion(i * 120, Vector(1.0, 0.0, 0.0)), 0.049, ANIM_NULL, ANIM_LINEAR);
     137//     this->shootAnim[i][0]->addKeyFrame(Vector(), Quaternion((i+1)*120, Vector(1.0, 0.0, 0.0)), 0.001, ANIM_NULL, ANIM_LINEAR);
     138//   }
    118139
    119140
     
    144165  pj->activate();
    145166
    146   for (int i = 0; i < this->getSegs(); i++)
    147     this->shootAnim[this->activeBarrel][i]->replay();
     167//   for (int i = 0; i < this->getSegs(); i++)
     168//     this->shootAnim[this->activeBarrel][i]->replay();
    148169
    149170  // switch barrel
  • trunk/src/world_entities/weapons/medium_blaster.cc

    r10548 r10618  
     1/*
     2   orxonox - the future of 3D-vertical-scrollers
     3
     4   Copyright (C) 2004-2006 orx
     5
     6   This program is free software; you can redistribute it and/or modify
     7   it under the terms of the GNU General Public License as published by
     8   the Free Software Foundation; either version 2, or (at your option)
     9   any later version.
     10
     11   ### File Specific
     12   main-programmer: Marc Schaerrer, Nicolas Schlumberger
     13   co-programmer:
     14
     15*/
     16
    117#include "medium_blaster.h"
    218#include "world_entities/projectiles/projectile.h"
  • trunk/src/world_entities/weapons/spike_thrower.cc

    r10516 r10618  
    1010
    1111   ### File Specific
    12    main-programmer: Marc Schaerrer
     12   main-programmer: Marc Schaerrer, Nicolas Schlumberger
    1313   co-programmer:
    1414*/
     
    2828
    2929#include <list>
    30 #include <iterator>
    3130#include "util/state.h"
    32 
    33 #include "math/quaternion.h"
    3431
    3532#include "util/loading/factory.h"
     
    108105  this->setActionSound(WA_SHOOT, "sounds/explosions/explosion_1.wav");
    109106  this->setActionSound(WA_ACTIVATE, "sounds/voices/rockets.wav");
    110   this->setActionSound(WA_RELOAD, "sounds/voices/reload.wav");
     107//   this->setActionSound(WA_RELOAD, "sounds/voices/reload.wav");
    111108
    112109}
  • trunk/src/world_entities/weapons/swarm_launcher.cc

    r10545 r10618  
    3030#include <iterator>
    3131#include "util/state.h"
    32 
    33 #include "math/quaternion.h"
    3432
    3533#include "util/loading/factory.h"
     
    10098  this->setProjectileTypeC("SwarmProjectile");
    10199
    102   this->loadModel("models/guns/turret1.obj", 1.0);
     100//   this->loadModel("models/guns/turret1.obj", 1.0);
    103101
    104102  this->setEmissionPoint(1.684, 0.472, 0);
    105   this->getProjectileFactory()->prepare(50);
     103  this->getProjectileFactory()->prepare(10);
    106104
    107105  this->setActionSound(WA_SHOOT, "sounds/explosions/explosion_1.wav");
    108   this->setActionSound(WA_ACTIVATE, "sounds/voices/rockets.wav");
    109   this->setActionSound(WA_RELOAD, "sounds/voices/reload.wav");
     106//   this->setActionSound(WA_ACTIVATE, "sounds/voices/rockets.wav");
     107//   this->setActionSound(WA_RELOAD, "sounds/voices/reload.wav");
    110108
    111109}
  • trunk/src/world_entities/weapons/targeting_turret.cc

    r10419 r10618  
    9494  this->setActionSound(WA_SHOOT, "sounds/explosions/explosion_3.wav");
    9595  this->setActionSound(WA_ACTIVATE, "sounds/voices/rockets.wav");
    96   this->setActionSound(WA_RELOAD, "sounds/voices/reload.wav");
     96//   this->setActionSound(WA_RELOAD, "sounds/voices/reload.wav");
    9797}
    9898
  • trunk/src/world_entities/weapons/turret.cc

    r10419 r10618  
    9595  this->setActionSound(WA_SHOOT, "sounds/explosions/explosion_3.wav");
    9696  this->setActionSound(WA_ACTIVATE, "sounds/voices/rockets.wav");
    97   this->setActionSound(WA_RELOAD, "sounds/voices/reload.wav");
     97//   this->setActionSound(WA_RELOAD, "sounds/voices/reload.wav");
    9898
    9999}
  • trunk/src/world_entities/weather_effects/cloud_effect.h

    r9869 r10618  
    1212#include "sound_source.h"
    1313
    14 #include "skydome.h"
     14#include "environments/skydome.h"
    1515#include "material.h"
    1616#include "shader.h"
  • trunk/src/world_entities/weather_effects/lense_flare.cc

    r10114 r10618  
    3232
    3333#include "light.h"
    34 #include "camera.h"
     34#include "tools/camera.h"
    3535
    3636
  • trunk/src/world_entities/weather_effects/lightning_effect.cc

    r10511 r10618  
    263263
    264264  if (this->thunderTextureA) {
    265     this->thunderBolt[0]->setTexture("textures/thunderbA1.png");
    266     this->thunderBolt[1]->setTexture("textures/thunderbA2.png");
    267     this->thunderBolt[2]->setTexture("textures/thunderbA3.png");
    268     this->thunderBolt[3]->setTexture("textures/thunderbA4.png");
     265    this->thunderBolt[0]->setTexture("textures/effects/thunderbA1.png");
     266    this->thunderBolt[1]->setTexture("textures/effects/thunderbA2.png");
     267    this->thunderBolt[2]->setTexture("textures/effects/thunderbA3.png");
     268    this->thunderBolt[3]->setTexture("textures/effects/thunderbA4.png");
    269269  }
    270270  else {
    271     this->thunderBolt[0]->setTexture("textures/thunderbB1.png");
    272     this->thunderBolt[1]->setTexture("textures/thunderbB2.png");
    273     this->thunderBolt[2]->setTexture("textures/thunderbB3.png");
    274     this->thunderBolt[3]->setTexture("textures/thunderbB4.png");
     271    this->thunderBolt[0]->setTexture("textures/effects/thunderbB1.png");
     272    this->thunderBolt[1]->setTexture("textures/effects/thunderbB2.png");
     273    this->thunderBolt[2]->setTexture("textures/effects/thunderbB3.png");
     274    this->thunderBolt[3]->setTexture("textures/effects/thunderbB4.png");
    275275  }
    276276
  • trunk/src/world_entities/world_entity.cc

    r10546 r10618  
    2727
    2828#include "oif/object_information_file.h"
    29 #include "mount_point.h"
     29#include "tools/mount_point.h"
    3030
    3131#include "aabb_tree_node.h"
     
    4141
    4242#include "state.h"
    43 #include "camera.h"
     43#include "tools/camera.h"
    4444
    4545#include "collision_filter.h"
Note: See TracChangeset for help on using the changeset viewer.