• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ P_FindSectorFromLineTag函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: EV_ClearForceFields

//
// EV_ClearForceFields
//
// villsa [STRIFE] new function
//
boolean EV_ClearForceFields(line_t* line)
{
    int         secnum;
    sector_t*   sec;
    int         i;
    line_t*     secline;
    boolean     ret = false;

    secnum = -1;

    while((secnum = P_FindSectorFromLineTag(line,secnum)) >= 0)
    {
        sec = &sectors[secnum];

        line->special = 0;
        ret = true;

        // haleyjd 09/18/10: fixed to continue w/linecount == 0, not return
        for(i = 0; i < sec->linecount; i++)
        {
            secline = sec->lines[i];
            if(!(secline->flags & ML_TWOSIDED))
                continue;
            if(secline->special != 148)
                continue;

            secline->flags &= ~ML_BLOCKING;
            secline->special = 0;
            sides[secline->sidenum[0]].midtexture = 0;
            sides[secline->sidenum[1]].midtexture = 0;
        }
    }

    return ret;
}
开发者ID:M-Code,项目名称:chocolate-doom,代码行数:40,代码来源:p_doors.c


示例2: EV_LightTurnOn

//
// TURN LINE'S TAG LIGHTS ON
//
void EV_LightTurnOn(line_t *line, int bright)
{
    int		i;
    int		j;
    sector_t	*sector;
    sector_t	*temp;
    line_t	*templine;

    for (i = -1; (i = P_FindSectorFromLineTag(line, i)) >= 0;)
    {
        sector = sectors + i;
        // bright = 0 means to search
        // for highest light level
        // surrounding sector
        if (!bright)
        {
            for (j = 0; j < sector->linecount; j++)
            {
                templine = sector->lines[j];
                temp = getNextSector(templine, sector);

                if (!temp)
                    continue;

                if (temp->lightlevel > bright)
                    bright = temp->lightlevel;
            }
        }
        sector-> lightlevel = bright;
    }
}
开发者ID:smokhov,项目名称:atsm,代码行数:34,代码来源:p_lights.c


示例3: EV_LightTurnOn

//
// EV_LightTurnOn()
//
// Turn sectors tagged to line lights on to specified or max neighbor level
//
// Passed the activating line, and a level to set the light to
// If level passed is 0, the maximum neighbor lighting is used
// Returns true
//
// jff 2/12/98 added int return value, fixed return
//
int EV_LightTurnOn(line_t *line, int bright)
{
  int i;

  // search all sectors for ones with same tag as activating line

  // killough 10/98: replace inefficient search with fast search
  for (i = -1; (i = P_FindSectorFromLineTag(line,i)) >= 0;)
    {
      sector_t *temp, *sector = sectors+i;
      int j, tbright = bright; //jff 5/17/98 search for maximum PER sector

      // bright = 0 means to search for highest light level surrounding sector

      if (!bright)
	for (j = 0;j < sector->linecount; j++)
	  if ((temp = getNextSector(sector->lines[j],sector)) &&
	      temp->lightlevel > tbright)
	    tbright = temp->lightlevel;

      sector->lightlevel = tbright;
      
      //jff 5/17/98 unless compatibility optioned 
      //then maximum near ANY tagged sector
      if (compatibility)
	bright = tbright;
    }
  return 1;
}
开发者ID:hexameron,项目名称:DOOM,代码行数:40,代码来源:p_lights.c


示例4: EV_TurnTagLightsOff

//
// TURN LINE'S TAG LIGHTS OFF
//
void EV_TurnTagLightsOff(line_t *line)
{
    int			i;
    int			j;
    int			min;
    sector_t		*sector;
    sector_t		*tsec;
    line_t		*templine;

    for (j = -1; (j = P_FindSectorFromLineTag(line, j)) >= 0;)
    {
        sector = sectors + j;
        min = sector->lightlevel;
        for (i = 0; i < sector->linecount; i++)
        {
            templine = sector->lines[i];
            tsec = getNextSector(templine, sector);
            if (!tsec)
                continue;
            if (tsec->lightlevel < min)
                min = tsec->lightlevel;
        }
        sector->lightlevel = min;
    }
}
开发者ID:smokhov,项目名称:atsm,代码行数:28,代码来源:p_lights.c


示例5: EV_DoDonut

