SERVER: Prohibit trigger field firing in non-waypoint mode for Quake doors

This commit is contained in:
MotoLegacy 2024-01-19 18:41:08 -05:00
parent d5e9916cef
commit 3d233480fc

View file

@ -333,9 +333,7 @@ void() door_use =
void() door_trigger_touch = void() door_trigger_touch =
{ {
if(other.classname != "player") if(other.classname != "player")
{
return; return;
}
if(cvar("waypoint_mode")) if(cvar("waypoint_mode"))
{ {
@ -348,6 +346,9 @@ void() door_trigger_touch =
} }
return; return;
} }
if (self.owner.targetname && self.owner.classname != "door_nzp_cost")
return;
if (other.health <= 20) if (other.health <= 20)
return; return;
@ -399,6 +400,8 @@ void() door_touch =
if (self.classname == "door" && self.targetname) if (self.classname == "door" && self.targetname)
return; return;
bprint(PRINT_HIGH, "hello..!\n");
if (isPowerOn == FALSE) if (isPowerOn == FALSE)
{ {
if (self.owner.spawnflags & DOOR_POWER) if (self.owner.spawnflags & DOOR_POWER)