From: <bal...@us...> - 2004-01-19 23:12:34
|
Update of /cvsroot/gemrb/gemrb/gemrb/plugins/Core In directory sc8-pr-cvs1:/tmp/cvs-serv31463/gemrb/plugins/Core Modified Files: GameScript.cpp Log Message: GameScript.cpp / .h : - Fixed a Typo Error in See() Trigger - Adjusted See() Trigger to work only with Actors Index: GameScript.cpp =================================================================== RCS file: /cvsroot/gemrb/gemrb/gemrb/plugins/Core/GameScript.cpp,v retrieving revision 1.53 retrieving revision 1.54 diff -C2 -d -r1.53 -r1.54 *** GameScript.cpp 19 Jan 2004 22:58:53 -0000 1.53 --- GameScript.cpp 19 Jan 2004 23:12:31 -0000 1.54 *************** *** 1255,1258 **** --- 1255,1261 ---- int GameScript::See(Scriptable * Sender, Trigger * parameters) { + if(Sender->Type != ST_ACTOR) + return 0; + Actor * snd = (Actor*)Sender; Scriptable * target = GetActorFromObject(Sender, parameters->objectParameter); if(!target) *************** *** 1261,1265 **** long y = (target->YPos - Sender->YPos); double distance = sqrt((double)(x*x+y*y)); ! if(distance > (parameters->int0Parameter*20)) return 0; if(core->GetPathFinder()->IsVisible(Sender->XPos, Sender->YPos, target->XPos, target->YPos)) --- 1264,1268 ---- long y = (target->YPos - Sender->YPos); double distance = sqrt((double)(x*x+y*y)); ! if(distance > (snd->Modified[IE_VISUALRANGE]*20)) return 0; if(core->GetPathFinder()->IsVisible(Sender->XPos, Sender->YPos, target->XPos, target->YPos)) |