当前位置: 首页>>代码示例>>C++>>正文


C++ EV_DoDoor函数代码示例

本文整理汇总了C++中EV_DoDoor函数的典型用法代码示例。如果您正苦于以下问题:C++ EV_DoDoor函数的具体用法?C++ EV_DoDoor怎么用?C++ EV_DoDoor使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了EV_DoDoor函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: P_NoiseAlert

void APowerCoupling::Die (AActor *source, AActor *inflictor, int dmgflags)
{
	Super::Die (source, inflictor, dmgflags);

	int i;

	for (i = 0; i < MAXPLAYERS; ++i)
		if (playeringame[i] && players[i].health > 0)
			break;

	if (i == MAXPLAYERS)
		return;

	// [RH] In case the player broke it with the dagger, alert the guards now.
	if (LastHeard != source)
	{
		P_NoiseAlert (source, this);
	}
	EV_DoDoor (DDoor::doorClose, NULL, players[i].mo, 225, 2*FRACUNIT, 0, 0, 0);
	EV_DoFloor (DFloor::floorLowerToHighest, NULL, 44, FRACUNIT, 0, -1, 0, false);
	players[i].mo->GiveInventoryType (QuestItemClasses[5]);
	S_Sound (CHAN_VOICE, "svox/voc13", 1, ATTN_NORM);
	players[i].SetLogNumber (13);
	P_DropItem (this, PClass::FindClass("BrokenPowerCoupling"), -1, 256);
	Destroy ();
}
开发者ID:Leonan8995,项目名称:Xenomia,代码行数:26,代码来源:a_strifestuff.cpp

示例2: EV_DoDoor

bool APrisonPass::TryPickup (AActor *&toucher)
{
    Super::TryPickup (toucher);
    EV_DoDoor (DDoor::doorOpen, NULL, toucher, 223, 2., 0, 0, 0);
    toucher->GiveInventoryType (QuestItemClasses[9]);
    return true;
}
开发者ID:kevans91,项目名称:zdoom,代码行数:7,代码来源:a_strifeitems.cpp

示例3: P_ShootSpecialLine

void P_ShootSpecialLine(mobj_t *thing, line_t *line)
{
	if(!thing->player)
	{ // Check if trigger allowed by non-player mobj
		switch(line->special)
		{
			case 46: // Impact_OpenDoor
				break;
			default:
				return;
				break;
		}
	}
	switch(line->special)
	{
		case 24: // Impact_RaiseFloor
			EV_DoFloor(line, raiseFloor);
			P_ChangeSwitchTexture(line, 0);
			break;
		case 46: // Impact_OpenDoor
			EV_DoDoor(line, open, VDOORSPEED);
			P_ChangeSwitchTexture(line, 1);
			break;
		case 47: // Impact_RaiseFloorNear&Change
			EV_DoPlat(line, raiseToNearestAndChange, 0);
			P_ChangeSwitchTexture(line, 0);
			break;
	}
}
开发者ID:elhobbs,项目名称:heretic3ds,代码行数:29,代码来源:P_SPEC.c

示例4: DEFINE_ACTION_FUNCTION

DEFINE_ACTION_FUNCTION(AActor, A_HideDecepticon)
{
    EV_DoDoor (DDoor::doorClose, NULL, self, 999, 8*FRACUNIT, 0, 0, 0);
    if (self->target != NULL && self->target->player != NULL)
    {
        P_NoiseAlert (self->target, self);
    }
}
开发者ID:DaZombieKiller,项目名称:lxDoom,代码行数:8,代码来源:a_acolyte.cpp

示例5: switch

int
EV_DoLockedDoor
( line_t*	line,
  vldoor_e	type,
  mobj_t*	thing )
{
    player_t*	p;
	
    p = thing->player;
	
    if (!p)
	return 0;
		
    switch(line->special)
    {
      case 99:	// Blue Lock
      case 133:
	if ( !p )
	    return 0;
	if (!p->cards[it_bluecard] && !p->cards[it_blueskull])
	{
	    p->message = PD_BLUEO;
	    S_StartSound(NULL,sfx_oof);
	    return 0;
	}
	break;
	
      case 134: // Red Lock
      case 135:
	if ( !p )
	    return 0;
	if (!p->cards[it_redcard] && !p->cards[it_redskull])
	{
	    p->message = PD_REDO;
	    S_StartSound(NULL,sfx_oof);
	    return 0;
	}
	break;
	
      case 136:	// Yellow Lock
      case 137:
	if ( !p )
	    return 0;
	if (!p->cards[it_yellowcard] &&
	    !p->cards[it_yellowskull])
	{
	    p->message = PD_YELLOWO;
	    S_StartSound(NULL,sfx_oof);
	    return 0;
	}
	break;	
    }

    return EV_DoDoor(line,type);
}
开发者ID:VenoMpie,项目名称:DoomSharp,代码行数:55,代码来源:p_doors.c

