I've packaged and parented this function, but it still breaks in-game functionality. What am I doing wrong?
package HL1TripMinePackage
{
function ProjectileData::onExplode(%this, %obj, %pos, %b, %c, %d, %e, %f, %g)
{
if(%obj.dataBlock !$= "HL1TripmineProjectile" && %obj.dataBlock.explosion !$= "HL1TripmineExplosion")
{
%projectile = %obj.dataBlock;
%explosion = %obj.dataBlock.explosion;
initContainerRadiusSearch(%pos, %projectile.brickExplosionRadius, $TypeMasks::StaticShapeObjectType);
while(containerSearchNext() != 0)
{
%search = containerSearchNext();
if(%search.dataBlock $= "TripMineStatic")
{
%search.forceExplosion = true;
}
if(%search.dataBlock $= "LaserStatic")
{
%search.sourceObject.forceExplosion = true;
}
}
}
Parent::onExplode(%this, %obj, %a, %b, %c, %d, %e, %f, %g);
}
};
activatePackage(HL1TripMinePackage);
EDIT: Figured it out. Forgot one of the arguments (%pos) in Parent::onExplode. Attention to detail bois