What ever happened to BUS/Nexus?

napinapi 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...

Comments

  • CommunistWithAGunCommunistWithAGun Local Propaganda Guy Join Date: 2003-04-30 Member: 15953Members
    i think it got canned when the site got "hacked"
  • NEX9NEX9 Join Date: 2005-03-08 Member: 44299Members
    Hum lucky this is a serious thread, or i would of just said "Oh NO you just didnt, MENTION TEH BUS!!!!11!!!!.

    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.
  • tallmidget22tallmidget22 Join Date: 2007-02-03 Member: 59859Members
    We never found out what the BUS was, but I am curious about Nexus myself.
  • MuckyMcFlyMuckyMcFly Join Date: 2012-03-19 Member: 148982Members, Reinforced - Supporter, Reinforced - Shadow
  • GISPGISP Battle Gorge Denmark Join Date: 2004-03-20 Member: 27460Members, Playtest Lead, Forum Moderators, Constellation, NS2 Playtester, Squad Five Blue, Squad Five Silver, Squad Five Gold, NS2 Map Tester, Reinforced - Onos, WC 2013 - Gold, Subnautica Playtester, Forum staff
    What are you guys talking about?
  • Kouji_SanKouji_San Sr. Hινε Uρкεερεг - EUPT Deputy The Netherlands Join Date: 2003-05-13 Member: 16271Members, NS2 Playtester, Squad Five Blue
    edited January 2014
    GISP wrote: »
    What are you guys talking about?
    The Big Unannounced System, apparently ns_ayumi's secret room wants a word with us... Something about cats and busses and no @GISP I don't care if this adds even more confusion or fuel for the oldchool conspiracies :-\"


    Also unholy thread necromancers are still walking among us!

  • Soylent_greenSoylent_green Join Date: 2002-12-20 Member: 11220Members, Reinforced - Shadow
    edited May 2014
    In the released source code there are remnants of something called nexus, I don't know if this is the BUS, but it might be. I haven't dug too deep in the .cpp files, but it just looks like boiler-plate code for starting up, shutting down, sending, recieving, logging in and out and so forth; the actual code that generates and consumes the messages has been ripped out, with only a few commented out references left, so you can only guess what it might have done.

    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);
    }
    
    #endif
    

    Nexus 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);
    }
    
    #endif
    

    Nexus 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;
    	};
    }
    
    #endif
    

    Nexus 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;
    	};
    }
    
    #endif
    

    In 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:
    g_msgNexusBytes = REG_USER_MSG( "NexusBytes", -1 );
    

    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!
    	}
    }
    
Sign In or Register to comment.