#include "campaign_file.qh"
+
#if defined(CSQC)
#elif defined(MENUQC)
#elif defined(SVQC)
- #include "util.qh"
- #include "campaign_common.qh"
+ #include <common/util.qh>
+ #include <common/campaign_common.qh>
#endif
// CampaignFileLoad(offset, 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);
+ #ifdef SVQC
+ CAMPAIGN_GETARG;
+ CAMPAIGN_GETARG;
+ #else
CAMPAIGN_GETARG; campaign_shortdesc[campaign_entries] = strzone(a);
CAMPAIGN_GETARG; campaign_longdesc[campaign_entries] = strzone(strreplace("\\n", "\n", a));
+ #endif
if(i > entlen)
error("syntax error in campaign file: line has not enough fields");
{
strfree(campaign_gametype[i]);
strfree(campaign_mapname[i]);
+ strfree(campaign_fraglimit[i]);
+ strfree(campaign_timelimit[i]);
strfree(campaign_mutators[i]);
+ #ifndef SVQC
strfree(campaign_shortdesc[i]);
strfree(campaign_longdesc[i]);
+ #endif
}
campaign_entries = 0;
}