示例6: EV_DoDoor

bool ACloseDoor222::SpecialDropAction (AActor *dropper)
{
	EV_DoDoor (DDoor::doorClose, NULL, dropper, 222, 2*FRACUNIT, 0, 0, 0);
	if (dropper->target->CheckLocalView (consoleplayer))
	{
		Printf ("You're dead!  You set off the alarm.\n");
	}
	P_NoiseAlert (dropper->target, dropper->target);
	Destroy ();
	return true;
}
开发者ID:Krazygamr,项目名称:D-Touch,代码行数:11,代码来源:a_strifeitems.cpp

示例7: switch

//
// EV_DoLockedDoor
//
// Handle opening a tagged locked door
//
// Passed the line activating the door, the type of door,
// and the thing that activated the line
// Returns true if a thinker created
//
int EV_DoLockedDoor
( line_t* line,
  vldoor_e  type,
  mobj_t* thing )
{
  player_t* p;

  // only players can open locked doors
  p = thing->player;
  if (!p)
    return 0;

  // check type of linedef, and if key is possessed to open it
  switch(line->special)
  {
    case 99:  // Blue Lock
    case 133:
      if (!p->cards[it_bluecard] && !p->cards[it_blueskull])
      {
        p->message = s_PD_BLUEO;             // Ty 03/27/98 - externalized
        S_StartSound(p->mo,sfx_oof);         // killough 3/20/98
        return 0;
      }
      break;

    case 134: // Red Lock
    case 135:
      if (!p->cards[it_redcard] && !p->cards[it_redskull])
      {
        p->message = s_PD_REDO;              // Ty 03/27/98 - externalized
        S_StartSound(p->mo,sfx_oof);         // killough 3/20/98
        return 0;
      }
      break;

    case 136: // Yellow Lock
    case 137:
      if (!p->cards[it_yellowcard] && !p->cards[it_yellowskull])
      {
        p->message = s_PD_YELLOWO;           // Ty 03/27/98 - externalized
        S_StartSound(p->mo,sfx_oof);         // killough 3/20/98
        return 0;
      }
      break;
  }

  // got the key, so open the door
  return EV_DoDoor(line,type);
}
开发者ID:Krazygamr,项目名称:D-Touch,代码行数:58,代码来源:p_doors.c

示例8: switch

//
// P_ShootSpecialLine - IMPACT SPECIALS
// Called when a thing shoots a special line.
//
void
P_ShootSpecialLine
( mobj_t*	thing,
  line_t*	line )
{
    int		ok;
    
    //	Impacts that other things can activate.
    if (!thing->player)
    {
	ok = 0;
	switch(line->special)
	{
	  case 46:
	    // OPEN DOOR IMPACT
	    ok = 1;
	    break;
	}
	if (!ok)
	    return;
    }

    switch(line->special)
    {
      case 24:
	// RAISE FLOOR
	EV_DoFloor(line,raiseFloor);
	P_ChangeSwitchTexture(line,0);
	break;
	
      case 46:
	// OPEN DOOR
	EV_DoDoor(line,vld_open);
	P_ChangeSwitchTexture(line,1);
	break;
	
      case 47:
	// RAISE FLOOR NEAR AND CHANGE
	EV_DoPlat(line,raiseToNearestAndChange,0);
	P_ChangeSwitchTexture(line,0);
	break;
    }
}
开发者ID:plumsinus,项目名称:crispy-doom,代码行数:47,代码来源:p_spec.c

示例9: P_ShootSpecialLine

/**
 * Called when a thing shoots a special line.
 */
