Fix launched object accessing a deleted trap
In launch_obj, the code first got the trap, then called ohitmon (which can delete the trap by doing mondied -> fill_pit -> flooreffects -> deltrap), then after that used the trap variable.
This commit is contained in:
@@ -183,6 +183,7 @@ fix vault guard impossible when he could not relocate in certain situation
|
|||||||
fix temple priests or shopkeepers moving over other monsters
|
fix temple priests or shopkeepers moving over other monsters
|
||||||
fix hero still hiding under a statue shattered by a land mine
|
fix hero still hiding under a statue shattered by a land mine
|
||||||
fix helping a monster out of a pit addressing a deleted trap
|
fix helping a monster out of a pit addressing a deleted trap
|
||||||
|
fix launched rolling boulder code accessing deleted trap
|
||||||
|
|
||||||
|
|
||||||
Fixes to Post-3.6.2 Problems that Were Exposed Via git Repository
|
Fixes to Post-3.6.2 Problems that Were Exposed Via git Repository
|
||||||
|
|||||||
+1
-2
@@ -1840,7 +1840,6 @@ int style;
|
|||||||
|
|
||||||
bhitpos.x += dx;
|
bhitpos.x += dx;
|
||||||
bhitpos.y += dy;
|
bhitpos.y += dy;
|
||||||
t = t_at(bhitpos.x, bhitpos.y);
|
|
||||||
|
|
||||||
if ((mtmp = m_at(bhitpos.x, bhitpos.y)) != 0) {
|
if ((mtmp = m_at(bhitpos.x, bhitpos.y)) != 0) {
|
||||||
if (otyp == BOULDER && throws_rocks(mtmp->data)) {
|
if (otyp == BOULDER && throws_rocks(mtmp->data)) {
|
||||||
@@ -1875,7 +1874,7 @@ int style;
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (t && otyp == BOULDER) {
|
if ((t = t_at(bhitpos.x, bhitpos.y)) != 0 && otyp == BOULDER) {
|
||||||
switch (t->ttyp) {
|
switch (t->ttyp) {
|
||||||
case LANDMINE:
|
case LANDMINE:
|
||||||
if (rn2(10) > 2) {
|
if (rn2(10) > 2) {
|
||||||
|
|||||||
Reference in New Issue
Block a user