Changeset 2937 for code/branches/netp2/src/orxonox
- Timestamp:
- Apr 29, 2009, 4:05:35 PM (16 years ago)
- Location:
- code/branches/netp2/src/orxonox
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/netp2/src/orxonox/OrxonoxPrereqs.h
r2826 r2937 159 159 class SpawnPoint; 160 160 class TeamSpawnPoint; 161 class Test; 161 162 162 163 class Spectator; -
code/branches/netp2/src/orxonox/objects/Test.cc
r2662 r2937 31 31 #include "core/ConfigValueIncludes.h" 32 32 #include "core/ConsoleCommand.h" 33 #include "network/NetworkFunction.h" 33 34 #include "Test.h" 34 35 … … 41 42 SetConsoleCommand(Test, printV3, true).accessLevel(AccessLevel::User); 42 43 SetConsoleCommand(Test, printV4, true).accessLevel(AccessLevel::User); 44 SetConsoleCommand(Test, call, true).accessLevel(AccessLevel::User); 45 46 47 //void=* aaaaa = copyPtr<sizeof(&Test::printV1)>( &NETWORK_FUNCTION_POINTER, &Test::printV1 ); 48 //void* NETWORK_FUNCTION_TEST_B = memcpy(&NETWORK_FUNCTION_POINTER, &a, sizeof(a)); 49 // NetworkFunctionBase* NETWORK_FUNCTION_TEST_C = new NetworkFunctionStatic( createFunctor(&Test::printV1), "bla", NETWORK_FUNCTION_POINTER ); 50 51 registerStaticNetworkFunction( &Test::printV1, "printV1" ); 43 52 44 53 Test* Test::instance_ = 0; … … 85 94 registerVariable ( s4, variableDirection::clientMaster, new NetworkCallback<Test> ( this, &Test::checkS4 ), true ); 86 95 } 87 96 97 void Test::call(unsigned int clientID) 98 { 99 callStaticNetworkFunction( &Test::printV1, clientID ); 100 } 101 88 102 void Test::checkU1(){ COUT(1) << "U1 changed: " << u1 << std::endl; } 89 103 void Test::checkU2(){ COUT(1) << "U2 changed: " << u2 << std::endl; } -
code/branches/netp2/src/orxonox/objects/Test.h
r2662 r2937 49 49 void setConfigValues(); 50 50 void registerVariables(); 51 52 void call(unsigned int clientID); 51 53 52 54
Note: See TracChangeset
for help on using the changeset viewer.