//
// Special Stuff that can not be categorized
//
int EV_DoDonut(line_t*	line)
{
    sector_t*		s1;
    sector_t*		s2;
    sector_t*		s3;
    int			secnum;
    int			rtn;
    int			i;
    floormove_t*	floor;
	
    secnum = -1;
    rtn = 0;
    while ((secnum = P_FindSectorFromLineTag(line,secnum)) >= 0)
    {
	s1 = &sectors[secnum];
		
	// ALREADY MOVING?  IF SO, KEEP GOING...
	if (s1->specialdata)
	    continue;
			
	rtn = 1;
	s2 = getNextSector(s1->lines[0],s1);
	for (i = 0;i < s2->linecount;i++)
	{
		//isn't this always false?
	    /*if ((!s2->lines[i]->flags & ML_TWOSIDED) ||
		(s2->lines[i]->backsector == s1))
		continue;*/
	    s3 = s2->lines[i]->backsector;
	    
	    //	Spawn rising slime
	    floor = (floormove_t*)malloc (sizeof(*floor));
	    P_AddThinker (&floor->thinker);
	    s2->specialdata = floor;
	    floor->thinker.function.acp1 = (actionf_p1) T_MoveFloor;
	    floor->type = donutRaise;
	    floor->crush = false;
	    floor->direction = Direction::UP;
	    floor->sector = s2;
	    floor->speed = FLOORSPEED / 2;
	    floor->texture = s3->floorpic;
	    floor->newspecial = 0;
	    floor->floordestheight = s3->floorheight;
	    
	    //	Spawn lowering donut-hole
	    floor = (floormove_t*)malloc (sizeof(*floor));
	    P_AddThinker (&floor->thinker);
	    s1->specialdata = floor;
	    floor->thinker.function.acp1 = (actionf_p1) T_MoveFloor;
	    floor->type = lowerFloor;
	    floor->crush = false;
	    floor->direction = Direction::DOWN;
	    floor->sector = s1;
	    floor->speed = FLOORSPEED / 2;
	    floor->floordestheight = s3->floorheight;
	    break;
	}
    }
    return rtn;
}
开发者ID:JonnyPtn,项目名称:SFML-DOOM,代码行数:63,代码来源:p_spec.cpp


示例6: P_DoSectorLightChange

int P_DoSectorLightChange(line_t* line, short tag) {
    int j = 0;
    int ptr1 = 0;
    int ptr2 = 0;
    sector_t* sec1;
    sector_t* sec2;
    int secnum;
    int rtn;

    secnum = P_FindSectorFromTag(tag);

    if(secnum == -1) {
        return 0;
    }

    sec2 = &sectors[secnum];
    
    secnum = -1;
    rtn = 0;

    while((secnum = P_FindSectorFromLineTag(line, secnum)) >= 0) {
        sec1 = &sectors[secnum];
        rtn = 1;

        for(j = 0; j < 5; j++) {
            ptr1 = (sec1->colors[j]);
            ptr2 = (sec2->colors[j]);
            P_UpdateLightThinker(&lights[ptr1], &lights[ptr2]);
        }
    }

    return 1;
}
开发者ID:directhex,项目名称:doom64,代码行数:33,代码来源:p_lights.c


示例7: EV_LightTurnOnPartway

int EV_LightTurnOnPartway(line_t *line, fixed_t level)
{
   int i;

   if (level < 0)          // clip at extremes
      level = 0;
   if (level > FRACUNIT)
      level = FRACUNIT;

   // search all sectors for ones with same tag as activating line
   for (i = -1; (i = P_FindSectorFromLineTag(line,i)) >= 0;)
   {
      sector_t *temp, *sector = sectors+i;
      int j, bright = 0, min = sector->lightlevel;

      for (j = 0; j < sector->linecount; j++)
         if ((temp = getNextSector(sector->lines[j],sector)))
         {
            if (temp->lightlevel > bright)
               bright = temp->lightlevel;
            if (temp->lightlevel < min)
               min = temp->lightlevel;
         }

      sector->lightlevel =   // Set level in-between extremes
         (level * bright + (FRACUNIT-level) * min) >> FRACBITS;
   }
   return 1;
}
开发者ID:4nykey,项目名称:rockbox,代码行数:29,代码来源:p_lights.c


示例8: EV_LightTurnOn

