public static void SP_target_spawner(edict_t self) { self.use = GameTarget.use_target_spawner; self.svflags = Defines.SVF_NOCLIENT; if (self.speed != 0) { GameBase.G_SetMovedir(self.s.angles, self.movedir); Math3D.VectorScale(self.movedir, self.speed, self.movedir); } }
public static void InitTrigger(edict_t self) { if (!Math3D.VectorEquals(self.s.angles, Globals.vec3_origin)) { GameBase.G_SetMovedir(self.s.angles, self.movedir); } self.solid = Defines.SOLID_TRIGGER; self.movetype = Defines.MOVETYPE_NONE; GameBase.gi.setmodel(self, self.model); self.svflags = Defines.SVF_NOCLIENT; }
public static void SP_target_splash(edict_t self) { self.use = GameTarget.use_target_splash; GameBase.G_SetMovedir(self.s.angles, self.movedir); if (0 == self.count) { self.count = 32; } self.svflags = Defines.SVF_NOCLIENT; }
public static void SP_target_blaster(edict_t self) { self.use = GameTarget.use_target_blaster; GameBase.G_SetMovedir(self.s.angles, self.movedir); self.noise_index = GameBase.gi.soundindex("weapons/laser2.wav"); if (0 == self.dmg) { self.dmg = 15; } if (0 == self.speed) { self.speed = 1000; } self.svflags = Defines.SVF_NOCLIENT; }
public static void SP_trigger_multiple(edict_t ent) { if (ent.sounds == 1) { ent.noise_index = GameBase.gi.soundindex("misc/secret.wav"); } else if (ent.sounds == 2) { ent.noise_index = GameBase.gi.soundindex("misc/talk.wav"); } else if (ent.sounds == 3) { ent.noise_index = GameBase.gi.soundindex("misc/trigger1.wav"); } if (ent.wait == 0) { ent.wait = 0.2f; } ent.touch = GameTrigger.Touch_Multi; ent.movetype = Defines.MOVETYPE_NONE; ent.svflags |= Defines.SVF_NOCLIENT; if ((ent.spawnflags & 4) != 0) { ent.solid = Defines.SOLID_NOT; ent.use = GameTrigger.trigger_enable; } else { ent.solid = Defines.SOLID_TRIGGER; ent.use = GameTrigger.Use_Multi; } if (!Math3D.VectorEquals(ent.s.angles, Globals.vec3_origin)) { GameBase.G_SetMovedir(ent.s.angles, ent.movedir); } GameBase.gi.setmodel(ent, ent.model); GameBase.gi.linkentity(ent); }