- Code: Select all • Expand view
class Loadout1Butts:CustomInventory{
states{
pickup:
TNT1 A 0{
A_Log(cvar.getcvar("hd_loadout1",player).getstring());
cvar.getcvar("hd_loadout1",player).setstring("butts");
A_Log(cvar.getcvar("hd_loadout1",player).getstring());
}stop;
}
}
class Load20Boobs:CustomInventory{
states{
pickup:
TNT1 A 0{
A_LogInt(cvar.getcvar("hd_load20",player).getint());
cvar.getcvar("hd_load20",player).setint(80085);
A_LogInt(cvar.getcvar("hd_load20",player).getint());
}stop;
}
}
and CVARINFO:
- Code: Select all • Expand view
user string hd_loadout1="";
user int hd_load20=0;
Expected:
Typing "give Loadout1Butts" the first time will output
- Code: Select all • Expand view
butts
and all subsequent give calls will output
- Code: Select all • Expand view
butts
butts
Actual:
Typing "give Loadout1Butts" the first time in every new session will output
- Code: Select all • Expand view
butts
but will work fine for the rest of that session alone, even if I start a new game.
Same thing with the integer version, mutatis mutandis.
Also if I give this item and then check the cvar's value from the console, the console will return the original value even though the CVar...Get* function will return the new value.
I have only tried this in Debian, in case this is an issue with where the ini is stored on a given OS.