From: Laszlo T. <ave...@us...> - 2006-07-05 09:42:02
|
Update of /cvsroot/gemrb/gemrb/gemrb/plugins/Core In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv6814 Modified Files: Actor.cpp Log Message: fixed a possible crasher when no weapon found (this should happen only if the wielded item has no extended header) Index: Actor.cpp =================================================================== RCS file: /cvsroot/gemrb/gemrb/gemrb/plugins/Core/Actor.cpp,v retrieving revision 1.195 retrieving revision 1.196 diff -C2 -d -r1.195 -r1.196 *** Actor.cpp 4 Jul 2006 18:59:24 -0000 1.195 --- Actor.cpp 5 Jul 2006 09:41:52 -0000 1.196 *************** *** 1734,1739 **** bool leftorright = (bool) (attackcount&1); ITMExtHeader *header; ! //can't reach target ! if (GetWeapon(header,leftorright)*10<Distance(Pos, target)) { return; } --- 1734,1739 ---- bool leftorright = (bool) (attackcount&1); ITMExtHeader *header; ! //can't reach target, zero range shouldn't be allowed ! if (GetWeapon(header,leftorright)*10<Distance(Pos, target)+1) { return; } |