Merge remote-tracking branch 'upstream/development' into imageAsset_refactor_rev3

This commit is contained in:
marauder2k7 2025-05-12 14:45:41 +01:00
commit e1c01cd49a
152 changed files with 7312 additions and 4132 deletions

View file

@ -485,7 +485,7 @@ $guiContent = new GuiNavEditorCtrl(NavEditorGui, EditorGuiGroup) {
VertSizing = "bottom";
Extent = "90 18";
text = "Stop";
command = "NavEditorGui.getPlayer().stop();";
command = "NavEditorGui.stop();";
};
};
};

View file

@ -87,7 +87,7 @@ function NavEditorPlugin::onWorldEditorStartup(%this)
// Add ourselves to the Editor Settings window.
exec("./NavEditorSettingsTab.gui");
//ESettingsWindow.addTabPage(ENavEditorSettingsPage);
ESettingsWindow.addTabPage(ENavEditorSettingsPage);
ENavEditorSettingsPage.init();
// Add items to World Editor Creator
@ -104,6 +104,7 @@ function ENavEditorSettingsPage::init(%this)
{
// Initialises the settings controls in the settings dialog box.
%this-->SpawnClassOptions.clear();
%this-->SpawnClassOptions.add("Player");
%this-->SpawnClassOptions.add("AIPlayer");
%this-->SpawnClassOptions.setFirstSelected();
}

View file

@ -459,6 +459,14 @@ function NavEditorGui::onLinkSelected(%this, %flags)
function NavEditorGui::onPlayerSelected(%this, %flags)
{
if (!isObject(%this.getPlayer().aiController) && (!(%this.getPlayer().isMemberOfClass("AIPlayer"))))
{
%this.getPlayer().aiController = new AIController(){ ControllerData = %this.getPlayer().getDatablock().aiControllerData; };
%this.getPlayer().setAIController(%this.getPlayer().aiController);
}
NavMeshIgnore(%this.getPlayer(), true);
%this.getPlayer().setDamageState("Enabled");
updateLinkData(NavEditorOptionsWindow-->TestProperties, %flags);
}
@ -526,7 +534,7 @@ function NavEditorGui::findCover(%this)
%text = NavEditorOptionsWindow-->TestProperties->CoverPosition.getText();
if(%text !$= "")
%pos = eval("return " @ %text);
%this.getPlayer().findCover(%pos, NavEditorOptionsWindow-->TestProperties->CoverRadius.getText());
%this.getPlayer().getAIController().findCover(%pos, NavEditorOptionsWindow-->TestProperties->CoverRadius.getText());
}
}
@ -547,10 +555,19 @@ function NavEditorGui::followObject(%this)
toolsMessageBoxOk("Error", "Cannot find object" SPC %text);
}
if(isObject(%obj))
%this.getPlayer().followObject(%obj, NavEditorOptionsWindow-->TestProperties->FollowRadius.getText());
%this.getPlayer().getAIController().followObject(%obj, NavEditorOptionsWindow-->TestProperties->FollowRadius.getText());
}
}
function NavEditorGui::stop(%this)
{
if (isObject(%this.getPlayer().aiController))
%this.getPlayer().aiController.stop();
else
{
NavEditorGui.getPlayer().stop();
}
}
function NavInspector::inspect(%this, %obj)
{
%name = "";