Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[hellfire] MI_Rune bin exact #1706

Merged
merged 1 commit into from
Sep 20, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 18 additions & 33 deletions Source/missiles.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3593,45 +3593,30 @@ void missiles_4359A0(int i)

void MI_Rune(int i)
{
int dir;
int mid;
int pid;
int mid, pid, dir, mx, my;

mid = dMonster[missile[i]._mix][missile[i]._miy];
pid = dPlayer[missile[i]._mix][missile[i]._miy];

if (mid == 0) {
if (pid == 0) {
PutMissile(i);
return;
} else {
if (pid <= 0)
pid = -1 - pid;
mx = missile[i]._mix;
my = missile[i]._miy;
mid = dMonster[mx][my];
pid = dPlayer[mx][my];
if (mid != 0 || pid != 0) {
if (mid != 0) {
if (mid > 0)
mid = mid - 1;
else
mid = -(mid + 1);
dir = GetDirection(missile[i]._mix, missile[i]._miy, monster[mid]._mx, monster[mid]._my);
} else {
if (pid > 0)
pid = pid - 1;
else
pid = -(pid + 1);
dir = GetDirection(missile[i]._mix, missile[i]._miy, plr[pid].WorldX, plr[pid].WorldY);
}
} else {
if (mid <= 0)
mid = -1 - mid;
else
mid = mid - 1;
dir = GetDirection(missile[i]._mix, missile[i]._miy, monster[mid]._mx, monster[mid]._my);
missile[i]._miDelFlag = TRUE;
AddUnLight(missile[i]._mlid);
AddMissile(mx, my, mx, my, dir, missile[i]._miVar1, 2, missile[i]._misource, missile[i]._midam, missile[i]._mispllvl);
}

missile[i]._miDelFlag = TRUE;
AddUnLight(missile[i]._mlid);
AddMissile(
missile[i]._mix,
missile[i]._miy,
missile[i]._mix,
missile[i]._miy,
dir,
missile[i]._miVar1,
2,
missile[i]._misource,
missile[i]._midam,
missile[i]._mispllvl);
PutMissile(i);
}

Expand Down