int EV_LightTurnOn(line_t *line, int bright)
{

    int i;

    for (i = -1; (i = P_FindSectorFromLineTag(line, i)) >= 0;)
    {

        sector_t *temp, *sector = sectors + i;
        int j, tbright = bright;

        if (!bright)
        {

            for (j = 0;j < sector->linecount; j++)
            {

                if ((temp = getNextSector(sector->lines[j],sector)) && temp->lightlevel > tbright)
                    tbright = temp->lightlevel;

            }

            sector->lightlevel = tbright;

        }

    }

    return 1;

}
开发者ID:jezze,项目名称:doom,代码行数:31,代码来源:p_lights.c


示例9: EV_TurnTagLightsOff

int EV_TurnTagLightsOff(line_t *line)
{

    int j;

    for (j = -1; (j = P_FindSectorFromLineTag(line,j)) >= 0;)
    {

        sector_t *sector = sectors + j, *tsec;
        int i, min = sector->lightlevel;

        for (i = 0;i < sector->linecount; i++)
        {

            if ((tsec = getNextSector(sector->lines[i], sector)) && tsec->lightlevel < min)
                min = tsec->lightlevel;

        }

        sector->lightlevel = min;

    }

    return 1;

}
开发者ID:jezze,项目名称:doom,代码行数:26,代码来源:p_lights.c


示例10: EV_RemoteSlidingDoor

//
// EV_RemoteSlidingDoor
//
// villsa [STRIFE] new function
//
int EV_RemoteSlidingDoor(line_t* line, mobj_t* thing)
{
    int		    secnum;
    sector_t*       sec;
    int             i;
    int             rtn;
    line_t*         secline;
	
    secnum = -1;
    rtn = 0;
    
    while((secnum = P_FindSectorFromLineTag(line,secnum)) >= 0)
    {
        sec = &sectors[secnum];
        if(sec->specialdata)
            continue;

        for(i = 0; i < 4; i++)
        {
            secline = sec->lines[i];

            if(P_FindSlidingDoorType(secline) < 0)
                continue;

            EV_SlidingDoor(secline, thing);
            rtn = 1;
        }
    }

    return rtn;
}
开发者ID:M-Code,项目名称:chocolate-doom,代码行数:36,代码来源:p_doors.c


示例11: EV_DoDoor

int EV_DoDoor(line_t * line, vldoor_e type, fixed_t speed)
{
    int secnum;
    int retcode;
    sector_t *sec;
    vldoor_t *door;

    secnum = -1;
    retcode = 0;
    while ((secnum = P_FindSectorFromLineTag(line, secnum)) >= 0)
    {
        sec = &sectors[secnum];
        if (sec->specialdata)
        {
            continue;
        }
        // Add new door thinker
        retcode = 1;
        door = Z_Malloc(sizeof(*door), PU_LEVSPEC, 0);
        P_AddThinker(&door->thinker);
        sec->specialdata = door;
        door->thinker.function = T_VerticalDoor;
        door->sector = sec;
        switch (type)
        {
            case close:
                door->topheight = P_FindLowestCeilingSurrounding(sec);
                door->topheight -= 4 * FRACUNIT;
                door->direction = -1;
                S_StartSound(&door->sector->soundorg, sfx_doropn);
                break;
            case close30ThenOpen:
                door->topheight = sec->ceilingheight;
                door->direction = -1;
                S_StartSound(&door->sector->soundorg, sfx_doropn);
                break;
            case normal:
            case open:
                door->direction = 1;
                door->topheight = P_FindLowestCeilingSurrounding(sec);
                door->topheight -= 4 * FRACUNIT;
                if (door->topheight != sec->ceilingheight)
                {
                    S_StartSound(&door->sector->soundorg,
                                 sfx_doropn);
                }
                break;
            default:
                break;
        }
        door->type = type;
        door->speed = speed;
        door->topwait = VDOORWAIT;
    }
    return (retcode);
}
开发者ID:Krazygamr,项目名称:D-Touch,代码行数:56,代码来源:p_doors.c


示例12: EV_StartLightStrobing

void EV_StartLightStrobing(line_t* line) {
    int            secnum;
    sector_t*    sec;

    secnum = -1;
    while((secnum = P_FindSectorFromLineTag(line, secnum)) >= 0) {
        sec = &sectors[secnum];
        if(sec->specialdata) {
            continue;
        }

        P_SpawnStrobeFlash(sec, SLOWDARK);
    }
}
开发者ID:directhex,项目名称:doom64,代码行数:14,代码来源:p_lights.c


示例13: EV_StartLightStrobing

