Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

added LastMarked setting to some more triggers

  • Loading branch information...
commit 8d6a3beba0b11d06fc9b14a478480355ee7688e4 1 parent 27dfdcf
@lynxlynxlynx lynxlynxlynx authored
View
2  gemrb/core/GUI/GameControl.cpp
@@ -1937,6 +1937,7 @@ bool GameControl::HandleActiveRegion(InfoPoint *trap, Actor * actor, Point &p)
switch(trap->Type) {
case ST_TRAVEL:
trap->AddTrigger(TriggerEntry(trigger_clicked, actor->GetGlobalID()));
+ actor->LastMarked = trap->GetGlobalID();
//clear the go closer flag
trap->GetCurrentArea()->LastGoCloser = 0;
return false;
@@ -1958,6 +1959,7 @@ bool GameControl::HandleActiveRegion(InfoPoint *trap, Actor * actor, Point &p)
if (trap->Scripts[0]) {
if (!(trap->Flags&TRAP_DEACTIVATED) ) {
trap->AddTrigger(TriggerEntry(trigger_clicked, actor->GetGlobalID()));
+ actor->LastMarked = trap->GetGlobalID();
//directly feeding the event, even if there are actions in the queue
//trap->Scripts[0]->Update();
// FIXME
View
2  gemrb/core/GameScript/GSUtils.cpp
@@ -575,12 +575,14 @@ int SeeCore(Scriptable* Sender, Trigger* parameters, int justlos)
//both are actors
if (CanSee(Sender, tar, true, flags) ) {
if (justlos) {
+ //TODO: maybe set the object references here too
return 1;
}
if (Sender->Type==ST_ACTOR && tar->Type==ST_ACTOR && Sender!=tar) {
Actor* snd = ( Actor* ) Sender;
//additional checks for invisibility?
snd->LastSeen = tar->GetGlobalID();
+ snd->LastMarked = tar->GetGlobalID();
}
return 1;
}
View
2  gemrb/core/Scriptable/InfoPoint.cpp
@@ -206,6 +206,7 @@ bool InfoPoint::Entered(Actor *actor)
return false;
check:
if (Type==ST_TRAVEL) {
+ actor->LastMarked = GetGlobalID();
return true;
}
@@ -223,6 +224,7 @@ bool InfoPoint::Entered(Actor *actor)
//skill?
if (TriggerTrap(0, actor->GetGlobalID()) ) {
+ actor->LastMarked = GetGlobalID();
return true;
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.