Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

TriggerActivation: properly decode the target object

So that stuff like "TriggerActivation(Myself, FALSE)" doesn't fail.
  • Loading branch information...
commit 1e2677f7cf7bcf7e03c67a9e18bcd09215397471 1 parent 4db74e3
@fizzet fizzet authored
Showing with 3 additions and 5 deletions.
  1. +3 −5 gemrb/core/GameScript/Actions.cpp
View
8 gemrb/core/GameScript/Actions.cpp
@@ -459,12 +459,10 @@ void GameScript::SetTeamBit(Scriptable* Sender, Action* parameters)
void GameScript::TriggerActivation(Scriptable* Sender, Action* parameters)
{
- Scriptable* ip;
+ Scriptable* ip = Sender;
- if (!parameters->objects[1]) {
- ip=Sender;
- } else {
- ip = Sender->GetCurrentArea()->TMap->GetInfoPoint(parameters->objects[1]->objectName);
+ if (parameters->objects[1]) {
+ ip = GetActorFromObject(Sender, parameters->objects[1]);
}
if (!ip || (ip->Type!=ST_TRIGGER && ip->Type!=ST_TRAVEL && ip->Type!=ST_PROXIMITY)) {
Log(WARNING, "Actions", "Script error: No Trigger Named \"%s\"", parameters->objects[1]->objectName);

0 comments on commit 1e2677f

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