static void P_ShootSpecialLine(mobj_t *thing, Line *line)
{
    xline_t *xline = P_ToXLine(line);

    //  Impacts that other things can activate.
    if(!thing->player)
    {
        switch(xline->special)
        {
        default:
            return;

        case 46: ///< OPEN DOOR IMPACT
            break;
        }
    }

    switch(xline->special)
    {
    case 24: ///< RAISE FLOOR
        EV_DoFloor(line, FT_RAISEFLOOR);
        P_ToggleSwitch((Side *)P_GetPtrp(line, DMU_FRONT), SFX_NONE, false, 0);
        xline->special = 0;
        break;

    case 46: ///< OPEN DOOR
        EV_DoDoor(line, DT_OPEN);
        P_ToggleSwitch((Side *)P_GetPtrp(line, DMU_FRONT), SFX_NONE, false, BUTTONTIME);
        break;

    case 47: ///< RAISE FLOOR NEAR AND CHANGE
        EV_DoPlat(line, PT_RAISETONEARESTANDCHANGE, 0);
        P_ToggleSwitch((Side *)P_GetPtrp(line, DMU_FRONT), SFX_NONE, false, 0);
        xline->special = 0;
        break;

    case 191: ///< LOWER FLOOR WAIT RAISE (jd64)
        EV_DoPlat(line, PT_DOWNWAITUPSTAYBLAZE, 0);
        P_ToggleSwitch((Side *)P_GetPtrp(line, DMU_FRONT), SFX_NONE, false, BUTTONTIME);
        break;
    }
}
开发者ID:skyjake,项目名称:Doomsday-Engine,代码行数:45,代码来源:p_spec.cpp

示例10: A_KeenDie

//
// A_KeenDie
// DOOM II special, map 32.
// Uses special tag 666.
//
void A_KeenDie (AActor *self)
{
	A_NoBlocking (self);
	
	// scan the remaining thinkers to see if all Keens are dead
	AActor *other;
	TThinkerIterator<AActor> iterator;
	const PClass *matchClass = self->GetClass ();

	while ( (other = iterator.Next ()) )
	{
		if (other != self && other->health > 0 && other->IsA (matchClass))
		{
			// other Keen not dead
			return;
		}
	}

	EV_DoDoor (DDoor::doorOpen, NULL, NULL, 666, 2*FRACUNIT, 0, 0, 0);
}
开发者ID:ddraigcymraeg,项目名称:gzscoredoom,代码行数:25,代码来源:a_keen.cpp

示例11: DEFINE_ACTION_FUNCTION_PARAMS

DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_KeenDie)
{
	PARAM_ACTION_PROLOGUE;
	PARAM_INT_OPT(doortag)		{ doortag = 666; }

	A_Unblock(self, false);
	
	// scan the remaining thinkers to see if all Keens are dead
	AActor *other;
	TThinkerIterator<AActor> iterator;
	const PClass *matchClass = self->GetClass ();

	while ( (other = iterator.Next ()) )
	{
		if (other != self && other->health > 0 && other->IsA (matchClass))
		{
			// other Keen not dead
			return 0;
		}
	}

	EV_DoDoor (DDoor::doorOpen, NULL, NULL, doortag, 2*FRACUNIT, 0, 0, 0);
	return 0;
}
开发者ID:Edward850,项目名称:zdoom,代码行数:24,代码来源:a_keen.cpp

示例12: P_ShootSpecialLine

void P_ShootSpecialLine(mobj_t *thing,line_t *line)
{
	/* Impacts that other things can activate */

	if (!thing->player) {
		if (line->special!=46) {	/* Open door impact */
			return;
		}
	}

	switch(line->special) {
	case 24:		/* RAISE FLOOR */
		EV_DoFloor(line,raiseFloor);
		P_ChangeSwitchTexture(line,FALSE);
		break;
	case 46:		/* OPEN DOOR */
		EV_DoDoor(line,open);
		P_ChangeSwitchTexture(line,TRUE);
		break;
	case 47:		/* RAISE FLOOR NEAR AND CHANGE */
		EV_DoPlat(line,raiseToNearestAndChange,0);
		P_ChangeSwitchTexture(line,FALSE);
	}
}
开发者ID:Almamu,项目名称:doom3do,代码行数:24,代码来源:spec.c

示例13: P_GiveItemToPlayer