//
// EV_StartLightStrobing()
//
// Start strobing lights (usually from a trigger)
//
// Passed the line that activated the strobing
// Returns true
//
// jff 2/12/98 added int return value, fixed return
//
int EV_StartLightStrobing(line_t* line)
{
  int   secnum;
  sector_t* sec;

  secnum = -1;
  // start lights strobing in all sectors tagged same as line
  while ((secnum = P_FindSectorFromLineTag(line,secnum)) >= 0)
  {
    sec = &sectors[secnum];
    // if already doing a lighting function, don't start a second
    if (P_SectorActive(lighting_special,sec)) //jff 2/22/98
      continue;

    P_SpawnStrobeFlash (sec,SLOWDARK, 0);
  }
  return 1;
}
开发者ID:hexameron,项目名称:DOOM,代码行数:28,代码来源:p_lights.c


示例14: EV_TurnTagLightsOff

//
// EV_TurnTagLightsOff()
//
// Turn line's tagged sector's lights to min adjacent neighbor level
//
// Passed the line that activated the lights being turned off
// Returns true
//
// jff 2/12/98 added int return value, fixed return
//
int EV_TurnTagLightsOff(line_t* line)
{
  int j;
  
  // search sectors for those with same tag as activating line

  // killough 10/98: replaced inefficient search with fast search
  for (j = -1; (j = P_FindSectorFromLineTag(line,j)) >= 0;)
    {
      sector_t *sector = sectors + j, *tsec;
      int i, min = sector->lightlevel;
      // find min neighbor light level
      for (i = 0;i < sector->linecount; i++)
	if ((tsec = getNextSector(sector->lines[i], sector)) &&
	    tsec->lightlevel < min)
	  min = tsec->lightlevel;
      sector->lightlevel = min;
    }
  return 1;
}
开发者ID:hexameron,项目名称:DOOM,代码行数:30,代码来源:p_lights.c


示例15: EV_StartLightStrobing

int EV_StartLightStrobing(line_t *line)
{

    int secnum = -1;
    sector_t* sec;

    while ((secnum = P_FindSectorFromLineTag(line,secnum)) >= 0)
    {

        sec = &sectors[secnum];

        if (P_SectorActive(lighting_special,sec))
            continue;

        P_SpawnStrobeFlash (sec,SLOWDARK, 0);

    }

    return 1;

}
开发者ID:jezze,项目名称:doom,代码行数:21,代码来源:p_lights.c


示例16: EV_LightTurnOnPartway

int EV_LightTurnOnPartway(line_t *line, fixed_t level)
{

    int i;

    if (level < 0)
        level = 0;

    if (level > FRACUNIT)
        level = FRACUNIT;

    for (i = -1; (i = P_FindSectorFromLineTag(line, i)) >= 0;)
    {

        sector_t *temp, *sector = sectors + i;
        int j, bright = 0, min = sector->lightlevel;

        for (j = 0; j < sector->linecount; j++)
        {

            if ((temp = getNextSector(sector->lines[j], sector)))
            {

                if (temp->lightlevel > bright)
                    bright = temp->lightlevel;

                if (temp->lightlevel < min)
                    min = temp->lightlevel;

            }

        }

        sector->lightlevel = (level * bright + (FRACUNIT-level) * min) >> FRACBITS;

    }

    return 1;

}
开发者ID:jezze,项目名称:doom,代码行数:40,代码来源:p_lights.c


示例17: EV_TurnTagLightsOff

//
// TURN LINE'S TAG LIGHTS OFF
//
int EV_TurnTagLightsOff(line_t *line)
{
    int i;

    // search sectors for those with same tag as activating line

    // killough 10/98: replaced inefficient search with fast search
    for (i = -1; (i = P_FindSectorFromLineTag(line, i)) >= 0;)
    {
        sector_t        *temp;
        sector_t        *sector = sectors + i;
        int             j;
        int             min = sector->lightlevel;

        // find min neighbor light level
        for (j = 0; j < sector->linecount; j++)
            if ((temp = getNextSector(sector->lines[j], sector)) && temp->lightlevel < min)
                min = temp->lightlevel;
        sector->lightlevel = min;
    }
    return 1;
}
开发者ID:Clever-Boy,项目名称:doomretro,代码行数:25,代码来源:p_lights.c


示例18: EV_DoPlat

