Merge.
Merge.
1.1 --- a/core/smn_console.cpp Sun Jul 11 17:32:46 2010 -0700
1.2 +++ b/core/smn_console.cpp Sun Jul 11 17:33:09 2010 -0700
1.3 @@ -509,6 +509,24 @@
1.4 return 1;
1.5 }
1.6
1.7 +static cell_t GetConVarDefault(IPluginContext *pContext, const cell_t *params)
1.8 +{
1.9 + Handle_t hndl = static_cast<Handle_t>(params[1]);
1.10 + HandleError err;
1.11 + ConVar *pConVar;
1.12 +
1.13 + if ((err=g_ConVarManager.ReadConVarHandle(hndl, &pConVar))
1.14 + != HandleError_None)
1.15 + {
1.16 + return pContext->ThrowNativeError("Invalid convar handle %x (error %d)", hndl, err);
1.17 + }
1.18 +
1.19 + size_t bytes;
1.20 + pContext->StringToLocalUTF8(params[2], params[3], pConVar->GetDefault(), &bytes);
1.21 +
1.22 + return bytes;
1.23 +}
1.24 +
1.25 static cell_t sm_GetConVarFlags(IPluginContext *pContext, const cell_t *params)
1.26 {
1.27 Handle_t hndl = static_cast<Handle_t>(params[1]);
1.28 @@ -1406,6 +1424,7 @@
1.29 {"GetConVarBounds", sm_GetConVarBounds},
1.30 {"SetConVarBounds", sm_SetConVarBounds},
1.31 {"QueryClientConVar", sm_QueryClientConVar},
1.32 + {"GetConVarDefault", GetConVarDefault},
1.33 {"RegServerCmd", sm_RegServerCmd},
1.34 {"RegConsoleCmd", sm_RegConsoleCmd},
1.35 {"GetCmdArgString", sm_GetCmdArgString},
2.1 --- a/gamedata/sm-tf2.games.txt Sun Jul 11 17:32:46 2010 -0700
2.2 +++ b/gamedata/sm-tf2.games.txt Sun Jul 11 17:33:09 2010 -0700
2.3 @@ -18,7 +18,7 @@
2.4 "Burn"
2.5 {
2.6 "library" "server"
2.7 - "windows" "\x56\x8B\xF1\x8B\x8E\x2A\x2A\x00\x00\x8B\x01\x8B\x90\x2A\x2A\x00\x00\xFF\xD2\x84\xC0\x0F\x2A\x2A\x2A\x2A\x2A\x8B"
2.8 + "windows" "\x56\x8B\xF1\x8B\x8E\x2A\x2A\x00\x00\x8B\x01\x8B\x90\x2A\x2A\x00\x00\xFF\xD2\x84\xC0\x0F\x2A\x2A\x2A\x2A\x2A\x8B\x2A\x2A\x2A\x2A\x2A\x8B\xC8\xC1"
2.9 "linux" "@_ZN15CTFPlayerShared4BurnEP9CTFPlayerP13CTFWeaponBase"
2.10 "mac" "@_ZN15CTFPlayerShared4BurnEP9CTFPlayerP13CTFWeaponBase"
2.11 }
2.12 @@ -67,14 +67,14 @@
2.13 "AddCondition"
2.14 {
2.15 "library" "server"
2.16 - "windows" "\x56\x57\x8B\x7C\x2A\x2A\x8B\xF1\x8B\xCF\xBA\x01\x00\x00\x00\xD3\xE2\x8D\x46\x2A\x8D\x4C\x2A\x2A\x51\x0B\x10"
2.17 + "windows" "\x56\x57\x8B\x7C\x2A\x2A\x8B\xF1\x8B\xCF\xBA\x01\x00\x00\x00\xD3\xE2\x8D\x86\x2A\x2A\x2A\x2A\x8D\x4C\x2A\x2A\x51\x0B\x10\x8B"
2.18 "linux" "@_ZN15CTFPlayerShared7AddCondEif"
2.19 "mac" "@_ZN15CTFPlayerShared7AddCondEif"
2.20 }
2.21 "RemoveCondition"
2.22 {
2.23 "library" "server"
2.24 - "windows" "\x56\x57\x8B\x7C\x2A\x2A\x8B\xF1\x8B\xCF\xBA\x01\x00\x00\x00\xD3\xE2\x8D\x46\x2A\x8D\x4C\x2A\x2A\x51\xF7\xD2"
2.25 + "windows" "\x56\x57\x8B\x7C\x2A\x2A\x8B\xF1\x8B\xCF\xBA\x01\x00\x00\x00\xD3\xE2\x8D\x86\x2A\x2A\x2A\x2A\x8D\x4C\x2A\x2A\x51\xF7\xD2\x23"
2.26 "linux" "@_ZN15CTFPlayerShared10RemoveCondEi"
2.27 "mac" "@_ZN15CTFPlayerShared10RemoveCondEi"
2.28 }
3.1 --- a/plugins/include/console.inc Sun Jul 11 17:32:46 2010 -0700
3.2 +++ b/plugins/include/console.inc Sun Jul 11 17:33:09 2010 -0700
3.3 @@ -594,6 +594,17 @@
3.4 native ResetConVar(Handle:convar, bool:replicate=false, bool:notify=false);
3.5
3.6 /**
3.7 + * Retrieves the default string value of a console variable.
3.8 + *
3.9 + * @param convar Handle to the convar.
3.10 + * @param value Buffer to store the default value of the convar.
3.11 + * @param maxlength Maximum length of string buffer.
3.12 + * @return Number of bytes written to the buffer (UTF-8 safe).
3.13 + * @error Invalid or corrupt Handle.
3.14 + */
3.15 +native GetConVarDefault(Handle:convar, String:value[], maxlength);
3.16 +
3.17 +/**
3.18 * Returns the bitstring of flags on a console variable.
3.19 *
3.20 * @param convar Handle to the convar.
4.1 --- a/pushbuild.txt Sun Jul 11 17:32:46 2010 -0700
4.2 +++ b/pushbuild.txt Sun Jul 11 17:33:09 2010 -0700
4.3 @@ -19,3 +19,4 @@
4.4 Pants will save us from certain death.
4.5 Invaders' blood marches through my veins, like GIANT RADIOACTIVE RUBBER PANTS!
4.6 THE PANTS COMMAND COMMAND ME! DO NOT IGNORE MY VEINS.
4.7 +This file sure has gotten big.
4.8 \ No newline at end of file