SERVER: Create dummy entity for playing sound from teddy entity.

This commit is contained in:
Ian 2023-02-02 18:45:43 -05:00 committed by GitHub
parent 19e119945c
commit 4ce1beb29e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -304,8 +304,14 @@ void() teddy_react =
remove(t);
}
entity dummy = spawn();
setorigin(dummy, self.origin);
dummy.think = SUB_Remove;
dummy.nextthink = time + 10;
if (self.noise)
sound (self, CHAN_ITEM, self.noise, 1, ATTN_NORM);
sound (dummy, CHAN_ITEM, self.noise, 1, ATTN_NORM);
remove(self);
}