- Timestamp:
- May 2, 2006, 11:44:10 PM (19 years ago)
- Location:
- trunk/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/defs/class_id.h
r7482 r7486 149 149 150 150 CL_KILL_TARGET = 0x00105001, 151 #warning new classid entry152 CL_KILL = 0x00105005, //FIXME: Bensch, this is actualy a BaseObject no idea where to put153 151 154 152 -
trunk/src/util/game_rules.h
r7483 r7486 33 33 /** adding an mission goal to the game rules @param missionGoal the mission goal to add */ 34 34 inline void addMissionGoal(MissionGoal* missionGoal) { this->missionList.push_back(missionGoal); } 35 36 inline void registerKill(const Kill& kill) { /*this->killList.push_back(kill);*/}35 /** adding a kill event to the kill list @param kill the kill object containing all infos */ 36 inline void registerKill(const Kill& kill) { this->killList.push_back(kill); } 37 37 38 38 virtual void onPlayerSpawn() {} … … 54 54 std::vector<MissionGoal*> missionList; //!< list of mission goals 55 55 56 conststd::vector<Kill> killList; //!< list of kills in the world56 std::vector<Kill> killList; //!< list of kills in the world 57 57 }; 58 58 -
trunk/src/util/kill.cc
r7482 r7486 22 22 23 23 24 /**25 * standard constructor26 */27 Kill::Kill (WorldEntity* killer, WorldEntity* victim)28 {29 this->setClassID(CL_KILL, "Kill");30 31 this->killer = killer;32 this->victim = victim;33 }34 35 36 /**37 * standard constructor38 */39 Kill::Kill (WorldEntity* killer, Playable* victim)40 {41 this->setClassID(CL_KILL, "Kill");42 43 this->killer = killer;44 this->victim = (WorldEntity*)victim;45 }46 47 48 /**49 * standard deconstructor50 */51 Kill::~Kill ()52 {53 // delete what has to be deleted here54 } -
trunk/src/util/kill.h
r7482 r7486 15 15 16 16 //! A representing a kill event 17 class Kill : public BaseObject17 class Kill 18 18 { 19 19 20 20 public: 21 Kill(WorldEntity* killer, WorldEntity* victim) ;22 Kill(WorldEntity* killer, Playable* victim) ;23 virtual ~Kill() ;21 Kill(WorldEntity* killer, WorldEntity* victim) { this->killer = killer; this->victim = victim; } 22 Kill(WorldEntity* killer, Playable* victim) {this->killer = killer; this->victim = (WorldEntity*)victim;} 23 virtual ~Kill() {} 24 24 25 25 /** @returns reference to the killer world entity, does not need to exist */ 26 inline WorldEntity* getKiller() { return this->killer; }26 inline WorldEntity* getKiller() const { return this->killer; } 27 27 /** @returns reference to the victim world entity, does not need to exist */ 28 inline WorldEntity* getVictim() { return this->victim; }28 inline WorldEntity* getVictim() const { return this->victim; } 29 29 30 30 private:
Note: See TracChangeset
for help on using the changeset viewer.