//.........这里部分代码省略.........
    case SPR_CBOW: // Here's a crossbow. Just aim straight, and *SPLAT!*
        if(player->weaponowned[wp_elecbow])
            return false;

        if(!P_GiveWeapon(player, wp_elecbow, false))
            return false;

        sound = sfx_wpnup; // SHK-CHK!
        break;

    case SPR_TOKN: // Miscellaneous items - These are determined by thingtype.
        switch(type)
        {
        case MT_KEY_HAND: // Severed hand
            P_GiveCard(player, key_SeveredHand);
            break;

        case MT_MONY_300: // 300 Gold (this is the only way to get it, in fact)
            for(i = 0; i < 300; i++)
                P_GiveInventoryItem(player, SPR_COIN, MT_MONY_1);
            break;

        case MT_TOKEN_AMMO: // Ammo token - you get this from the Weapons Trainer
            if(player->ammo[am_bullets] >= 50)
                return false;

            player->ammo[am_bullets] = 50;
            break;

        case MT_TOKEN_HEALTH: // Health token - from the Front's doctor
            if(!P_GiveBody(player, healthamounts[gameskill]))
                return false;
            break;

        case MT_TOKEN_ALARM: // Alarm token - particularly from the Oracle.
            P_NoiseAlert(player->mo, player->mo);
            A_AlertSpectreC(dialogtalker); // BUG: assumes in a dialog o_O
            break;

        case MT_TOKEN_DOOR1: // Door special 1
            junk.tag = 222;
            EV_DoDoor(&junk, vld_open);
            break;

        case MT_TOKEN_PRISON_PASS: // Door special 1 - Prison pass
            junk.tag = 223;
            EV_DoDoor(&junk, vld_open);
            if(gamemap == 2) // If on Tarnhill, give Prison pass object
                P_GiveInventoryItem(player, sprnum, type);
            break;

        case MT_TOKEN_SHOPCLOSE: // Door special 3 - "Shop close" - unused?
            junk.tag = 222;
            EV_DoDoor(&junk, vld_close);
            break;

        case MT_TOKEN_DOOR3: // Door special 4 (or 3? :P ) 
            junk.tag = 224;
            EV_DoDoor(&junk, vld_close);
            break;

        case MT_TOKEN_STAMINA: // Stamina upgrade
            if(player->stamina >= 100)
                return false;

            player->stamina += 10;
            P_GiveBody(player, 200); // full healing
            break;

        case MT_TOKEN_NEW_ACCURACY: // Accuracy upgrade
            if(player->accuracy >= 100)
                return false;

            player->accuracy += 10;
            break;

        case MT_SLIDESHOW: // Slideshow (start a finale)
            gameaction = ga_victory;
            if(gamemap == 10)
                P_GiveItemToPlayer(player, SPR_TOKN, MT_TOKEN_QUEST17);
            break;
        
        default: // The default is to just give it as an inventory item.
            P_GiveInventoryItem(player, sprnum, type);
            break;
        }
        break;

    default: // The ultimate default: Give it as an inventory item.
        if(!P_GiveInventoryItem(player, sprnum, type))
            return false;
        break;
    }

    // Play sound.
    if(player == &players[consoleplayer])
        S_StartSound(NULL, sound);

    return true;
}
开发者ID:derek57,项目名称:WIP,代码行数:101,代码来源:p_dialog.c

示例14: ST_cheat_spechits

// [crispy] trigger all special lines available on the map
static int ST_cheat_spechits()
{
    int i, speciallines = 0;
    boolean origcards[NUMCARDS];
    line_t dummy;

    // temporarily give all keys
    for (i = 0; i < NUMCARDS; i++)
    {
	origcards[i] = plyr->cards[i];
	plyr->cards[i] = true;
    }

    for (i = 0; i < numlines; i++)
    {
	if (lines[i].special)
	{
	    // do not trigger level exit switches/lines or teleporters
	    if (lines[i].special == 11 || lines[i].special == 51 ||
	        lines[i].special == 52 || lines[i].special == 124 ||
	        lines[i].special == 39 || lines[i].special == 97)
	        continue;

	    P_CrossSpecialLine (i, 0, plyr->mo);
	    P_ShootSpecialLine (plyr->mo, &lines[i]);
	    P_UseSpecialLine (plyr->mo, &lines[i], 0);

	    speciallines++;
	}
    }

    for (i = 0; i < NUMCARDS; i++)
    {
	plyr->cards[i] = origcards[i];
    }

    // [crispy] trigger tag 666/667 events
    dummy.tag = 666;
    if (gamemode == commercial)
    {
	if (gamemap == 7)
	{
	    // Mancubi
	    speciallines += EV_DoFloor(&dummy, lowerFloorToLowest);

	    // Arachnotrons
	    dummy.tag = 667;
	    speciallines += EV_DoFloor(&dummy, raiseToTexture);
	}
    }
    else
    {
	if (gameepisode == 1)
	    // Barons of Hell
	    speciallines += EV_DoFloor(&dummy, lowerFloorToLowest);
	else
	if (gameepisode == 4)
	{
	     if (gamemap == 6)
		// Cyberdemons
		speciallines += EV_DoDoor(&dummy, vld_blazeOpen);
	    else
	    if (gamemap == 8)
		// Spider Masterminds
		speciallines += EV_DoFloor(&dummy, lowerFloorToLowest);
	}
    }
    // Keens (no matter which level they are on)
    // this call will be ignored if the tagged sector is already moving
    // so actions triggered in the condition above will have precedence
    speciallines += EV_DoDoor(&dummy, vld_open);

    return (speciallines);
}
开发者ID:plumsinus,项目名称:crispy-doom,代码行数:75,代码来源:st_stuff.c

