Update after dev merge

This commit is contained in:
aMannus 2025-06-30 10:04:21 +02:00
commit a6b2d6c3ce
3 changed files with 26 additions and 21 deletions

View file

@ -537,10 +537,10 @@ GameInteractionEffectQueryResult GameInteractor::RawAction::SpawnEnemyWithOffset
if (actor == NULL) {
return GameInteractionEffectQueryResult::TemporarilyNotPossible;
}
if (nameTag != "" && CVarGetInteger(CVAR_ENHANCEMENT("CrowdControl.EnemyNameTags"), 0)) {
if (nameTag != "" && CVarGetInteger(CVAR_REMOTE_CROWD_CONTROL("EnemyNameTags"), 0)) {
NameTag_RegisterForActor(actor, nameTag.c_str());
}
if (CVarGetInteger(CVAR_ENHANCEMENT("CrowdControl.SpawnedEnemiesIgnoredIngame"), 0)) {
if (CVarGetInteger(CVAR_REMOTE_CROWD_CONTROL("SpawnedEnemiesIgnoredIngame"), 0)) {
Actor_ChangeCategory(gPlayState, &gPlayState->actorCtx, actor, ACTORCAT_NPC);
}
}
@ -549,10 +549,10 @@ GameInteractionEffectQueryResult GameInteractor::RawAction::SpawnEnemyWithOffset
Actor* actor =
Actor_Spawn(&gPlayState->actorCtx, gPlayState, enemyId, pos.x, pos.y, pos.z, 0, 0, 0, enemyParams, 0);
if (actor != NULL) {
if (nameTag != "" && CVarGetInteger(CVAR_ENHANCEMENT("CrowdControl.EnemyNameTags"), 0)) {
if (nameTag != "" && CVarGetInteger(CVAR_REMOTE_CROWD_CONTROL("EnemyNameTags"), 0)) {
NameTag_RegisterForActor(actor, nameTag.c_str());
}
if (CVarGetInteger(CVAR_ENHANCEMENT("CrowdControl.SpawnedEnemiesIgnoredIngame"), 0)) {
if (CVarGetInteger(CVAR_REMOTE_CROWD_CONTROL("SpawnedEnemiesIgnoredIngame"), 0)) {
Actor_ChangeCategory(gPlayState, &gPlayState->actorCtx, actor, ACTORCAT_NPC);
}
return GameInteractionEffectQueryResult::Possible;
@ -580,7 +580,7 @@ GameInteractionEffectQueryResult GameInteractor::RawAction::SpawnActor(uint32_t
return GameInteractionEffectQueryResult::TemporarilyNotPossible;
}
if (nameTag != "" && CVarGetInteger(CVAR_ENHANCEMENT("CrowdControl.EnemyNameTags"), 0)) {
if (nameTag != "" && CVarGetInteger(CVAR_REMOTE_CROWD_CONTROL("EnemyNameTags"), 0)) {
NameTag_RegisterForActor((Actor*)cucco, nameTag.c_str());
}
cucco->actionFunc = func_80AB70A0_nocutscene;
@ -605,10 +605,10 @@ GameInteractionEffectQueryResult GameInteractor::RawAction::SpawnActor(uint32_t
Actor* actor = Actor_Spawn(&gPlayState->actorCtx, gPlayState, actorId, player->actor.world.pos.x,
player->actor.world.pos.y, player->actor.world.pos.z, 0, 0, 0, actorParams, 0);
if (actor != NULL) {
if (nameTag != "" && CVarGetInteger(CVAR_ENHANCEMENT("CrowdControl.EnemyNameTags"), 0)) {
if (nameTag != "" && CVarGetInteger(CVAR_REMOTE_CROWD_CONTROL("EnemyNameTags"), 0)) {
NameTag_RegisterForActor((Actor*)actor, nameTag.c_str());
}
if (CVarGetInteger(CVAR_ENHANCEMENT("CrowdControl.SpawnedEnemiesIgnoredIngame"), 0)) {
if (CVarGetInteger(CVAR_REMOTE_CROWD_CONTROL("SpawnedEnemiesIgnoredIngame"), 0)) {
Actor_ChangeCategory(gPlayState, &gPlayState->actorCtx, actor, ACTORCAT_NPC);
}
return GameInteractionEffectQueryResult::Possible;

View file

@ -96,21 +96,15 @@ void SohMenu::AddMenuNetwork() {
AddSidebarEntry("Network", path.sidebarName, 3);
path.column = SECTION_COLUMN_1;
AddWidget(path, "About Crowd Control", WIDGET_SEPARATOR_TEXT);
AddWidget(path,
"Crowd Control is a platform that allows viewers to interact "
"with a streamer's game in real time.\n"
"\n"
"Click the question mark to copy the link to the Crowd Control "
"website to your clipboard.",
"Please head over to www.crowdcontrol.live for more information!",
WIDGET_TEXT);
AddWidget(path, ICON_FA_CLIPBOARD "##CrowdControl", WIDGET_BUTTON)
.Callback([](WidgetInfo& info) {
ImGui::SetClipboardText("https://crowdcontrol.live");
Notification::Emit({
.message = "Copied to clipboard",
});
})
.Options(ButtonOptions().Tooltip("https://crowdcontrol.live"));
AddWidget(path, "Connect to Crowd Control", WIDGET_SEPARATOR_TEXT);
AddWidget(path, "Host & Port", WIDGET_CUSTOM).CustomFunction([](WidgetInfo& info) {
ImGui::BeginDisabled(CrowdControl::Instance->isEnabled || CVarGetInteger(CVAR_SETTING("DisableChanges"), 0));
ImGui::Text("%s", info.name.c_str());
@ -155,14 +149,25 @@ void SohMenu::AddMenuNetwork() {
CrowdControl::Instance->Enable();
}
});
AddWidget(path, "Connecting...##CrowdControl", WIDGET_TEXT).PreFunc([](WidgetInfo& info) {
AddWidget(path, "Connecting...", WIDGET_TEXT).PreFunc([](WidgetInfo& info) {
info.isHidden = !CrowdControl::Instance->isEnabled;
if (CrowdControl::Instance->isConnected) {
info.name = "Connected##CrowdControl";
info.name = "Connected";
} else {
info.name = "Connecting...##CrowdControl";
info.name = "Connecting...";
}
});
AddWidget(path, "Additional Settings", WIDGET_SEPARATOR_TEXT);
AddWidget(path, "Enemy Name Tags", WIDGET_CVAR_CHECKBOX)
.CVar(CVAR_REMOTE_CROWD_CONTROL("EnemyNameTags"))
.RaceDisable(true)
.Options(CheckboxOptions().Tooltip(
"When viewers spawn enemies, the enemy will have a name tag above them with the viewer's name."));
AddWidget(path, "Spawned Enemies Ignored Ingame", WIDGET_CVAR_CHECKBOX)
.CVar(CVAR_REMOTE_CROWD_CONTROL("SpawnedEnemiesIgnoredIngame"))
.RaceDisable(true)
.Options(CheckboxOptions().Tooltip(
"Enemies spawned by CrowdControl won't be considered for \"clear enemy rooms\", so they don't need to be killed to complete these rooms."));
}
} // namespace SohGui

View file

@ -60,7 +60,7 @@ void EnAttackNiw_Init(Actor* thisx, PlayState* play) {
this->actionFunc = func_809B5670;
if (CVarGetInteger("gCrowdControl", 0) &&
CVarGetInteger(CVAR_ENHANCEMENT("CrowdControl.SpawnedEnemiesIgnoredIngame"), 0)) {
CVarGetInteger(CVAR_REMOTE_CROWD_CONTROL("SpawnedEnemiesIgnoredIngame"), 0)) {
Actor_ChangeCategory(gPlayState, &gPlayState->actorCtx, this, ACTORCAT_NPC);
}
}