Server: Use the undocumented (but handy) readcmd instead of localcmd to parse skill files instantly. This will avoid the bug of delayed config loading. That's the theory.
This commit is contained in:
parent
9d58f78548
commit
da7c5a27e2
3 changed files with 12 additions and 4 deletions
|
@ -252,10 +252,7 @@ void worldspawn(void)
|
|||
lightstyle(9, "aaaaaaaazzzzzzzz");
|
||||
lightstyle(10, "mmamammmmammamamaaamammma");
|
||||
lightstyle(11, "abcdefghijklmnopqrrqponmlkjihgfedcba");
|
||||
|
||||
/* sometimes we have extra overrides that the original does not
|
||||
provide. so we execute our mod-specific config here */
|
||||
localcmd(sprintf("exec skill_%s.cfg\n", cvar_string("game")));
|
||||
Skill_Init();
|
||||
}
|
||||
|
||||
float ConsoleCmd(string cmd)
|
||||
|
|
|
@ -14,6 +14,16 @@
|
|||
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
string(string cmd) readcmd = #0;
|
||||
|
||||
void
|
||||
Skill_Init(void)
|
||||
{
|
||||
/* sometimes we have extra overrides that the original does not
|
||||
provide. so we execute our mod-specific config here */
|
||||
readcmd(sprintf("exec skill_%s.cfg\n", cvar_string("game")));
|
||||
}
|
||||
|
||||
float Skill_GetValue(string variable)
|
||||
{
|
||||
float skill = cvar("skill");
|
||||
|
|
|
@ -15,4 +15,5 @@
|
|||
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
void Skill_Init(void);
|
||||
float Skill_GetValue(string);
|
||||
|
|
Loading…
Reference in a new issue