示例15: EV_DoLockedDoor

//
// EV_DoLockedDoor
// Move a locked door up/down
//
int EV_DoLockedDoor(line_t *line, vldoor_e type, mobj_t *thing)
{
    player_t    *player = thing->player;

    if (!player)
        return 0;

    switch (line->special)
    {
        case SR_OpenFastDoorStayOpenBlueKeyRequired:
        case S1_OpenFastDoorStayOpenBlueKeyRequired:
            if (player->cards[it_bluecard] <= 0 && player->cards[it_blueskull] <= 0)
            {
                if (player->cards[it_bluecard] == CARDNOTFOUNDYET)
                {
                    if (!player->neededcardtics || player->neededcard != it_bluecard)
                    {
                        player->neededcard = it_bluecard;
                        player->neededcardtics = NEEDEDCARDTICS;
                    }
                    player->message = s_PD_BLUEO;
                }
                else
                {
                    if (!player->neededcardtics || player->neededcard != it_blueskull)
                    {
                        player->neededcard = it_blueskull;
                        player->neededcardtics = NEEDEDCARDTICS;
                    }
                    player->message = s_PD_BLUEO2;
                }
                S_StartSound(player->mo, sfx_noway);
                return 0;
            }
            break;

        case SR_OpenFastDoorStayOpenRedKeyRequired:
        case S1_OpenFastDoorStayOpenRedKeyRequired:
            if (player->cards[it_redcard] <= 0 && player->cards[it_redskull] <= 0)
            {
                if (player->cards[it_redcard] == CARDNOTFOUNDYET)
                {
                    if (!player->neededcardtics || player->neededcard != it_redcard)
                    {
                        player->neededcard = it_redcard;
                        player->neededcardtics = NEEDEDCARDTICS;
                    }
                    player->message = s_PD_REDO;
                }
                else
                {
                    if (!player->neededcardtics || player->neededcard != it_redskull)
                    {
                        player->neededcard = it_redskull;
                        player->neededcardtics = NEEDEDCARDTICS;
                    }
                    player->message = s_PD_REDO2;
                }
                S_StartSound(player->mo, sfx_noway);
                return 0;
            }
            break;

        case SR_OpenFastDoorStayOpenYellowKeyRequired:
        case S1_OpenFastDoorStayOpenYellowKeyRequired:
            if (player->cards[it_yellowcard] <= 0 && player->cards[it_yellowskull] <= 0)
            {
                if (player->cards[it_yellowcard] == CARDNOTFOUNDYET)
                {
                    if (!player->neededcardtics || player->neededcard != it_yellowcard)
                    {
                        player->neededcard = it_yellowcard;
                        player->neededcardtics = NEEDEDCARDTICS;
                    }
                    player->message = s_PD_YELLOWO;
                }
                else
                {
                    if (!player->neededcardtics || player->neededcard != it_yellowskull)
                    {
                        player->neededcard = it_yellowskull;
                        player->neededcardtics = NEEDEDCARDTICS;
                    }
                    player->message = s_PD_YELLOWO2;
                }
                S_StartSound(player->mo, sfx_noway);
                return 0;
            }
            break;
    }

    return EV_DoDoor(line, type);
}
开发者ID:Billy2600,项目名称:doomretro,代码行数:97,代码来源:p_doors.c


注:本文中的EV_DoDoor函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。