activator = self.enemy;
SUB_UseTargets ();
remove(self);
-};
+}
/*
==============================
*/
void SUB_UseTargets()
{
- local entity t, stemp, otemp, act;
+ entity t, stemp, otemp, act;
string s;
float i;
activator = act;
self = stemp;
other = otemp;
-};
+}
//=============================================================================
self.takedamage = DAMAGE_YES;
self.solid = SOLID_BBOX;
}
-};
+}
// the trigger was just touched/killed/used
// called wheil C code is looping through area links...
self.touch = SUB_Null;
}
-};
+}
void multi_use()
{
self.goalentity = other;
self.enemy = activator;
multi_trigger();
-};
+}
void multi_touch()
{
self.enemy = other;
self.goalentity = other;
multi_trigger ();
-};
+}
void multi_eventdamage (entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force)
{
setorigin (self, self.origin); // make sure it links into the world
}
}
-};
+}
/*QUAKED spawnfunc_trigger_once (.5 .5 .5) ? notouch
{
self.wait = -1;
spawnfunc_trigger_multiple();
-};
+}
//=============================================================================
{
self.use = SUB_UseTargets;
self.reset = spawnfunc_trigger_relay; // this spawnfunc resets fully
-};
+}
void delay_use()
{
centerprint(activator, "Sequence completed!");
self.enemy = activator;
multi_trigger ();
-};
+}
void counter_reset()
{
self.use = counter_use;
self.reset = counter_reset;
-};
+}
void trigger_hurt_use()
{
}
return;
-};
+}
/*QUAKED spawnfunc_trigger_hurt (.5 .5 .5) ?
Any object touching this will be hurt
if(trigger_hurt_last)
trigger_hurt_last.trigger_hurt_next = self;
trigger_hurt_last = self;
-};
+}
float tracebox_hits_trigger_hurt(vector start, vector mi, vector ma, vector end)
{
}
}
}
-};
+}
void spawnfunc_trigger_heal()
{
if(self.noise == "")
self.noise = "misc/mediumhealth.wav";
precache_sound(self.noise);
-};
+}
//////////////////////////////////////////////////////////////
self.count -= 1;
self.nextthink = time;
}
-};
+}
void trigger_gravity_use()
{
self.state = !self.state;
-};
+}
void trigger_gravity_touch()
{
sound (other, CH_TRIGGER, self.noise, VOL_BASE, ATTN_NORM);
UpdateCSQCProjectile(self.owner);
}
-};
+}
void spawnfunc_trigger_gravity()
{
if(self.spawnflags & 2)
self.state = FALSE;
}
-};
+}
//=============================================================================
else
snd = self.noise;
msg_entity = activator;
- soundto(MSG_ONE, self, CH_TRIGGER_SINGLE, snd, VOL_BASE * self.volume, self.atten);
+ soundto(MSG_ONE, self, CH_TRIGGER, snd, VOL_BASE * self.volume, self.atten);
}
void target_speaker_use_on()
{
ambientsound (self.origin, self.noise, VOL_BASE * self.volume, self.atten);
remove(self);
}
-};
+}
void spawnfunc_func_stardust() {
WriteShort(MSG_ENTITY, self.count);
WriteByte(MSG_ENTITY, self.cnt);
return 1;
-};
+}
/*QUAKED spawnfunc_func_rain (0 .5 .8) ?
This is an invisible area like a trigger, which rain falls inside of.
self.Version = 1;
Net_LinkEntity(self, FALSE, 0, rainsnow_SendEntity);
-};
+}
/*QUAKED spawnfunc_func_snow (0 .5 .8) ?
self.Version = 1;
Net_LinkEntity(self, FALSE, 0, rainsnow_SendEntity);
-};
+}
void FireRailgunBullet (vector start, vector end, float bdamage, float bforce, float mindist, float maxdist, float halflifedist, float forcehalflifedist, float deathtype);
self.state = 0;
self.use = multivibrator_toggle;
self.think = multivibrator_send;
- self.nextthink = time;
+ self.nextthink = max(1, time);
IFTARGETED
multivibrator_reset();
localcmd("endmatch\n");
else
localcmd(strcat("changelevel ", self.chmap, "\n"));
-};
+}
void spawnfunc_target_changelevel()
{
self.use = spawnfunc_target_changelevel_use;
-};
+}