NSGameRules: add method 'Title' which returns the print name for a given gamerule.
This commit is contained in:
parent
70bb77d2bb
commit
5c5eedb665
3 changed files with 12 additions and 1 deletions
|
@ -116,6 +116,9 @@ public:
|
|||
/** Called by Nuclide when the server has received a chat message
|
||||
that is to be distributed amongst all clients of the same team. */
|
||||
virtual void ChatMessageTeam(NSClient, string);
|
||||
|
||||
/** Returns the title of the gamemode running. */
|
||||
virtual string Title(void);
|
||||
|
||||
/* spectator */
|
||||
/*
|
||||
|
|
|
@ -533,3 +533,9 @@ NSGameRules::ChatMessageTeam(NSClient cl, string strMessage)
|
|||
|
||||
localcmd(sprintf("echo [TEAM] %s: %s\n", cl.netname, strMessage));
|
||||
}
|
||||
|
||||
string
|
||||
NSGameRules::Title(void)
|
||||
{
|
||||
return "Default";
|
||||
}
|
|
@ -403,8 +403,10 @@ initents(void)
|
|||
Sound_Precache("step_swim.left");
|
||||
Sound_Precache("step_swim.right");
|
||||
|
||||
if (!g_grMode)
|
||||
if (!g_grMode) {
|
||||
Game_InitRules();
|
||||
forceinfokey(world, "mode", g_grMode.Title());
|
||||
}
|
||||
|
||||
Game_Worldspawn();
|
||||
Decals_Init();
|
||||
|
|
Loading…
Reference in a new issue