示例#1
0
void CK6_BloogletCol(CK_object *a, CK_object *b)
{
  if (b->type == CT_Player && b->currentAction->collide)
  {
    ck_keenIgnoreVertClip = true;
    CK_PhysPushX(b, a);
    ck_keenIgnoreVertClip = false;
  }
  else if (b->type == CT_Stunner)
  {
    int color = a->user1 & 3;
    if (a->user1 > 3)
    {
      CK_object *gem = CK_GetNewObj(false);
      gem->clipped = CLIP_normal;
      gem->zLayer = PRIORITIES - 2;
      gem->type = CT6_Item;
      gem->posX = a->posX;
      gem->posY = a->posY;
      gem->yDirection = IN_motion_Up;
      gem->velY = -40;
      gem->user1 = color;
      gem->user2 = gem->gfxChunk = *CK_ItemSpriteChunks[color];
      gem->user3 = gem->user2 + 2;
      CK_SetAction(gem, CK_GetActionByName("CK_ACT_fallingitem"));
      SD_PlaySound(SOUND_BLOOGLETGEM);
    }

    CK_StunCreature(a, b, CK_GetActionByName(stunnedBloogletActions[color]));
  }
}
示例#2
0
void CK6_FlectCol(CK_object *a, CK_object *b)
{
	if (b->type == CT_Player)
	{
		CK_PhysPushX(b, a);
	}
	else if (b->type == CT_Stunner)
	{
		if (b->xDirection == IN_motion_None)
		{
			CK_StunCreature(a, b, CK_GetActionByName("CK6_ACT_FlectStunned0"));
		}
		else if (a->xDirection != b->xDirection)
		{
			b->xDirection = a->xDirection;
			b->user4 = 1; // Shot is hazardous to keen now
			SD_PlaySound(SOUND_FLECTSHOT);
		}
	}
}