Skip to content
Browse files

make even more sure that unscheduled actors can never be seen

  • Loading branch information...
1 parent 8169691 commit 613b68d1e9768618ee9ae49ec4f343dcd69bcc29 @fizzet fizzet committed
Showing with 3 additions and 9 deletions.
  1. +2 −8 gemrb/core/GameScript/GSUtils.cpp
  2. +1 −1 gemrb/plugins/GUIScript/GUIScript.cpp
View
10 gemrb/core/GameScript/GSUtils.cpp
@@ -556,8 +556,8 @@ int CanSee(Scriptable* Sender, Scriptable* target, bool range, int seeflag)
//non actors can be seen too (reducing function to LOS)
int SeeCore(Scriptable* Sender, Trigger* parameters, int justlos)
{
- //see dead
- int flags = 0;
+ //see dead; unscheduled actors are never visible, though
+ int flags = GA_NO_UNSCHEDULED;
if (parameters->int0Parameter) {
flags |= GA_DETECT;
@@ -570,12 +570,6 @@ int SeeCore(Scriptable* Sender, Trigger* parameters, int justlos)
return 0;
}
- //Deactivated (hidden) creatures are not seen
- //Check windspear quest (when garren leaves you alone with the kid)
- if (! (tar->GetInternalFlag()&IF_VISIBLE)) {
- return 0;
- }
-
// ignore invisible targets for direct matching
if (! parameters->int0Parameter) {
flags |= GA_NO_HIDDEN;
View
2 gemrb/plugins/GUIScript/GUIScript.cpp
@@ -3337,7 +3337,7 @@ PyDoc_STRVAR( GemRB_GameControlSetTargetMode__doc,
static PyObject* GemRB_GameControlSetTargetMode(PyObject * /*self*/, PyObject* args)
{
int Mode;
- int Types = GA_SELECT | GA_NO_DEAD | GA_NO_HIDDEN;
+ int Types = GA_SELECT | GA_NO_DEAD | GA_NO_HIDDEN | GA_NO_UNSCHEDULED;
if (!PyArg_ParseTuple( args, "i|i", &Mode, &Types )) {
return AttributeError( GemRB_GameControlSetTargetMode__doc );

0 comments on commit 613b68d

Please sign in to comment.
Something went wrong with that request. Please try again.