mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-25 06:15:37 +03:00
Fix nextmap plugin failing in game where mp_chattime cvar doesn't exist (bug 5922, r=arkshine)
This commit is contained in:
parent
33cdfa644e
commit
64327b8ddb
@ -115,16 +115,20 @@ public sayFFStatus()
|
|||||||
|
|
||||||
public delayedChange(param[])
|
public delayedChange(param[])
|
||||||
{
|
{
|
||||||
set_pcvar_float(g_mp_chattime, get_pcvar_float(g_mp_chattime) - 2.0)
|
if (g_mp_chattime) {
|
||||||
|
set_pcvar_float(g_mp_chattime, get_pcvar_float(g_mp_chattime) - 2.0)
|
||||||
|
}
|
||||||
server_cmd("changelevel %s", param)
|
server_cmd("changelevel %s", param)
|
||||||
}
|
}
|
||||||
|
|
||||||
public changeMap()
|
public changeMap()
|
||||||
{
|
{
|
||||||
new string[32]
|
new string[32]
|
||||||
new Float:chattime = get_pcvar_float(g_mp_chattime)
|
new Float:chattime = g_mp_chattime ? get_pcvar_float(g_mp_chattime) : 10.0; // mp_chattime defaults to 10 in other mods
|
||||||
|
|
||||||
set_pcvar_float(g_mp_chattime, chattime + 2.0) // make sure mp_chattime is long
|
if (g_mp_chattime) {
|
||||||
|
set_pcvar_float(g_mp_chattime, chattime + 2.0) // make sure mp_chattime is long
|
||||||
|
}
|
||||||
new len = getNextMapName(string, charsmax(string)) + 1
|
new len = getNextMapName(string, charsmax(string)) + 1
|
||||||
set_task(chattime, "delayedChange", 0, string, len) // change with 1.5 sec. delay
|
set_task(chattime, "delayedChange", 0, string, len) // change with 1.5 sec. delay
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user