diff --git a/Configurator/IniViewModel.cs b/Configurator/IniViewModel.cs
index 59ac040be..a411d3413 100644
--- a/Configurator/IniViewModel.cs
+++ b/Configurator/IniViewModel.cs
@@ -30,6 +30,9 @@ public class IniViewModel : DependencyObject
public static readonly DependencyProperty SoftShadowsProperty = DependencyProperty.Register(
"SoftShadows", typeof (bool), typeof (IniViewModel), new PropertyMetadata(default(bool)));
+ public static readonly DependencyProperty WindowedLockCursorProperty = DependencyProperty.Register(
+ "WindowedLockCursor", typeof(bool), typeof(IniViewModel), new PropertyMetadata(default(bool)));
+
public static readonly DependencyProperty HpOnLevelUpProperty = DependencyProperty.Register(
"HpOnLevelUp", typeof (HpOnLevelUpType), typeof (IniViewModel),
new PropertyMetadata(default(HpOnLevelUpType)));
@@ -131,6 +134,12 @@ public bool SoftShadows
set { SetValue(SoftShadowsProperty, value); }
}
+ public bool WindowedLockCursor
+ {
+ get { return (bool)GetValue(WindowedLockCursorProperty); }
+ set { SetValue(WindowedLockCursorProperty, value); }
+ }
+
public HpOnLevelUpType HpOnLevelUp
{
get { return (HpOnLevelUpType) GetValue(HpOnLevelUpProperty); }
@@ -275,6 +284,7 @@ public void LoadFromIni(IniData iniData)
SoftShadows = tpData["softShadows"] == "true";
AntiAliasing = tpData["antialiasing"] == "true";
WindowedMode = tpData["windowed"] == "true";
+ WindowedLockCursor = tpData["windowedLockCursor"] == "true";
int maxLevel;
if (int.TryParse(tpData["maxLevel"], out maxLevel))
@@ -373,6 +383,7 @@ public void SaveToIni(IniData iniData)
tpData["windowHeight"] = RenderHeight.ToString();
tpData["antialiasing"] = AntiAliasing? "true" : "false";
tpData["softShadows"] = SoftShadows ? "true" : "false";
+ tpData["windowedLockCursor"] = WindowedLockCursor ? "true" : "false";
tpData["maxLevel"] = MaxLevel.ToString();
tpData["allowXpOverflow"] = AllowXpOverflow ? "true" : "false";
tpData["slowerLevelling"] = SlowerLevelling ? "true" : "false";
diff --git a/Configurator/MainWindow.xaml b/Configurator/MainWindow.xaml
index 6b4eda2f0..724d3362d 100644
--- a/Configurator/MainWindow.xaml
+++ b/Configurator/MainWindow.xaml
@@ -33,6 +33,7 @@
+
diff --git a/TemplePlus/dispatcher.cpp b/TemplePlus/dispatcher.cpp
index 721477b4b..0bf0f85f2 100644
--- a/TemplePlus/dispatcher.cpp
+++ b/TemplePlus/dispatcher.cpp
@@ -548,29 +548,31 @@ void DispatcherSystem::DispatchConditionRemove(Dispatcher* dispatcher, CondNode*
{
for (auto subDispNode = dispatcher->subDispNodes[dispTypeConditionRemove]; subDispNode; subDispNode = subDispNode->next)
{
- if (subDispNode->subDispDef->dispKey == 0)
- {
- DispatcherCallbackArgs dca;
- dca.dispIO = nullptr;
- dca.dispType = dispTypeConditionRemove;
- dca.dispKey = 0;
- dca.objHndCaller = dispatcher->objHnd;
- dca.subDispNode = subDispNode;
- subDispNode->subDispDef->dispCallback(dca.subDispNode, dca.objHndCaller, dca.dispType, dca.dispKey, dca.dispIO);
+ if (subDispNode->subDispDef->dispKey == 0){
+ if (!(subDispNode->condNode->flags & 1) && (subDispNode->condNode == cond)){
+ DispatcherCallbackArgs dca;
+ dca.dispIO = nullptr;
+ dca.dispType = dispTypeConditionRemove;
+ dca.dispKey = 0;
+ dca.objHndCaller = dispatcher->objHnd;
+ dca.subDispNode = subDispNode;
+ subDispNode->subDispDef->dispCallback(dca.subDispNode, dca.objHndCaller, dca.dispType, dca.dispKey, dca.dispIO);
+ }
}
}
for (auto subDispNode = dispatcher->subDispNodes[dispTypeConditionRemove2]; subDispNode; subDispNode = subDispNode->next)
{
- if (subDispNode->subDispDef->dispKey == 0)
- {
- DispatcherCallbackArgs dca;
- dca.dispIO = nullptr;
- dca.dispType = dispTypeConditionRemove2;
- dca.dispKey = 0;
- dca.objHndCaller = dispatcher->objHnd;
- dca.subDispNode = subDispNode;
- subDispNode->subDispDef->dispCallback(dca.subDispNode, dca.objHndCaller, dca.dispType, dca.dispKey, dca.dispIO);
+ if (subDispNode->subDispDef->dispKey == 0){
+ if (!(subDispNode->condNode->flags & 1) && (subDispNode->condNode == cond)) {
+ DispatcherCallbackArgs dca;
+ dca.dispIO = nullptr;
+ dca.dispType = dispTypeConditionRemove2;
+ dca.dispKey = 0;
+ dca.objHndCaller = dispatcher->objHnd;
+ dca.subDispNode = subDispNode;
+ subDispNode->subDispDef->dispCallback(dca.subDispNode, dca.objHndCaller, dca.dispType, dca.dispKey, dca.dispIO);
+ }
}
}
cond->flags |= 1;
diff --git a/TemplePlus/mainloop.cpp b/TemplePlus/mainloop.cpp
index d55996c85..a28540788 100644
--- a/TemplePlus/mainloop.cpp
+++ b/TemplePlus/mainloop.cpp
@@ -267,7 +267,7 @@ void GameLoop::RenderFrame() {
tig->GetShapeRenderer2d().DrawRectangle(0, 0, w, h, gfadeColor);
}
- ImGui::ShowTestWindow();
+ // ImGui::ShowTestWindow();
tig->GetConsole().Render();
diff --git a/TemplePlus/spell.cpp b/TemplePlus/spell.cpp
index ba9b60f2c..a6abb350f 100644
--- a/TemplePlus/spell.cpp
+++ b/TemplePlus/spell.cpp
@@ -1940,8 +1940,8 @@ uint32_t LegacySpellSystem::spellCanCast(objHndl objHnd, uint32_t spellEnum, uin
&& spellSys.GetCastingClass(classCodesVec[i] ) == classEnum
&& spellLevelsVec[i] <= (int)spellLevel)
{
- if (spellLevelsVec[i] < (int)spellLevel)
- logger->info("Natural Spell Caster spellCanCast check - spell known is lower level than spellCanCast queried spell. Is this ok?? (this is vanilla code here...)");
+ //if (spellLevelsVec[i] < (int)spellLevel)
+ // logger->info("Natural Spell Caster spellCanCast check - spell known is lower level than spellCanCast queried spell. Is this ok?? (this is vanilla code here...)"); // yes
return 1;
}