Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7482 in orxonox.OLD


Ignore:
Timestamp:
May 2, 2006, 11:08:45 PM (18 years ago)
Author:
patrick
Message:

orxonox: working on kill event processing (game rule specific)

Location:
trunk/src
Files:
2 added
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/defs/class_id.h

    r7461 r7482  
    149149
    150150  CL_KILL_TARGET                =    0x00105001,
    151 
     151#warning new classid entry
     152  CL_KILL                       =    0x00105005,                  //FIXME: Bensch, this is actualy a BaseObject no idea where to put
    152153
    153154
  • trunk/src/lib/graphics/importer/height_map.cc

    r7469 r7482  
    9595#define shiftZ this->heightMapReference->shiftZ
    9696#define normalVectorField this->heightMapReference->normalVectorField
     97
    9798
    9899  this->x = this->heightMapReference->offsetX + ( this->heightMapReference->heightMap->h - ((i1 + i2) / 2)) * scaleX;
  • trunk/src/story_entities/game_world_data.cc

    r7466 r7482  
    325325  LoadParam(root, "Music", this, GameWorldData, setSoundTrack);
    326326
    327 
    328327  LoadParamXML(root, "GameRule", this, GameWorldData, loadGameRule);
    329328
     
    386385      this->gameRule = dynamic_cast<GameRules*>(created);
    387386      State::setGameRules(this->gameRule);
    388       // if there is a valid game rule loaded, break because it is not thought to load multiple game rules
     387      // if there is a valid game rule loaded, return because it is not thought to load multiple game rules
    389388      return;
    390389    }
  • trunk/src/util/Makefile.am

    r7461 r7482  
    1515                        mission_goal.cc\
    1616                        kill_target.cc\
     17                        kill.cc \
    1718                        \
    1819                        signal_handler.cc \
     
    3839                        mission_goal.cc\
    3940                        kill_target.h\
     41                        kill.h \
     42                        \
    4043                        signal_handler.h \
    4144                        \
  • trunk/src/util/game_rules.h

    r7461 r7482  
    1616class Player;
    1717class MissionGoal;
     18class Kill;
    1819
    1920
     
    3233    inline void addMissionGoal(MissionGoal* missionGoal) { this->missionList.push_back(missionGoal); }
    3334
     35    inline void registerKill(const Kill& kill) { /*this->killList.push_back(&kill);*/ }
    3436
    3537    virtual void onPlayerSpawn() {}
     
    5052    Player*                     localPlayer;            //!< reference to the local player
    5153    std::vector<MissionGoal*>   missionList;            //!< list of mission goals
     54
     55    const std::vector<Kill*>          killList;               //!<  list of kills in the world
    5256};
    5357
  • trunk/src/world_entities/playable.cc

    r7412 r7482  
    3535
    3636#include "effects/explosion.h"
     37#include "kill.cc"
    3738
    3839#include "shell_command.h"
     
    366367    {
    367368      this->die();
     369
     370      if( State::getGameRules() != NULL)
     371        State::getGameRules()->registerKill(Kill(entity, this));
    368372    }
    369373  }
Note: See TracChangeset for help on using the changeset viewer.