Hmmm, well this doesn't seem to be working. Anyone know why?
function TezRPBatonProjectile::onCollision(%this, %obj, %col, %fade, %pos, %normal)
{
serverPlay3D(hammerHitSound, %pos);
if((%col.getType() && $typeMasks::fxBrickObjectType))
{
%col.ForceDoor(%col.client);
}
}
function fxDTSBrick::ForceDoor(%brick, %client)
{
// Is door
if (!isObject(%brick.shape))
return 1;
// Cannot open admin doors
if (getBrickGroupFromObject(%brick).client.isAdmin)
return 0;
// JVS hack
if (%brick.isContentBlocked(%client, 1, "CW") <= 0)
{
%brick.contentUse(%client, 0, "START", "CW");
%brick.schedule(3000, "contentUse", %client, 0, "STOP", "CW");
}
else if (%brick.isContentBlocked(%client, 1, "CCW") <= 0)
{
%brick.contentUse(%client, 0, "START", "CCW");
%brick.schedule(3000, "contentUse", %client, 1, "STOP", "CCW");
}
else
{
return 0;
}
return 1;
}