SERVER: Add trigger_atroundend, add spawnflags for trigger_hurt

This commit is contained in:
cypress 2023-12-16 16:51:42 -05:00
parent e26fd61044
commit ec76c768cd
2 changed files with 26 additions and 2 deletions

View file

@ -356,10 +356,21 @@ void() trigger_once =
trigger_multiple();
}
void() trigger_atroundend =
{
self.classname = "trigger_atroundend";
//self.use = multi_use;
}
//
// Quake Triggers
//
// NZ:P START -- Spawnflags for not hurting clients and not hurting AI
#define HURT_SPAWNFLAG_NOAI 1
#define HURT_SPAWNFLAG_NOCLIENT 2
// NZ:P END
void() hurt_on =
{
self.solid = SOLID_TRIGGER;
@ -368,7 +379,8 @@ void() hurt_on =
void() hurt_touch =
{
//if (other.takedamage)
if ((other.classname == "player" && !(self.spawnflags & HURT_SPAWNFLAG_NOCLIENT)) ||
(other.aistatus == "1" && !(self.spawnflags & HURT_SPAWNFLAG_NOAI)))
{
self.solid = SOLID_NOT;
DamageHandler(other, self, self.dmg, S_ZOMBIE);