[8024] | 1 | /* |
---|
| 2 | orxonox - the future of 3D-vertical-scrollers |
---|
| 3 | |
---|
| 4 | Copyright (C) 2004 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: ... |
---|
| 13 | co-programmer: ... |
---|
| 14 | */ |
---|
| 15 | |
---|
| 16 | //#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_ |
---|
| 17 | |
---|
| 18 | #include "network_game_rules.h" |
---|
| 19 | |
---|
[8623] | 20 | #include "network_game_manager.h" |
---|
| 21 | |
---|
[8024] | 22 | |
---|
| 23 | |
---|
[9869] | 24 | ObjectListDefinition(NetworkGameRules); |
---|
[9406] | 25 | |
---|
[8024] | 26 | /** |
---|
| 27 | * standard constructor |
---|
| 28 | */ |
---|
| 29 | NetworkGameRules::NetworkGameRules ( const TiXmlElement* root ) |
---|
[9869] | 30 | : GameRules( root ) |
---|
[8024] | 31 | { |
---|
[9869] | 32 | this->registerObject(this, NetworkGameRules::_objectList); |
---|
[8024] | 33 | } |
---|
| 34 | |
---|
| 35 | |
---|
| 36 | /** |
---|
| 37 | * standard deconstructor |
---|
| 38 | */ |
---|
| 39 | NetworkGameRules::~NetworkGameRules () |
---|
[9869] | 40 | {} |
---|
[8024] | 41 | |
---|
[9110] | 42 | |
---|
[9869] | 43 | std::string NetworkGameRules::getPlayableModelTextureFileName( int userId, int team, const ClassID& classId ) |
---|
[9110] | 44 | { |
---|
| 45 | return ""; |
---|
| 46 | } |
---|
| 47 | |
---|
[9869] | 48 | std::string NetworkGameRules::getPlayableModelFileName( int uesrId, int team, const ClassID& classId ) |
---|
[8024] | 49 | { |
---|
| 50 | return "models/ships/reap_#.obj"; |
---|
| 51 | } |
---|
| 52 | |
---|
[8147] | 53 | ClassID NetworkGameRules::getPlayableClassId( int userId, int team ) |
---|
[8024] | 54 | { |
---|
[9869] | 55 | const ObjectListBase* objList = ObjectListBase::getObjectList("SpaceShip"); |
---|
| 56 | if (objList != NULL) |
---|
| 57 | return objList->identity(); |
---|
| 58 | else |
---|
| 59 | return ClassID(); |
---|
[8024] | 60 | } |
---|
| 61 | |
---|
| 62 | int NetworkGameRules::getTeamForNewUser( ) |
---|
| 63 | { |
---|
| 64 | return 0; |
---|
| 65 | } |
---|
| 66 | |
---|
[8623] | 67 | |
---|
| 68 | void NetworkGameRules::shellSay( const std::string & message ) |
---|
| 69 | { |
---|
| 70 | NetworkGameManager::getInstance()->sendChatMessage( message, 0 ); |
---|
| 71 | } |
---|
| 72 | |
---|
| 73 | |
---|
[9869] | 74 | float NetworkGameRules::getPlayableScale( int userId, int team, const ClassID& classId ) |
---|
[9235] | 75 | { |
---|
| 76 | return 1.0f; |
---|
| 77 | } |
---|