Changeset 9235 in orxonox.OLD for trunk/src/util
- Timestamp:
- Jul 5, 2006, 4:39:02 PM (19 years ago)
- Location:
- trunk/src/util
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/util/hud.cc
r9014 r9235 187 187 this->_radar->setCenterNode(State::getPlayer()->getPlayable()); 188 188 this->_radar->addEntityList(&State::getObjectManager()->getObjectList((OM_LIST)(State::getPlayer()->getPlayable()->getOMListNumber()+1)), Color(.4, .4, 1.0)); 189 this->_radar->addEntityList(&State::getObjectManager()->getObjectList(OM_GROUP_02), Color(1.0, .2, .2)); 189 190 this->_radar->setAbsCoor2D(0.8 * this->resX, 0.01 * this->resY); 190 191 this->_radar->setWidgetSize(0.2 * this->resX, 0.2 * this->resY); -
trunk/src/util/multiplayer_team_deathmatch.cc
r9110 r9235 210 210 while ( this->killList.begin() != this->killList.end() ) 211 211 { 212 PRINTF(0)("KKKKKKKKIIIIIIIIILLLLLLLLLLLLL\n"); 212 213 onKill( this->killList.begin()->getVictim(), this->killList.begin()->getKiller() ); 213 214 this->killList.erase( this->killList.begin() ); … … 305 306 return "models/creatures/doom_guy.md2"; 306 307 else if ( team == 1 ) 307 return "models/creatures/ doom_guy.md2";308 return "models/creatures/male.md2"; 308 309 else 309 310 return ""; 310 311 } 311 312 313 std::string MultiplayerTeamDeathmatch::getPlayableModelTextureFileName( int userId, int team, ClassID classId ) 314 { 315 if ( classId == CL_FPS_PLAYER ) 316 { 317 if ( team == 0 ) 318 return "maps/doom_guy.png"; 319 else 320 return "maps/male_fiend.pcx"; 321 } 322 323 return ""; 324 } 325 326 float MultiplayerTeamDeathmatch::getPlayableScale( int userId, int team, ClassID classId ) 327 { 328 if ( classId == CL_FPS_PLAYER ) 329 { 330 return 10.0f; 331 } 332 333 return 1.0f; 334 } 335 312 336 /** 313 337 * calculate team score … … 399 423 if ( currentGameState == GAMESTATE_POST_GAME ) 400 424 { 401 State::getCurrentStoryEntity()->stop();425 //State::getCurrentStoryEntity()->stop(); 402 426 this->bShowTeamChange = false; 403 427 … … 456 480 std::string playableModel = getPlayableModelFileName( userId, stats.getPreferedTeamId(), playableClassId ); 457 481 std::string playableTexture = getPlayableModelTextureFileName( userId, stats.getPreferedTeamId(), playableClassId ); 482 float playableScale = getPlayableScale( userId, stats.getPreferedTeamId(), playableClassId ); 458 483 459 484 BaseObject * bo = Factory::fabricate( playableClassId ); … … 464 489 Playable & playable = *(dynamic_cast<Playable*>(bo)); 465 490 466 if ( playableTexture != "" ) 467 playable.loadMD2Texture( playableTexture ); 468 if ( playableModel != "" ) 469 playable.loadModel( playableModel ); 491 playable.loadMD2Texture( playableTexture ); 492 playable.loadModel( playableModel, playableScale ); 470 493 playable.setOwner( userId ); 471 494 playable.setUniqueID( SharedNetworkData::getInstance()->getNewUniqueID() ); … … 687 710 { 688 711 if ( !victim ) 689 return; 712 { 713 PRINTF(0)("victim == NULL\n"); 714 return; 715 } 690 716 if ( !killer ) 691 return; 717 { 718 PRINTF(0)("killer == NULL\n"); 719 return; 720 } 692 721 693 722 int killerUserId = killer->getOwner(); 694 723 int victimUserId = victim->getOwner(); 724 725 PRINTF(0)("%d %d %x %x %s %s\n", killerUserId, victimUserId, killer, victim, killer->getClassName(), victim->getClassName()); 695 726 696 727 PlayerStats & victimStats = *PlayerStats::getStats( victimUserId ); … … 698 729 699 730 if ( killerStats.getPlayable() != killer || victimStats.getPlayable() != victim ) 700 return; 731 { 732 PRINTF(0)("killerStats.getPlayable() != killer || victimStats.getPlayable() != victim\n"); 733 PRINTF(0)("%x %x %x %x\n", killerStats.getPlayable(), killer, victimStats.getPlayable(), victim ); 734 PRINTF(0)("%d %d %d %d\n", killerStats.getPlayable()->getUniqueID(), killer->getUniqueID(), victimStats.getPlayable()->getUniqueID(), victim->getUniqueID() ); 735 return; 736 } 701 737 702 738 //check for suicide … … 782 818 } 783 819 784 std::string MultiplayerTeamDeathmatch::getPlayableModelTextureFileName( int userId, int team, ClassID classId ) 785 { 786 if ( classId == CL_FPS_PLAYER ) 787 { 788 return "maps/doom_guy.png"; 789 } 790 791 return ""; 792 } 793 820 -
trunk/src/util/multiplayer_team_deathmatch.h
r9110 r9235 41 41 virtual std::string getPlayableModelTextureFileName( int userId, int team, ClassID classId ); 42 42 virtual std::string getPlayableModelFileName( int userId, int team, ClassID classId ); 43 virtual float getPlayableScale( int userId, int team, ClassID classId ); 43 44 44 45 virtual void registerSpawn( WorldEntity * we ); -
trunk/src/util/network_game_rules.cc
r9110 r9235 68 68 69 69 70 float NetworkGameRules::getPlayableScale( int userId, int team, ClassID classId ) 71 { 72 return 1.0f; 73 } -
trunk/src/util/network_game_rules.h
r9110 r9235 24 24 virtual std::string getPlayableModelFileName( int userId, int team, ClassID classId ); 25 25 virtual std::string getPlayableModelTextureFileName( int userId, int team, ClassID classId ); 26 virtual float getPlayableScale( int userId, int team, ClassID classId ); 26 27 27 28 virtual PlayerStats * getNewPlayerStats( int userId ){ return new PlayerStats( userId ); }
Note: See TracChangeset
for help on using the changeset viewer.