Skip to content

Commit

Permalink
Update cvar hxdd_installed_hexen2 references
Browse files Browse the repository at this point in the history
  • Loading branch information
Lemon-King committed Oct 16, 2023
1 parent a1516f2 commit a7eebba
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -251,18 +251,19 @@ class NWeapSpellbook : NecromancerWeapon

// All 3 projectiles use veer
// Make this work: https://github.com/videogamepreservation/hexen2/blob/eac5fd50832ce2509226761b3b1a387c468e7a50/H2MP/hcode/projbhvr.hc#L51
String cvarHX2 = LemonUtil.CVAR_GetString("hxdd_installed_hexen2_world", "", Player);
if (hasTome) {
NWeapSpellbook_MagicMissile mmisA = NWeapSpellbook_MagicMissile(SpawnFirstPerson("NWeapSpellbook_MagicMissilePower", 30, 10, -3, false, 0, 0));
NWeapSpellbook_MagicMissile mmisB = NWeapSpellbook_MagicMissile(SpawnFirstPerson("NWeapSpellbook_MagicMissilePower", 30, 10, -3, false, 0, 0));
NWeapSpellbook_MagicMissile mmisC = NWeapSpellbook_MagicMissile(SpawnFirstPerson("NWeapSpellbook_MagicMissilePower", 30, 10, -3, false, 0, 0));
if (LemonUtil.CVAR_GetBool("hxdd_installed_hexen2_world", false, Player)) {
if (cvarHX2.IndexOf("world") != -1) {
mmisA.useNewModel = true;
mmisB.useNewModel = true;
mmisC.useNewModel = true;
}
} else {
NWeapSpellbook_MagicMissile mmis = NWeapSpellbook_MagicMissile(SpawnFirstPerson("NWeapSpellbook_MagicMissile", 40, 10, -3, false, 0, 0));
if (LemonUtil.CVAR_GetBool("hxdd_installed_hexen2_world", false, Player)) {
if (cvarHX2.IndexOf("world") != -1) {
mmis.useNewModel = true;
}
}
Expand Down
7 changes: 3 additions & 4 deletions resources/assets/zscript/menu/newgame.zs
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,8 @@ class ZFPlayerClassSelection ui {
btnClassMage.Create(frame, cmdHandlerClassSelect, (hexenPosY + 200, classLineX), 1.5, "Mage", "HXDDMagePlayer", "graphics/M_MBOX.png", imagesMage);

// Cvar hxdd_installed_hexen2 is located in cvarinfo.installed_hexen2
bool cvarHexII = LemonUtil.CVAR_GetBool('hxdd_installed_hexen2', false);
if (cvarHexII) {
string cvarHX2 = LemonUtil.CVAR_GetString('hxdd_installed_hexen2', "");
if (cvarHX2.IndexOf("base") != -1) {
// display Hexen II classes
double classLineXOffset = (136 * 1.5) + 50;
btnClassAssassin = new("ButtonPlayerClass");
Expand All @@ -224,8 +224,7 @@ class ZFPlayerClassSelection ui {
btnClassPaladin.CreateHX2(frame, cmdHandlerClassSelect, (hexenPosY + 160, classLineX + classLineXOffset), 1.5, "Assassin", "HX2AssassinPlayer", "graphics/netp4.png");

// Cvar hxdd_installed_hexen2_expansion is located in cvarinfo.installed_hexen2_expansion
bool cvarHexII_EX = LemonUtil.CVAR_GetBool('hxdd_installed_hexen2_expansion', false);
if (cvarHexII_EX) {
if (cvarHX2.IndexOf("portals") != -1) {
// display Hexen II Expansion classes
btnClassSuccubus = new("ButtonPlayerClass");
btnClassSuccubus.CreateHX2(frame, cmdHandlerClassSelect, (hexenPosY + 320, classLineX + classLineXOffset), 1.5, "Demoness", "HX2SuccubusPlayer", "graphics/netp5.png");
Expand Down

0 comments on commit a7eebba

Please sign in to comment.