Creates a variable if not found and sets their value, the parsed float value and their flags.
(String var_name, String value, int flags)
| 168 | * Creates a variable if not found and sets their value, the parsed float value and their flags. |
| 169 | */ |
| 170 | public cvar_t FullSet(String var_name, String value, int flags) { |
| 171 | cvar_t var; |
| 172 | |
| 173 | var = FindVar(var_name); |
| 174 | if (null == var) { // create it |
| 175 | return Get(var_name, value, flags); |
| 176 | } |
| 177 | |
| 178 | var.modified = true; |
| 179 | |
| 180 | if ((var.flags & CVAR_USERINFO) != 0) |
| 181 | Globals.userinfo_modified = true; // transmit at next oportunity |
| 182 | |
| 183 | var.string = value; |
| 184 | var.value = Lib.atof(var.string); |
| 185 | var.flags = flags; |
| 186 | |
| 187 | return var; |
| 188 | } |
| 189 | |
| 190 | /** |
| 191 | * Sets the value of the variable without forcing. |