What ever happened to BUS/Nexus?
napi
Join Date: 2003-03-01 Member: 14172Members, Constellation
Hallo all,
I've not been active in NS for.. umm... nigh on 3 years now!
Found my way back into the IRC room a few days ago and figured I'd see if the old account is still up! And it is - although without the PT status. Boo
Anyhoo, I was wondering; did anything ever get announced about BUS/Nexus in the last 3 years? One of lifes biggest mysteries to me that thing was...
I've not been active in NS for.. umm... nigh on 3 years now!
Found my way back into the IRC room a few days ago and figured I'd see if the old account is still up! And it is - although without the PT status. Boo
Anyhoo, I was wondering; did anything ever get announced about BUS/Nexus in the last 3 years? One of lifes biggest mysteries to me that thing was...
Comments
Read all the blogs and listen to the pod casts, then come back and ask if its important, or if its just sort of blured the lines and became dynamic enviroments.
Also unholy thread necromancers are still walking among us!
Looking at the remnants my best guess is that it was supposed to be something like we have now in NS2, recording stats from games, recording which servers and when games were played, balance teams according to skill etc.
Not to bore you too much, here are the contents of the .h files. This just tells you what the functions are called and what arguments they take. Looking at the CPP files they seem to be reasonably named and do what it says on the tin.
Nexus client:
#ifndef AVHNEXUSCLIENT_H #define AVHNEXUSCLIENT_H namespace AvHNexus { bool send(const unsigned char* data, const size_t length); bool recv(const unsigned char* data, const size_t length); void startup(void); void shutdown(void); bool login(const string& name, const string& password); bool logout(void); } #endifNexus server:
#ifndef AVHNEXUSSERVER_H #define AVHNEXUSSERVER_H struct edict_s; typedef struct edict_s edict_t; struct entvars_s; typedef struct entvars_s entvars_t; namespace AvHNexus { bool send(entvars_t* const pev, const unsigned char* data, const size_t length); bool recv(entvars_t* const pev, const char* data, const size_t length); void handleUnauthorizedJoinTeamAttempt(const edict_t* edict, const unsigned char team_index); string getNetworkID(const edict_t* edict); void performSpeedTest(void); void processResponses(void); void setGeneratePerformanceData(const edict_t* edict, const bool generate); bool getGeneratePerformanceData(void); bool isRecordingGame(void); void startGame(void); void cancelGame(void); void finishGame(void); void startup(void); void shutdown(void); } #endifNexus tunnel to client:
#ifndef AVHNEXUSTUNNELTOCLIENT_H #define AVHNEXUSTUNNELTOCLIENT_H struct entvars_s; typedef struct entvars_s entvars_t; #include <queue> namespace AvHNexus { class TunnelToClient : public Nexus::TunnelToClient { public: static TunnelToClient* getInstance(void); virtual ~TunnelToClient(void); virtual Nexus::TunnelToClient* clone(void) const; //necessary so that we don't "slice" on copy virtual const Nexus::ClientID poll(void) const; //returns next local ClientID to recv or 0 if none available virtual bool send(const Nexus::ClientID local_id, const byte_string& data); virtual bool recv(const Nexus::ClientID local_id, byte_string& data); virtual bool insertMessage(const Nexus::ClientID local_id, const byte_string& message); //inserted into queue of messages from clients private: TunnelToClient(void); std::deque<std::pair<const Nexus::ClientID,const byte_string> > messages; }; } #endifNexus tunnel to server:
#ifndef AVHNEXUSTUNNELTOSERVER_H #define AVHNEXUSTUNNELTOSERVER_H #include <queue> namespace AvHNexus { class TunnelToServer : public Nexus::TunnelToServer { public: static TunnelToServer* getInstance(void); virtual ~TunnelToServer(void); virtual Nexus::TunnelToServer* clone(void) const; virtual bool send(const byte_string& data); virtual bool recv(byte_string& data); virtual bool insertMessage(const byte_string& message); //inserted into queue of messages from server private: TunnelToServer(void); std::deque<const byte_string> messages; }; } #endifIn a few different places you can see commented out references to nexus:
In AvHConsoleCommands.cpp, in function BOOL AvHGamerules::ClientCommand( CBasePlayer *pPlayer, const char *pcmd ).
This function handles console commands on the server, like a player attempting to join team one or two (or three or four...).
//adding Nexus TunnelToClient functionality up here... // if( strcmp( pcmd, "NexusData" ) == 0 ) // { // const char* arg1 = CMD_ARGV(1); // return AvHNexus::recv(pPlayer->pev,arg1,strlen(arg1)); // } //non-Nexus signal handler down here...AvHNetworkMessages.cpp, in void Net_InitializeMessages(void), on the server, it registers a message and recieves an integer code used when transmitting or receiving that message:
In AvHPlayer.cpp
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Nexus interface //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //TODO: flesh this out with admin privileges, etc. once the UPP authorization interface has been expanded bool AvHPlayer::GetIsAuthorized(AvHAuthAction inAction, int inParameter) const { switch( inAction ) { case AUTH_ACTION_JOIN_TEAM: { AvHTeamNumber theTeam = (AvHTeamNumber)inParameter; switch( theTeam ) { case TEAM_IND: // ready room & spectator - game allows in all cases case TEAM_SPECT: return true; default: // check it's an active team if( theTeam == GetGameRules()->GetTeamA()->GetTeamNumber() || theTeam == GetGameRules()->GetTeamB()->GetTeamNumber() ) { // tankefugl: 0001042 -- allow switching of teams -- placeholder before Nexus // if( GetGameRules()->GetCheatsEnabled() ) { return true; } // cheaters can switch // if( !GetGameRules()->GetGameStarted() ) { return true; } // can switch teams before start // if( this->GetHasBeenSpectator() ) { return false; } // spectators have seen everybody // for(int counter = TEAM_ACTIVE_BEGIN; counter < TEAM_ACTIVE_END; counter++) // { // if( theTeam != counter && this->GetHasSeenTeam( (AvHTeamNumber)counter ) ) // { return false; } // we've seen another active team // } return true; // haven't seen another team, authorized to join } return false; // unknown/inactive team - never grant an unknown permission! } } case AUTH_ACTION_ADJUST_BALANCE: { #ifndef BALANCE_ENABLED return false; #else return this->GetIsMember(PLAYERAUTH_DEVELOPER); #endif } default: return false; // never grant an unknown permission! } }