# HG changeset patch
# User Adam Kaminski <kaminskiadam9@gmail.com>
# Date 1673454921 18000
#      Wed Jan 11 11:35:21 2023 -0500
# Node ID 5f85846350ceb45a0805110206a22952ba72ee48
# Parent  2e9001cde13f84080c5c5234766b8e90508f9400
Fixed: players still respawned inside sectors with extended damage types if sv_samespawnspot was enabled.

diff -r 2e9001cde13f -r 5f85846350ce docs/zandronum-history.txt
--- a/docs/zandronum-history.txt	Fri Dec 30 22:41:28 2022 -0500
+++ b/docs/zandronum-history.txt	Wed Jan 11 11:35:21 2023 -0500
@@ -88,6 +88,7 @@
 -	- Fixed: Every client's ping would be stuck at zero on a Linux server that was running for more than 24 consecutive days. [Kaminsky]
 -	- Fixed: when the server printed a list of flags that were changed, it didn't check if a flag CVar existed first before incrementing the number of flags changed (e.g. "dmflags2 1" doesn't enable any flags because no flag CVar occupies the first bit of dmflags2). [Kaminsky]
 -	- Fixed: sv_markchatlines printed chat lines with two timestamps if sv_logfiletimestamp was enabled. [Kaminsky]
+-	- Fixed: players still respawned inside sectors with extended damage types if sv_samespawnspot was enabled. [Kaminsky]
 !	- The result value of GAMEEVENT_MEDALS event scripts can now be used to determine whether or not the player receives the medal. [Kaminsky]
 !	- GAMEMODE flags are now validated after all GAMEMODE lumps have been parsed instead of after each one. The internal game mode name (e.g. "TeamLMS") is now printed with the error message instead of the actual name. [Kaminsky]
 !	- Added an extra check to ensure that game modes have a (short) name. [Kaminsky]
diff -r 2e9001cde13f -r 5f85846350ce src/p_interaction.cpp
--- a/src/p_interaction.cpp	Fri Dec 30 22:41:28 2022 -0500
+++ b/src/p_interaction.cpp	Wed Jan 11 11:35:21 2023 -0500
@@ -3479,6 +3479,10 @@
 			return false;
 	}
 
+	// [AK] Also handle extended sector damage types.
+	if ( mo->Sector->special & DAMAGE_MASK )
+		return false;
+
 	// [AK] Don't respawn the player in an instant death sector. Taken directly from P_PlayerSpawn.
 	if (( mo->Sector->Flags & SECF_NORESPAWN ) || (( mo->Sector->special & 255 ) == Damage_InstantDeath ))
 		return false;
