📄 p_switch.c
字号:
switch((line->special & TriggerType) >> TriggerTypeShift) { case PushOnce: if (!side) if (linefunc(line)) line->special = 0; return true; case PushMany: if (!side) linefunc(line); return true; case SwitchOnce: if (linefunc(line)) P_ChangeSwitchTexture(line,0); return true; case SwitchMany: if (linefunc(line)) P_ChangeSwitchTexture(line,1); return true; default: // if not a switch/push type, do nothing here return false; } } // Switches that other things can activate. if (!thing->player) { // never open secret doors if (line->flags & ML_SECRET) return false; switch(line->special) { case 1: // MANUAL DOOR RAISE case 32: // MANUAL BLUE case 33: // MANUAL RED case 34: // MANUAL YELLOW //SoM: 3/18/2000: add ability to use teleporters for monsters case 195: // switch teleporters case 174: case 210: // silent switch teleporters case 209: break; default: return false; break; } } if (!P_CheckTag(line) && boomsupport) //disallow zero tag on some types return false; // do something switch (line->special) { // MANUALS case 1: // Vertical Door case 26: // Blue Door/Locked case 27: // Yellow Door /Locked case 28: // Red Door /Locked case 31: // Manual door open case 32: // Blue locked door open case 33: // Red locked door open case 34: // Yellow locked door open case 117: // Blazing door raise case 118: // Blazing door open EV_VerticalDoor (line, thing); break; //UNUSED - Door Slide Open&Close // case 124: // EV_SlidingDoor (line, thing); // break; // SWITCHES case 7: // Build Stairs if (EV_BuildStairs(line,gamemode == heretic ? 8*FRACUNIT : build8)) P_ChangeSwitchTexture(line,0); break; case 107: if( gamemode == heretic ) { if (EV_BuildStairs (line, 16 * FRACUNIT)) P_ChangeSwitchTexture (line, 0); } break; case 9: // Change Donut if (EV_DoDonut(line)) P_ChangeSwitchTexture(line,0); break; case 11: // Exit level if(cv_allowexitlevel.value) { P_ChangeSwitchTexture(line,0); G_ExitLevel (); } break; case 14: // Raise Floor 32 and change texture if (EV_DoPlat(line,raiseAndChange,32)) P_ChangeSwitchTexture(line,0); break; case 15: // Raise Floor 24 and change texture if (EV_DoPlat(line,raiseAndChange,24)) P_ChangeSwitchTexture(line,0); break; case 18: // Raise Floor to next highest floor if (EV_DoFloor(line, raiseFloorToNearest)) P_ChangeSwitchTexture(line,0); break; case 20: // Raise Plat next highest floor and change texture if (EV_DoPlat(line,raiseToNearestAndChange,0)) P_ChangeSwitchTexture(line,0); break; case 21: // PlatDownWaitUpStay if (EV_DoPlat(line,downWaitUpStay,0)) P_ChangeSwitchTexture(line,0); break; case 23: // Lower Floor to Lowest if (EV_DoFloor(line,lowerFloorToLowest)) P_ChangeSwitchTexture(line,0); break; case 29: // Raise Door if (EV_DoDoor(line,normalDoor,VDOORSPEED)) P_ChangeSwitchTexture(line,0); break; case 41: // Lower Ceiling to Floor if (EV_DoCeiling(line,lowerToFloor)) P_ChangeSwitchTexture(line,0); break; case 71: // Turbo Lower Floor if (EV_DoFloor(line,turboLower)) P_ChangeSwitchTexture(line,0); break; case 49: // Ceiling Crush And Raise if (EV_DoCeiling(line,gamemode==heretic ? lowerAndCrush : crushAndRaise)) P_ChangeSwitchTexture(line,0); break; case 50: // Close Door if (EV_DoDoor(line,doorclose,VDOORSPEED)) P_ChangeSwitchTexture(line,0); break; case 51: // Secret EXIT P_ChangeSwitchTexture(line,0); G_SecretExitLevel (); break; case 55: // Raise Floor Crush if (EV_DoFloor(line,raiseFloorCrush)) P_ChangeSwitchTexture(line,0); break; case 101: // Raise Floor if (EV_DoFloor(line,raiseFloor)) P_ChangeSwitchTexture(line,0); break; case 102: // Lower Floor to Surrounding floor height if (EV_DoFloor(line,lowerFloor)) P_ChangeSwitchTexture(line,0); break; case 103: // Open Door if (EV_DoDoor(line,dooropen,VDOORSPEED)) P_ChangeSwitchTexture(line,0); break; case 111: // Blazing Door Raise (faster than TURBO!) if (EV_DoDoor (line,blazeRaise,4*VDOORSPEED)) P_ChangeSwitchTexture(line,0); break; case 112: // Blazing Door Open (faster than TURBO!) if (EV_DoDoor (line,blazeOpen,4*VDOORSPEED)) P_ChangeSwitchTexture(line,0); break; case 113: // Blazing Door Close (faster than TURBO!) if (EV_DoDoor (line,blazeClose,4*VDOORSPEED)) P_ChangeSwitchTexture(line,0); break; case 122: // Blazing PlatDownWaitUpStay if (EV_DoPlat(line,blazeDWUS,0)) P_ChangeSwitchTexture(line,0); break; case 127: // Build Stairs Turbo 16 if (EV_BuildStairs(line,turbo16)) P_ChangeSwitchTexture(line,0); break; case 131: // Raise Floor Turbo if (EV_DoFloor(line,raiseFloorTurbo)) P_ChangeSwitchTexture(line,0); break; case 133: // BlzOpenDoor BLUE case 135: // BlzOpenDoor RED case 137: // BlzOpenDoor YELLOW if (EV_DoLockedDoor (line,blazeOpen,thing,4*VDOORSPEED)) P_ChangeSwitchTexture(line,0); break; case 140: // Raise Floor 512 if (EV_DoFloor(line,raiseFloor512)) P_ChangeSwitchTexture(line,0); break; //SoM: FraggleScript! case 276: case 277: t_trigger = thing; T_RunScript(line->tag); if(line->special == 277) { line->special = 0; // clear tag P_ChangeSwitchTexture(line,0); } else P_ChangeSwitchTexture(line,1); break; default: if (boomsupport) switch (line->special) { // added linedef types to fill all functions out so that // all possess SR, S1, WR, W1 types case 158: // Raise Floor to shortest lower texture if (EV_DoFloor(line,raiseToTexture)) P_ChangeSwitchTexture(line,0); break; case 159: // Raise Floor to shortest lower texture if (EV_DoFloor(line,lowerAndChange)) P_ChangeSwitchTexture(line,0); break; case 160: // Raise Floor 24 and change if (EV_DoFloor(line,raiseFloor24AndChange)) P_ChangeSwitchTexture(line,0); break; case 161: // Raise Floor 24 if (EV_DoFloor(line,raiseFloor24)) P_ChangeSwitchTexture(line,0); break; case 162: // Moving floor min n to max n if (EV_DoPlat(line,perpetualRaise,0)) P_ChangeSwitchTexture(line,0); break; case 163: // Stop Moving floor EV_StopPlat(line); P_ChangeSwitchTexture(line,0); break; case 164: // Start fast crusher if (EV_DoCeiling(line,fastCrushAndRaise)) P_ChangeSwitchTexture(line,0); break; case 165: // Start slow silent crusher if (EV_DoCeiling(line,silentCrushAndRaise)) P_ChangeSwitchTexture(line,0); break; case 166: // Raise ceiling, Lower floor if (EV_DoCeiling(line, raiseToHighest) || EV_DoFloor(line, lowerFloorToLowest)) P_ChangeSwitchTexture(line,0); break; case 167: // Lower floor and Crush if (EV_DoCeiling(line, lowerAndCrush)) P_ChangeSwitchTexture(line,0); break; case 168: // Stop crusher if (EV_CeilingCrushStop(line)) P_ChangeSwitchTexture(line,0); break; case 169: // Lights to brightest neighbor sector EV_LightTurnOn(line,0); P_ChangeSwitchTexture(line,0); break; case 170: // Lights to near dark EV_LightTurnOn(line,35); P_ChangeSwitchTexture(line,0); break; case 171: // Lights on full EV_LightTurnOn(line,255); P_ChangeSwitchTexture(line,0); break; case 172: // Start Lights Strobing EV_StartLightStrobing(line); P_ChangeSwitchTexture(line,0); break; case 173: // Lights to Dimmest Near EV_TurnTagLightsOff(line); P_ChangeSwitchTexture(line,0); break; case 174: // Teleport if (EV_Teleport(line,side,thing)) P_ChangeSwitchTexture(line,0); break; case 175: // Close Door, Open in 30 secs if (EV_DoDoor(line,close30ThenOpen,VDOORSPEED)) P_ChangeSwitchTexture(line,0); break; case 189: //create texture change no motion type // Texture Change Only (Trigger) if (EV_DoChange(line,trigChangeOnly)) P_ChangeSwitchTexture(line,0); break;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -