Fixed a bug where SP forwards were not unregistered

Fixed a bug where pfn_touch might not be called correctly
This commit is contained in:
David Anderson
2004-09-05 20:03:01 +00:00
parent 7d3d04b13d
commit c0d73ce572
3 changed files with 13 additions and 2 deletions

View File

@ -120,6 +120,11 @@ struct GlobalInfo {
class Impulse
{
public:
~Impulse()
{
if (Forward != -1)
MF_UnregisterSPForward(Forward);
}
int Forward;
int Check;
};
@ -140,6 +145,8 @@ public:
delete [] Touched;
Touched = 0;
}
if (Forward != -1)
MF_UnregisterSPForward(Forward);
}
};