X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fcampaign_file.qc;h=65e1917fabdddc6a5b5c4ba274a3c6dd58a87133;hb=1948b98a7b84eebacb68a139789951be0d1540fc;hp=4f099b53301010a383b9efaa5a27d9e2e5ceebaf;hpb=62d736d8c3a51baf5fa3a4265e39a2b773704a91;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/campaign_file.qc b/qcsrc/common/campaign_file.qc index 4f099b533..65e1917fa 100644 --- a/qcsrc/common/campaign_file.qc +++ b/qcsrc/common/campaign_file.qc @@ -1,9 +1,10 @@ #include "campaign_file.qh" + #if defined(CSQC) #elif defined(MENUQC) #elif defined(SVQC) - #include "util.qh" - #include "campaign_common.qh" + #include + #include #endif // CampaignFileLoad(offset, n) @@ -58,8 +59,8 @@ float CampaignFile_Load(int offset, float n) CAMPAIGN_GETARG; campaign_mapname[campaign_entries] = strzone(a); CAMPAIGN_GETARG; campaign_bots[campaign_entries] = stof(a); CAMPAIGN_GETARG; campaign_botskill[campaign_entries] = stof(a); - CAMPAIGN_GETARG; campaign_fraglimit[campaign_entries] = stof(a); - CAMPAIGN_GETARG; campaign_timelimit[campaign_entries] = stof(a); + CAMPAIGN_GETARG; campaign_fraglimit[campaign_entries] = strzone(a); + CAMPAIGN_GETARG; campaign_timelimit[campaign_entries] = strzone(a); CAMPAIGN_GETARG; campaign_mutators[campaign_entries] = strzone(a); CAMPAIGN_GETARG; campaign_shortdesc[campaign_entries] = strzone(a); CAMPAIGN_GETARG; campaign_longdesc[campaign_entries] = strzone(strreplace("\\n", "\n", a)); @@ -91,6 +92,8 @@ void CampaignFile_Unload() { strfree(campaign_gametype[i]); strfree(campaign_mapname[i]); + strfree(campaign_fraglimit[i]); + strfree(campaign_timelimit[i]); strfree(campaign_mutators[i]); strfree(campaign_shortdesc[i]); strfree(campaign_longdesc[i]);