From 9fc2b5b1b9b324cf03c77a96cb612ab8f8b6e634 Mon Sep 17 00:00:00 2001 From: MascaraSnake Date: Tue, 14 Apr 2020 09:51:48 +0200 Subject: [PATCH] Implement FOF type 258 --- extras/conf/udb/Includes/SRB222_linedefs.cfg | 157 ++++++++++--------- src/p_setup.c | 5 + src/p_spec.c | 4 +- 3 files changed, 94 insertions(+), 72 deletions(-) diff --git a/extras/conf/udb/Includes/SRB222_linedefs.cfg b/extras/conf/udb/Includes/SRB222_linedefs.cfg index c63947f65..0847826d4 100644 --- a/extras/conf/udb/Includes/SRB222_linedefs.cfg +++ b/extras/conf/udb/Includes/SRB222_linedefs.cfg @@ -1582,89 +1582,106 @@ udmf } } } - } - 200 - { - title = "Light Block"; - prefix = "(200); - arg0 + 200 { - title = "Target sector tag"; - type = 13; - } - arg1 - { - title = "Expand to bottom?"; - type = 11; - enum = "noyes"; - } - } - - 202 - { - title = "Fog Block"; - prefix = "(202); - arg0 - { - title = "Target sector tag"; - type = 13; - } - } - - 223 - { - title = "Intangible, Invisible"; - prefix = "(223); - arg0 - { - title = "Target sector tag"; - type = 13; - } - } - - 250 - { - title = "Mario Block"; - prefix = "(250); - arg0 - { - title = "Target sector tag"; - type = 13; - } - arg1 - { - title = "Block type"; - type = 12; - enum + title = "Light Block"; + prefix = "(200); + arg0 { - 1 = "Brick"; - 2 = "Invisible"; + title = "Target sector tag"; + type = 13; + } + arg1 + { + title = "Expand to bottom?"; + type = 11; + enum = "noyes"; } } - } - 251 - { - title = "Thwomp Block"; - prefix = "(251); - arg0 + 202 { - title = "Target sector tag"; - type = 13; + title = "Fog Block"; + prefix = "(202); + arg0 + { + title = "Target sector tag"; + type = 13; + } } - arg1 + + 223 { - title = "Falling speed"; + title = "Intangible, Invisible"; + prefix = "(223); + arg0 + { + title = "Target sector tag"; + type = 13; + } } - arg2 + + 250 { - title = "Rising speed"; + title = "Mario Block"; + prefix = "(250); + arg0 + { + title = "Target sector tag"; + type = 13; + } + arg1 + { + title = "Block type"; + type = 12; + enum + { + 1 = "Brick"; + 2 = "Invisible"; + } + } } - stringarg0 + + 251 { - title = "Crushing sound"; - type = 2; + title = "Thwomp Block"; + prefix = "(251); + arg0 + { + title = "Target sector tag"; + type = 13; + } + arg1 + { + title = "Falling speed"; + } + arg2 + { + title = "Rising speed"; + } + stringarg0 + { + title = "Crushing sound"; + type = 2; + } + } + + 258 + { + title = "Laser"; + prefix = "(258)"; + arg0 + { + title = "Target sector tag"; + type = 13; + } + arg1 + { + title = "Damage bosses?"; + type = 11; + enum = "yesno"; + } } } diff --git a/src/p_setup.c b/src/p_setup.c index 82671abb0..7c8a8c147 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -2958,6 +2958,11 @@ static void P_ConvertBinaryMap(void) M_Memcpy(lines[i].stringargs[0], buffer, strlen(buffer) + 1); } break; + case 258: //FOF: Laser + lines[i].args[0] = lines[i].tag; + if (lines[i].flags & ML_EFFECT1) + lines[i].args[1] = 1; + break; case 443: //Call Lua function if (lines[i].text) { diff --git a/src/p_spec.c b/src/p_spec.c index 774c7162a..5288d2773 100644 --- a/src/p_spec.c +++ b/src/p_spec.c @@ -6293,7 +6293,7 @@ void T_LaserFlash(laserthink_t *flash) { thing = node->m_thing; - if ((fflr->master->flags & ML_EFFECT1) + if ((fflr->master->args[1]) && thing->flags & MF_BOSS) continue; // Don't hurt bosses @@ -7045,7 +7045,7 @@ void P_SpawnSpecials(boolean fromnetsave) sec = sides[*lines[i].sidenum].sector - sectors; // No longer totally disrupts netgames - for (s = -1; (s = P_FindSectorFromLineTag(lines + i, s)) >= 0 ;) + for (s = -1; (s = P_FindSectorFromTag(lines[i].args[0], s)) >= 0 ;) EV_AddLaserThinker(§ors[s], §ors[sec], lines + i, secthinkers); break;