--
[ Picked text/plain from multipart/alternative ]
I did it with an entity in the map that specifies the rules.

I have a basic rule system that is modularized for different game types.

And it just calls the appropriate data via a function pointer.

I don't know why I bothered to share this. Meh.


On 4/9/07, Adam amckern McKern <[EMAIL PROTECTED]> wrote:
>
> Hey Louka,
>
> I was wondering how NS did it bettwen co_ and ns_ -
> now i know :)
>
> Adam
>
>
> --- Louka Outrebon <[EMAIL PROTECTED]> wrote:
>
> > --
> > [ Picked text/plain from multipart/alternative ]
> > Hi emiel,
> >
> > For SourceForts, I use this : (i use hl2mp sdk)
> > In hl2mp_client.cpp :
> >
> >
> //=========================================================
> > // instantiate the proper game rules object
> >
> //=========================================================
> > void InstallGameRules()
> > {
> >        std::string mapName = STRING(
> > gpGlobals->mapname );
> >
> >        mapName = mapName.substr( 0, 3 );
> >
> >        if (mapName == "sf_") // Classic SourceForts
> > CTF
> >        {
> >               CreateGameRulesObject(
> > "CSFCTFGamerules" );
> >        }
> >        else if (mapName == "cr_") // Core Run map
> >        {
> >               CreateGameRulesObject(
> > "CSFCRGamerules" );
> >        }
> >        else if (mapName == "cq_") // Conquest map
> >        {
> >               CreateGameRulesObject( "CHL2MPRules"
> > );
> >        }
> >        else
> >               CreateGameRulesObject(
> > "CSFCTFGamerules" );
> > }
> >
> > InstallGamerules is already called automatically.
> > Thought (note to valve) it
> > seems client side the networktable is not updated
> > for gamerules object.So
> >  when it's creating a new one server side, client
> > side it remains the
> > old one. So you'll have to make the samefunction
> > client side
> > in C_World::Precache( ) and use
> >
> > char mapN[64];
> > V_FileBase( engine->GetLevelName( ), mapN, 64 );
> >
> > std::string mapName = mapN;
> > mapName = mapName.substr( 0, 3 );
> >
> > instead of std::string mapName = STRING(
> > gpGlobals->mapname );
> > I hope I helped you.
> >
> > On 4/8/07, Emiel Regis <[EMAIL PROTECTED]> wrote:
> > >
> > > Hi,
> > >
> > > I am doing this system, where with use of external
> > MapInfo files you can
> > > set some fixed values, like gametype the map is
> > created for. I want to
> > > make it so that if the gametype doesn't match, the
> > map won't show in the
> > > browser and will not load, giving "Wrong gametype"
> > and exit to main menu
> > > effect. Yet, atm I tried finding appropriate place
> > and only one I found
> > > was LevelInit(), but putting this stuff there only
> > leads to crashes when
> > > loading unsupported maps. Could someone give me a
> > helping hand and point
> > > to where map browser is implemented?
> > >
> > > _______________________________________________
> > > To unsubscribe, edit your list preferences, or
> > view the list archives,
> > > please visit:
> > >
> >
> http://list.valvesoftware.com/mailman/listinfo/hlcoders
> > >
> > >
> > --
> >
> > _______________________________________________
> > To unsubscribe, edit your list preferences, or view
> > the list archives, please visit:
> >
> http://list.valvesoftware.com/mailman/listinfo/hlcoders
> >
> >
>
>
> --------
> Nigredo Studios http://www.nigredostudios.com
>
>
>
>
> ____________________________________________________________________________________
> Get your own web address.
> Have a HUGE year through Yahoo! Small Business.
> http://smallbusiness.yahoo.com/domains/?p=BESTDEAL
>
> _______________________________________________
> To unsubscribe, edit your list preferences, or view the list archives,
> please visit:
> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>
>


--
-omega
--

_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to