forked from teamnwah/openmw-tes3coop
Make forcegreeting a non-op for non-actor objects (bug #4553)
This commit is contained in:
parent
452a706047
commit
b0f2e00e7f
3 changed files with 18 additions and 1 deletions
|
@ -77,10 +77,11 @@
|
||||||
Bug #4539: Paper Doll is affected by GUI scaling
|
Bug #4539: Paper Doll is affected by GUI scaling
|
||||||
Bug #4545: Creatures flee from werewolves
|
Bug #4545: Creatures flee from werewolves
|
||||||
Bug #4551: Replace 0 sound range with default range separately
|
Bug #4551: Replace 0 sound range with default range separately
|
||||||
|
Bug #4553: Forcegreeting on non-actor opens a dialogue window which cannot be closed
|
||||||
Feature #2606: Editor: Implemented (optional) case sensitive global search
|
Feature #2606: Editor: Implemented (optional) case sensitive global search
|
||||||
Feature #3083: Play animation when NPC is casting spell via script
|
Feature #3083: Play animation when NPC is casting spell via script
|
||||||
Feature #3103: Provide option for disposition to get increased by successful trade
|
Feature #3103: Provide option for disposition to get increased by successful trade
|
||||||
Feature #3276: Editor: Search- Show number of (remaining) search results and indicate a search without any results
|
Feature #3276: Editor: Search - Show number of (remaining) search results and indicate a search without any results
|
||||||
Feature #3641: Editor: Limit FPS in 3d preview window
|
Feature #3641: Editor: Limit FPS in 3d preview window
|
||||||
Feature #3703: Ranged sneak attack criticals
|
Feature #3703: Ranged sneak attack criticals
|
||||||
Feature #4012: Editor: Write a log file if OpenCS crashes
|
Feature #4012: Editor: Write a log file if OpenCS crashes
|
||||||
|
|
|
@ -408,6 +408,12 @@ namespace MWGui
|
||||||
|
|
||||||
void DialogueWindow::setPtr(const MWWorld::Ptr& actor)
|
void DialogueWindow::setPtr(const MWWorld::Ptr& actor)
|
||||||
{
|
{
|
||||||
|
if (!actor.getClass().isActor())
|
||||||
|
{
|
||||||
|
std::cerr << "Warning: can not talk with non-actor object." << std::endl;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
bool sameActor = (mPtr == actor);
|
bool sameActor = (mPtr == actor);
|
||||||
if (!sameActor)
|
if (!sameActor)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
#include "dialogueextensions.hpp"
|
#include "dialogueextensions.hpp"
|
||||||
|
|
||||||
#include <components/compiler/extensions.hpp>
|
#include <components/compiler/extensions.hpp>
|
||||||
|
@ -134,6 +136,14 @@ namespace MWScript
|
||||||
if (!ptr.getRefData().isEnabled())
|
if (!ptr.getRefData().isEnabled())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (!ptr.getClass().isActor())
|
||||||
|
{
|
||||||
|
const std::string error = "Warning: \"forcegreeting\" command works only for actors.";
|
||||||
|
runtime.getContext().report (error);
|
||||||
|
std::cerr << error << std::endl;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
MWBase::Environment::get().getWindowManager()->pushGuiMode(MWGui::GM_Dialogue, ptr);
|
MWBase::Environment::get().getWindowManager()->pushGuiMode(MWGui::GM_Dialogue, ptr);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue