There is two ways to do what you want. Inside the gamerules class you
can do different logic depending on the game type, the other way is to
have one gamerule class per game type. This is what we have done in
GoldenEye Source.
void InstallGameRules()
{
if (ge_singleplayer.GetBool())
CreateGameRulesObject( "CGESPRules" );
else
CreateGameRulesObject( "CGEMPRules" );
}
Not sure but you will prob find the function with the same name in
client.cpp on the server.
Mark
Idrox Gedrono wrote:
> Gamerules are driving me nuts, particularly because there's little info
> available on the VDC, and doing a search for 'gamerules' or, heaven forbid,
> 'rules' in the source code gives a bazillion results. I can figure out how
> to modify a gametype, but how, or where, does the game actually select what
> class of gamerules to use? How would you change that? Thanks in advance :).
>
> -Kohan
>
>
> _________________________________________________________________
> HotmailĀ® has a new way to see what's up with your friends.
> http://windowslive.com/Tutorial/Hotmail/WhatsNew?ocid=TXT_TAGLM_WL_HM_Tutorial_WhatsNew1_052009
> _______________________________________________
> 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