//==================================================================
//
//      Do Platforms
//      "amount" is only used for SOME platforms.
//
//==================================================================
int EV_DoPlat(line_t * line, plattype_e type, int amount)
{
    plat_t *plat;
    int secnum;
    int rtn;
    sector_t *sec;

    secnum = -1;
    rtn = 0;

    //
    //      Activate all <type> plats that are in_stasis
    //
    switch (type)
    {
        case perpetualRaise:
            P_ActivateInStasis(line->tag);
            break;
        default:
            break;
    }

    while ((secnum = P_FindSectorFromLineTag(line, secnum)) >= 0)
    {
        sec = &sectors[secnum];
        if (sec->specialdata)
            continue;

        //
        // Find lowest & highest floors around sector
        //
        rtn = 1;
        plat = Z_Malloc(sizeof(*plat), PU_LEVSPEC, 0);
        P_AddThinker(&plat->thinker);

        plat->type = type;
        plat->sector = sec;
        plat->sector->specialdata = plat;
        plat->thinker.function = T_PlatRaise;
        plat->crush = false;
        plat->tag = line->tag;
        switch (type)
        {
            case raiseToNearestAndChange:
                plat->speed = PLATSPEED / 2;
                sec->floorpic = sides[line->sidenum[0]].sector->floorpic;
                plat->high = P_FindNextHighestFloor(sec, sec->floorheight);
                plat->wait = 0;
                plat->status = up;
                sec->special = 0;       // NO MORE DAMAGE, IF APPLICABLE
                S_StartSound(&sec->soundorg, sfx_stnmov);
                break;
            case raiseAndChange:
                plat->speed = PLATSPEED / 2;
                sec->floorpic = sides[line->sidenum[0]].sector->floorpic;
                plat->high = sec->floorheight + amount * FRACUNIT;
                plat->wait = 0;
                plat->status = up;
                S_StartSound(&sec->soundorg, sfx_stnmov);
                break;
            case downWaitUpStay:
                plat->speed = PLATSPEED * 4;
                plat->low = P_FindLowestFloorSurrounding(sec);
                if (plat->low > sec->floorheight)
                    plat->low = sec->floorheight;
                plat->high = sec->floorheight;
                plat->wait = 35 * PLATWAIT;
                plat->status = down;
                S_StartSound(&sec->soundorg, sfx_pstart);
                break;
            case perpetualRaise:
                plat->speed = PLATSPEED;
                plat->low = P_FindLowestFloorSurrounding(sec);
                if (plat->low > sec->floorheight)
                    plat->low = sec->floorheight;
                plat->high = P_FindHighestFloorSurrounding(sec);
                if (plat->high < sec->floorheight)
                    plat->high = sec->floorheight;
                plat->wait = 35 * PLATWAIT;
                plat->status = P_Random() & 1;
                S_StartSound(&sec->soundorg, sfx_pstart);
                break;
        }
        P_AddActivePlat(plat);
    }
    return rtn;
}
开发者ID:Krazygamr,项目名称:D-Touch,代码行数:93,代码来源:p_plats.c


示例19: switch

//
// EV_DoCeiling
// Move a ceiling up/down and all around!
//
int
EV_DoCeiling
( line_t*		line,
  ceiling_e		type )
{
	int			secnum;
	int			rtn;
	sector_t*	sec;
	ceiling_t*	ceiling;
		
	secnum = -1;
	rtn = 0;
	
	//	Reactivate in-stasis ceilings...for certain types.
	switch(type)
	{
	  case fastCrushAndRaise:
	  case silentCrushAndRaise:
	  case crushAndRaise:
		P_ActivateInStasisCeiling(line);
	  default:
		break;
	}
		
	while ((secnum = P_FindSectorFromLineTag(line,secnum)) >= 0)
	{
		sec = &sectors[secnum];
		if (sec->specialdata)
			continue;
		
		// new door thinker
		rtn = 1;
		ceiling = Z_Malloc (sizeof(*ceiling), PU_LEVSPEC, 0);
		P_AddThinker (&ceiling->thinker);
		sec->specialdata = ceiling;
		ceiling->thinker.function.acp1 = (actionf_p1)T_MoveCeiling;
		ceiling->sector = sec;
		ceiling->crush = false;
		
		switch(type)
		{
		  case fastCrushAndRaise:
			ceiling->crush = true;
			ceiling->topheight = sec->ceilingheight;
			ceiling->bottomheight = sec->floorheight + (8*FRACUNIT);
			ceiling->direction = -1;
			ceiling->speed = CEILSPEED * 2;
			break;

		  case silentCrushAndRaise:
		  case crushAndRaise:
			ceiling->crush = true;
			ceiling->topheight = sec->ceilingheight;
		  case lowerAndCrush:
		  case lowerToFloor:
			ceiling->bottomheight = sec->floorheight;
			if (type != lowerToFloor)
				ceiling->bottomheight += 8*FRACUNIT;
			ceiling->direction = -1;
			ceiling->speed = CEILSPEED;
			break;

		  case raiseToHighest:
			ceiling->topheight = P_FindHighestCeilingSurrounding(sec);
			ceiling->direction = 1;
			ceiling->speed = CEILSPEED;
			break;
		}
				
		ceiling->tag = sec->tag;
		ceiling->type = type;
		P_AddActiveCeiling(ceiling);
	}
	return rtn;
}
开发者ID:ChenZewei,项目名称:NyuziProcessor,代码行数:79,代码来源:p_ceilng.c


