public static void SP_trigger_multiple(Entity ent) { if (ent.sounds == 1) ent.noise_index = ServerInit.SV_SoundIndex("misc/secret.wav"); else if (ent.sounds == 2) ent.noise_index = ServerInit.SV_SoundIndex("misc/talk.wav"); else if (ent.sounds == 3) ent.noise_index = ServerInit.SV_SoundIndex("misc/trigger1.wav"); if (ent.wait == 0) ent.wait = 0.2f; ent.touch = Touch_Multi; ent.movetype = Constants.MOVETYPE_NONE; ent.svflags |= Constants.SVF_NOCLIENT; if ((ent.spawnflags & 4) != 0) { ent.solid = Constants.SOLID_NOT; ent.use = trigger_enable; } else { ent.solid = Constants.SOLID_TRIGGER; ent.use = Use_Multi; } if (!Math3D.VectorEquals(ent.s.angles, Globals.vec3_origin)) GameBase.G_SetMovedir(ent.s.angles, ent.movedir); ServerGame.PF_setmodel(ent, ent.model); World.SV_LinkEdict(ent); }
public static void SP_trigger_hurt(Entity self) { InitTrigger(self); self.noise_index = ServerInit.SV_SoundIndex("world/electro.wav"); self.touch = hurt_touch; if (0 == self.dmg) self.dmg = 5; if ((self.spawnflags & 1) != 0) self.solid = Constants.SOLID_NOT; else self.solid = Constants.SOLID_TRIGGER; if ((self.spawnflags & 2) != 0) self.use = hurt_use; World.SV_LinkEdict(self); }