Skip to content

Commit

Permalink
Forgot to include the spell files + fix for AI area targeting
Browse files Browse the repository at this point in the history
  • Loading branch information
DMD authored and DMD committed Oct 16, 2016
1 parent c90a968 commit 73a71c0
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 4 deletions.
4 changes: 1 addition & 3 deletions TemplePlus/python/python_object.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2497,9 +2497,7 @@ static PyObject* PyObjHandle_D20SendSignalEx(PyObject* obj, PyObject* args) {
auto args2 = Py_BuildValue("(O)", pytarget);
Py_DECREF(pytarget);
auto pytaResult = PyObjHandle_PerformTouchAttack(obj, args2);
auto taResult = PyInt_AsLong(pytaResult);
if (!taResult)
d20a.d20Caf = D20CAF_NONE;
d20a.d20Caf = PyInt_AsLong(pytaResult);
}

d20Sys.d20SendSignal(self->handle, dispKey, &d20a, 0);
Expand Down
17 changes: 16 additions & 1 deletion TemplePlus/ui/ui_picker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,21 @@ class UiPickerHooks : TempleFix
if (args.IsBaseModeTarget(UiPickerType::Area)){
spPkt.aoeCenter.location = args.result.location;
spPkt.aoeCenter.off_z = args.result.offsetz;

auto objNode = args.result.objList.objects;
auto handle = objHndl::null;

if (!objNode) {
if (args.result.handle) {
spPkt.targetListHandles[spPkt.targetCount++] = args.result.handle;
}
}
else {
for (spPkt.targetCount = 0; objNode && spPkt.targetCount < MAX_SPELL_TARGETS; ++spPkt.targetCount) {
spPkt.targetListHandles[spPkt.targetCount] = objNode->handle;
objNode = objNode->next;
}
}
}
else {
spPkt.aoeCenter.location.location.locx = 0;
Expand All @@ -112,7 +127,7 @@ class UiPickerHooks : TempleFix

if (!objNode) {
if (args.result.handle) {
spPkt.targetListHandles[spPkt.targetCount] = args.result.handle;
spPkt.targetListHandles[spPkt.targetCount++] = args.result.handle;
}
}
else{
Expand Down
Binary file modified tpdata/co8fixes.dat
Binary file not shown.
Binary file modified tpdata/tpgamefiles.dat
Binary file not shown.

0 comments on commit 73a71c0

Please sign in to comment.