Skip to content

Commit bfc3459

Browse files
committed
print message error, color print removed
1 parent 96b5c65 commit bfc3459

1 file changed

Lines changed: 16 additions & 15 deletions

File tree

user/sofplus/addons/http2.func

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ function http2_init()
1717

1818
function http2_init_print()
1919
{
20-
echo "[HTTP] Version v1.6 Loaded"
20+
echo "[HTTP] Version v1.7 Loaded"
2121
}
2222

2323
//2 -> 4 -> 7 -> 8
@@ -73,7 +73,7 @@ function http2_state_change(*)
7373
sp_sc_flow_if text cvar _http2_not_exist_local == val 1
7474
{
7575
// It doesn't request .bsp file thus download succeeded.
76-
sp_sc_cvar_sset ~text "[HTTP] " #_sp_cl_info_map ".zip was downloaded."
76+
sp_sc_cvar_sset ~text "[HTTP] " #_sp_cl_info_map ".zip was downloaded."
7777
echo #~text
7878
}
7979
sp_sc_func_exec http2_fast_loop $_http2_thread_ids "stop"
@@ -148,7 +148,7 @@ function http2_spawn_dl(~thread_id)
148148
{
149149
// We have duration of configstrings to download map ( should freeze here possibly )
150150
set _http2_not_exist_local 1
151-
sp_sc_cvar_sset ~text "[HTTP] Checking repo for " #_sp_cl_info_map ".zip"
151+
sp_sc_cvar_sset ~text "[HTTP] Checking repo for " #_sp_cl_info_map ".zip"
152152
echo #~text
153153
sp_sc_cvar_save http_tmp ~full_path
154154
}
@@ -163,22 +163,23 @@ function http2_dl_filename(*)
163163
sp_sc_cvar_split ~split "." ~filename
164164
//last item
165165
sp_sc_cvar_copy ~ext ~split_$~split_0
166-
sp_sc_flow_if text cvar ~ext == val "bsp"
166+
sp_sc_flow_if text cvar _http2_not_exist_local == val 1
167167
{
168-
// Bsp is always downloaded first, so indicates map wasn't in repo. (ignores .sp and extras)
169-
// Or the time it took to http download was too long. ( rare case. )
170-
sp_sc_cvar_sset ~text "[HTTP] Map " #_sp_cl_info_map ".zip _probably_ not in repo"
171-
echo #~text
172-
}
173-
else
174-
{
175-
sp_sc_flow_if text cvar _http2_not_exist_local == val 1
168+
sp_sc_flow_if text cvar ~ext == val "bsp"
169+
{
170+
// Bsp is always downloaded first, so indicates map wasn't in repo. (ignores .sp and extras)
171+
// Or the time it took to http download was too long. ( rare case. )
172+
sp_sc_cvar_sset ~text "[HTTP] Map " #_sp_cl_info_map ".zip _probably_ not in repo"
173+
echo #~text
174+
}
175+
else
176176
{
177177
// It doesn't request .bsp file thus download succeeded.
178-
sp_sc_cvar_sset ~text "[HTTP] " #_sp_cl_info_map ".zip was downloaded."
178+
sp_sc_cvar_sset ~text "[HTTP] " #_sp_cl_info_map ".zip was downloaded."
179179
echo #~text
180-
set _http2_not_exist_local 0
181180
}
182-
181+
// Only triggers once.
182+
set _http2_not_exist_local 0
183183
}
184+
184185
}

0 commit comments

Comments
 (0)