Skip to content

Commit

Permalink
split MI_Acid from MI_Firebolt
Browse files Browse the repository at this point in the history
  • Loading branch information
pionere committed Sep 11, 2023
1 parent f6fe692 commit ceba3a1
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Source/misdat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const MissileData missiledata[] = {
/*MIS_HLSPWN*/ { &AddFirebolt, &MI_Firebolt, MIF_SHROUD , MISR_MAGIC, MFILE_SCUBMISD, TRUE, SFX_NONE, SFX_NONE, 1, 1, ALIGN },
/*MIS_SOLBRNR*/ { &AddFirebolt, &MI_Firebolt, MIF_SHROUD , MISR_MAGIC, MFILE_SCUBMISC, TRUE, SFX_NONE, SFX_NONE, 1, 1, ALIGN },
/*MIS_MAGMABALL*/ { &AddMagmaball, &MI_Firebolt, MIF_SHROUD , MISR_FIRE, MFILE_MAGBALL, TRUE, SFX_NONE, SFX_NONE, 1, 1, ALIGN },
/*MIS_ACID*/ { &AddAcid, &MI_Firebolt, MIF_SHROUD , MISR_ACID, MFILE_ACIDBF, TRUE, LS_ACID, SFX_NONE, 2, 1, ALIGN },
/*MIS_ACID*/ { &AddAcid, &MI_Acid, MIF_SHROUD , MISR_ACID, MFILE_ACIDBF, TRUE, LS_ACID, SFX_NONE, 2, 1, ALIGN },
/*MIS_ACIDPUD*/ { &AddAcidpud, &MI_Acidpud, MIF_NOBLOCK | MIF_AREA | MIF_DOT, MISR_ACID, MFILE_ACIDPUD, TRUE, LS_PUDDLE, SFX_NONE, 1, 1, ALIGN },
/*MIS_EXACIDP*/ { &AddMisexp, &MI_Acidsplat, 0, MISR_ACID, MFILE_ACIDSPLA, TRUE, SFX_NONE, SFX_NONE, 1, 1, ALIGN },
/*MIS_EXFIRE*/ { &AddMisexp, &MI_MiniExp, 0, MISR_NONE, MFILE_MAGBLOS, TRUE, SFX_NONE, SFX_NONE, 1, 1, ALIGN },
Expand Down
1 change: 1 addition & 0 deletions Source/misproc.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ void MI_Lightball(int mi);
void MI_Poison(int mi);
void MI_Wind(int mi);
//void MI_Krull(int mi);
void MI_Acid(int mi);
void MI_Acidpud(int mi);
void MI_Firewall(int mi);
//void MI_Fireball(int mi);
Expand Down
29 changes: 24 additions & 5 deletions Source/missiles.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3555,9 +3555,6 @@ void MI_Firebolt(int mi)
case MIS_SOLBRNR:
xptype = MIS_EXSOLBRNR;
break;
case MIS_ACID:
xptype = MIS_EXACIDP;
break;
#ifdef HELLFIRE
case MIS_PSYCHORB:
xptype = MIS_EXPSYCHORB;
Expand All @@ -3579,8 +3576,7 @@ void MI_Firebolt(int mi)
ASSUME_UNREACHABLE
break;
}
// SetRndSeed(mis->_miRndSeed); // used by MIS_EXACIDP
AddMissile(mis->_mix, mis->_miy, mi, 0, mis->_miDir, xptype, mis->_miCaster, mis->_miSource, 0);
AddMissile(0, 0, mi, 0, 0, xptype, MST_NA, 0, 0);

mis->_miDelFlag = TRUE; // + AddUnLight
}
Expand Down Expand Up @@ -3729,6 +3725,29 @@ void MI_Lightball(int mi)
mis->_miDelFlag = TRUE;
}*/

void MI_Acid(int mi)
{
MissileStruct* mis;

mis = &missile[mi];
mis->_mitxoff += mis->_mixvel;
mis->_mityoff += mis->_miyvel;
GetMissilePos(mi);
if (mis->_mix != mis->_misx || mis->_miy != mis->_misy) {
CheckMissileCol(mi, mis->_mix, mis->_miy, MICM_BLOCK_ANY);
}
mis->_miRange--;
if (mis->_miRange >= 0) {
PutMissile(mi);
return;
}

// SetRndSeed(mis->_miRndSeed); // used by MIS_EXACIDP
AddMissile(mis->_mix, mis->_miy, mi, 0, mis->_miDir, MIS_EXACIDP, mis->_miCaster, mis->_miSource, 0);

mis->_miDelFlag = TRUE; // + AddUnLight
}

void MI_Acidpud(int mi)
{
MissileStruct* mis;
Expand Down

0 comments on commit ceba3a1

Please sign in to comment.