diff --git a/Source/misdat.cpp b/Source/misdat.cpp index d67a3d4668e..1fefe3e9530 100644 --- a/Source/misdat.cpp +++ b/Source/misdat.cpp @@ -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 }, diff --git a/Source/misproc.h b/Source/misproc.h index c60cc8321ca..2a04f7a61da 100644 --- a/Source/misproc.h +++ b/Source/misproc.h @@ -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); diff --git a/Source/missiles.cpp b/Source/missiles.cpp index c9c76796486..98af3b1fdab 100644 --- a/Source/missiles.cpp +++ b/Source/missiles.cpp @@ -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; @@ -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 } @@ -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;