View difference between Paste ID: YCbWYppk and U9Sx3Vpj
SHOW: | | - or go back to the newest paste.
1
package BdayPartyDeath
2
{
3
function projectileData::onCollision(%this,%obj,%col,%fade,%pos,%normal)
4
{
5
   %result = parent::onCollision(%this,%obj,%col,%fade,%pos,%normal);
6
   if(matchBodyArea(getHitbox( %obj, %col, %pos ), $headTest ))
7
   {
8
      if(%col.getType() & $TypeMasks::PlayerObjectType)
9
      {
10
         if(%col.getState() $= "Dead")
11
         {
12
            %proj = new Projectile()
13
            {
14
               scale = %obj.getScale();
15
               dataBlock = bdayDeathProjectile;
16
               initialPosition = %obj.getPosition();
17
               sourceObject = %obj;
18
               sourceSlot = 0;
19
               client = %obj.client;
20
            };
21
            MissionCleanup.add(%proj);
22
            serverPlay3D(BdayDeathSound,%obj.getTransform());
23
         }
24
      }
25
   }
26-
   return %result
26+
   return %result;
27
}
28
};
29
activatePackage(BdayPartyDeath);