示例20: EV_DoFloor

//
// HANDLE FLOOR TYPES
//
int EV_DoFloor( line_t*	line, floor_e	floortype )
{
  int			secnum;
  int			rtn;
  int			i;
  sector_t*		sec;
  floormove_t*	floor;

  secnum = -1;
  rtn = 0;
  while ((secnum = P_FindSectorFromLineTag(line,secnum)) >= 0)
  {
    sec = &sectors[secnum];

    // ALREADY MOVING?  IF SO, KEEP GOING...
    if (sec->specialdata)
      continue;

    // new floor thinker
    rtn = 1;
    floor = (floormove_t *)Z_Malloc (sizeof(*floor), PU_LEVSPEC, 0);
    P_AddThinker (&floor->thinker,floor);
    sec->specialdata = floor;
    floor->thinker.function = TT_MoveFloor;
    floor->type = floortype;
    floor->crush = false;

    switch(floortype)
    {
    case lowerFloor:
      floor->direction = -1;
      floor->sector = sec;
      floor->speed = FLOORSPEED;
      floor->floordestheight = 
        P_FindHighestFloorSurrounding(sec);
      break;

    case lowerFloorToLowest:
      floor->direction = -1;
      floor->sector = sec;
      floor->speed = FLOORSPEED;
      floor->floordestheight = 
        P_FindLowestFloorSurrounding(sec);
      break;

    case turboLower:
      floor->direction = -1;
      floor->sector = sec;
      floor->speed = FLOORSPEED * 4;
      floor->floordestheight = 
        P_FindHighestFloorSurrounding(sec);
      if (floor->floordestheight != sec->floorheight)
        floor->floordestheight += 8*FRACUNIT;
      break;

    case raiseFloorCrush:
      floor->crush = true;
    case raiseFloor:
      floor->direction = 1;
      floor->sector = sec;
      floor->speed = FLOORSPEED;
      floor->floordestheight = 
        P_FindLowestCeilingSurrounding(sec);
      if (floor->floordestheight > sec->ceilingheight)
        floor->floordestheight = sec->ceilingheight;
      floor->floordestheight -= (8*FRACUNIT)*
        (floortype == raiseFloorCrush);
      break;

    case raiseFloorTurbo:
      floor->direction = 1;
      floor->sector = sec;
      floor->speed = FLOORSPEED*4;
      floor->floordestheight = 
        P_FindNextHighestFloor(sec,sec->floorheight);
      break;

    case raiseFloorToNearest:
      floor->direction = 1;
      floor->sector = sec;
      floor->speed = FLOORSPEED;
      floor->floordestheight = 
        P_FindNextHighestFloor(sec,sec->floorheight);
      break;

    case raiseFloor24:
      floor->direction = 1;
      floor->sector = sec;
      floor->speed = FLOORSPEED;
      floor->floordestheight = floor->sector->floorheight +
        24 * FRACUNIT;
      break;
    case raiseFloor512:
      floor->direction = 1;
      floor->sector = sec;
      floor->speed = FLOORSPEED;
      floor->floordestheight = floor->sector->floorheight +
//.........这里部分代码省略.........
开发者ID:ComputerNerd,项目名称:cgdoom,代码行数:101,代码来源:p_floor.c



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ P_FindSectorFromTag函数代码示例发布时间:2022-05-30
下一篇:
C++ P_FIRSTDATAKEY函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap