t = cvar_type(me.cvarName);
me.cvarType = "";
float needsForcing;
- if(strstrofs(strcat(" ", autocvar_menu_forced_saved_cvars, " "), strcat(" ", me.cvarName, " "), 0) >= 0)
+ if(strhasword(autocvar_menu_forced_saved_cvars, me.cvarName))
{
me.cvarType = strcat(me.cvarType, ", ", _("forced to be saved to config.cfg"));
needsForcing = 0;
}
- else if(strstrofs(strcat(" ", autocvar_menu_reverted_nonsaved_cvars, " "), strcat(" ", me.cvarName, " "), 0) >= 0)
+ else if(strhasword(autocvar_menu_reverted_nonsaved_cvars, me.cvarName))
{
// Currently claims to be saved, but won't be on next startup.
me.cvarType = strcat(me.cvarType, ", ", _("will not be saved"));
v = cvar_string(k);
d = cvar_defstring(k);
t = cvar_type(k);
- if(strstrofs(strcat(" ", autocvar_menu_forced_saved_cvars, " "), strcat(" ", k, " "), 0) >= 0)
+ if(strhasword(autocvar_menu_forced_saved_cvars, k))
theAlpha = SKINALPHA_CVARLIST_SAVED;
- else if(strstrofs(strcat(" ", autocvar_menu_reverted_nonsaved_cvars, " "), strcat(" ", k, " "), 0) >= 0)
+ else if(strhasword(autocvar_menu_reverted_nonsaved_cvars, k))
theAlpha = SKINALPHA_CVARLIST_TEMPORARY;
else if(t & CVAR_TYPEFLAG_SAVED)
theAlpha = SKINALPHA_CVARLIST_SAVED;
{
me.cvarValueBox.setText(me.cvarValueBox, me.cvarDefault);
me.cvarValueBox.cursorPos = strlen(me.cvarDefault);
- if(strstrofs(strcat(" ", autocvar_menu_forced_saved_cvars, " "), strcat(" ", me.cvarName, " "), 0) >= 0)
+ if(strhasword(autocvar_menu_forced_saved_cvars, me.cvarName))
{
cvar_set("menu_forced_saved_cvars", substring(strreplace(strcat(" ", me.cvarName, " "), " ", strcat(" ", autocvar_menu_forced_saved_cvars, " ")), 1, -2));
if (autocvar_menu_reverted_nonsaved_cvars == "")
void W_HitPlotOpen(entity player)
{
- if(autocvar_g_hitplots || strstrofs(strcat(" ", autocvar_g_hitplots_individuals, " "), strcat(" ", player.netaddress, " "), 0) >= 0)
+ if(autocvar_g_hitplots || strhasword(autocvar_g_hitplots_individuals, player.netaddress))
{
player.hitplotfh = fopen(strcat("hits-", matchid, "-", player.netaddress, "-", ftos(player.playerid), ".plot"), FILE_WRITE);
fputs(player.hitplotfh, strcat("#name ", player.netname, "\n"));