- Timestamp:
- Feb 7, 2006, 6:48:10 PM (19 years ago)
- Location:
- trunk/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/util/multiplayer_team_deathmatch.cc
r7089 r7101 22 22 #include "render2D/billboard.h" 23 23 #include "state.h" 24 #include "class_list.h" 24 25 25 26 #include "player.h" 26 27 #include "playable.h" 27 28 #include "space_ships/space_ship.h" 29 30 #include "shared_network_data.h" 31 32 #include <list> 28 33 29 34 using namespace std; … … 156 161 void MultiplayerTeamDeathmatch::checkGameRules() 157 162 { 158 // 163 164 Vector big_left(-201, 0, 0); 165 float rBig = 176.0f; 166 Vector big_right(177, 0, 0); 167 Vector small_left(10, 0, 0); 168 Vector small_middle(0, 0, 0); 169 Vector small_right(-10, 0, 0); 170 float rSmall = 90.0f; 171 172 159 173 // check for max killing count 160 174 if( this->teamAKills >= this->maxKills) … … 166 180 // team B winns 167 181 } 168 } 169 170 171 172 173 174 182 183 184 185 186 std::list<BaseObject*>::const_iterator it; 187 const std::list<BaseObject*>* list = ClassList::getList(CL_PLAYABLE); 188 189 if( SharedNetworkData::getInstance()->isGameServer()) 190 { 191 for(it = list->begin(); it != list->end(); it++) 192 { 193 float dist = (dynamic_cast<Playable*>(*it)->getAbsCoor() - big_left).len(); 194 if( (dynamic_cast<Playable*>(*it)->getAbsCoor() - big_left).len() > rBig && 195 (dynamic_cast<Playable*>(*it)->getAbsCoor() - big_right).len() > rBig && 196 (dynamic_cast<Playable*>(*it)->getAbsCoor() - small_left).len() > rSmall && 197 (dynamic_cast<Playable*>(*it)->getAbsCoor() - small_middle).len() > rSmall && 198 (dynamic_cast<Playable*>(*it)->getAbsCoor() - small_right).len() > rSmall) 199 { 200 PRINTF(0)("KILLLLLLLL\n"); 201 202 if((*it)->isA(CL_SPACE_SHIP)) 203 dynamic_cast<SpaceShip*>(*it)->doCollideNetwork(116369220.33434f); 204 } 205 } 206 } 207 208 209 } 210 211 212 213 214 215 -
trunk/src/world_entities/space_ships/space_ship.cc
r7095 r7101 772 772 } 773 773 774 774 775 void SpaceShip::doCollideNetwork( float energy ) 775 776 { -
trunk/src/world_entities/space_ships/space_ship.h
r7092 r7101 47 47 48 48 49 //HACK HACK HACK make this private or remove it 50 void doCollideNetwork( float energy ); 51 49 52 private: 50 53 void init(); … … 52 55 void calculateVelocity(float time); 53 56 54 void doCollideNetwork( float energy ); 57 55 58 56 59 bool bUp; //!< up button pressed.
Note: See TracChangeset
for help on using the changeset viewer.