X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fturrets%2Fconfig.qc;h=022e73c5e3e2581756acb5cfa4e0f954a295b389;hb=e9815ad279dc61506e5e65c34348fa7dcc570b9e;hp=1a8c2cbe7705e4bf9bf3f037eb37aa8d48107b97;hpb=120ad19fdf46b7096a0f90b940e590f1909ad22c;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/turrets/config.qc b/qcsrc/common/turrets/config.qc index 1a8c2cbe7..022e73c5e 100644 --- a/qcsrc/common/turrets/config.qc +++ b/qcsrc/common/turrets/config.qc @@ -25,31 +25,31 @@ float T_Config_Queue_Compare(float root, float child, entity pass) return 0; } -void Dump_Turret_Settings(void) +void Dump_Turret_Settings() { float x, totalsettings = 0; - FOREACH(turret_info, it != TUR_Null, LAMBDA({ + FOREACH(Turrets, it != TUR_Null, { // step 1: clear the queue TUR_CONFIG_COUNT = 0; for(x = 0; x <= MAX_TUR_CONFIG; ++x) { tur_config_queue[x] = string_null; } // step 2: build new queue - TUR_ACTION(i, TR_CONFIG); + it.tr_config(it); // step 3: sort queue heapsort(TUR_CONFIG_COUNT, T_Config_Queue_Swap, T_Config_Queue_Compare, world); // step 4: write queue - TUR_CONFIG_WRITETOFILE(sprintf("// {{{ #%d: %s\n", i, TUR_NAME(i))) + TUR_CONFIG_WRITETOFILE(sprintf("// {{{ #%d: %s\n", i, it.turret_name)) for(x = 0; x <= TUR_CONFIG_COUNT; ++x) { TUR_CONFIG_WRITETOFILE(tur_config_queue[x]) } TUR_CONFIG_WRITETOFILE("// }}}\n") // step 5: debug info - LOG_INFO(sprintf("#%d: %s: %d settings...\n", i, TUR_NAME(i), TUR_CONFIG_COUNT)); + LOG_INFO(sprintf("#%d: %s: %d settings...\n", i, it.turret_name, TUR_CONFIG_COUNT)); totalsettings += TUR_CONFIG_COUNT; - })); + }); // clear queue now that we're finished TUR_CONFIG_COUNT = 0; @@ -57,5 +57,5 @@ void Dump_Turret_Settings(void) { tur_config_queue[x] = string_null; } // extra information - LOG_INFO(sprintf("Totals: %d turrets, %d settings\n", (TUR_COUNT - 1), totalsettings)); + LOG_INFO(sprintf("Totals: %d turrets, %d settings\n", (Turrets_COUNT - 1), totalsettings)); }