mirror of
https://github.com/nzp-team/quakec.git
synced 2024-11-28 23:02:51 +00:00
SERVER: Prevent multiple uses from trigger_awardpoints
This commit is contained in:
parent
60383b1ab0
commit
26b8b610f0
1 changed files with 4 additions and 1 deletions
|
@ -374,7 +374,7 @@ void() trigger_setfire =
|
||||||
|
|
||||||
void() trigger_awardpoints_touch =
|
void() trigger_awardpoints_touch =
|
||||||
{
|
{
|
||||||
if (other.classname != "player" || other.downed)
|
if (other.classname != "player" || other.downed || !self.health)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (other.stance != PLAYER_STANCE_STAND && (self.spawnflags & SPAWNFLAG_TRIGGERSCORE_REQUIRESTAND))
|
if (other.stance != PLAYER_STANCE_STAND && (self.spawnflags & SPAWNFLAG_TRIGGERSCORE_REQUIRESTAND))
|
||||||
|
@ -388,12 +388,15 @@ void() trigger_awardpoints_touch =
|
||||||
|
|
||||||
if (self.noise != "")
|
if (self.noise != "")
|
||||||
sound(self, 0, self.noise, 1, 1);
|
sound(self, 0, self.noise, 1, 1);
|
||||||
|
|
||||||
|
self.health = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void() trigger_awardpoints =
|
void() trigger_awardpoints =
|
||||||
{
|
{
|
||||||
InitTrigger ();
|
InitTrigger ();
|
||||||
self.touch = trigger_awardpoints_touch;
|
self.touch = trigger_awardpoints_touch;
|
||||||
|
self.health = 1;
|
||||||
|
|
||||||
if (self.noise != "")
|
if (self.noise != "")
|
||||||
precache_sound(self.noise);
|
precache_sound(self.noise);
|
||||||
|
|
Loading…
Reference in a new issue