thirtyflightsofloving/missionpack/g_utils_q1.c
Knightmare66 40571031c3 Fixed EMP Nuke not working on beta class Gladiator in missionpack DLL.
Added function monster_fire_phalanx() in g_monster.c in missionpack DLL.
Renamed monster_dabeam() function to monster_fire_dabeam() in g_monster.c in missionpack DLL.
Renamed "plasma" functions for phalanx cannon to "phalanx_plasma" in g_weapon.c in missionpack DLL.
Removed unused heat_think() function in g_weapon.c in missionpack DLL.
Removed unused Q1TeleportSounds2() function in g_utils_q1.c in missionpack DLL.
2021-03-15 17:30:02 -04:00

30 lines
889 B
C

// g_utils_q1.c
#include "g_local.h"
float PointDist (vec3_t x, vec3_t y)
{
vec3_t len;
float dist;
VectorSubtract (x, y, len);
dist = VectorLength(len);
return dist;
}
void Q1TeleportSounds (edict_t *ent)
{
float sound = random();
if (sound < 0.2)
gi.sound (ent, CHAN_NO_PHS_ADD+CHAN_VOICE, gi.soundindex("q1world/teleport/r_tele1.wav"), 1, ATTN_NORM, 0);
else if (sound < 0.4)
gi.sound (ent, CHAN_NO_PHS_ADD+CHAN_VOICE, gi.soundindex("q1world/teleport/r_tele2.wav"), 1, ATTN_NORM, 0);
else if (sound < 0.6)
gi.sound (ent, CHAN_NO_PHS_ADD+CHAN_VOICE, gi.soundindex("q1world/teleport/r_tele3.wav"), 1, ATTN_NORM, 0);
else if (sound < 0.8)
gi.sound (ent, CHAN_NO_PHS_ADD+CHAN_VOICE, gi.soundindex("q1world/teleport/r_tele4.wav"), 1, ATTN_NORM, 0);
else
gi.sound (ent, CHAN_NO_PHS_ADD+CHAN_VOICE, gi.soundindex("q1world/teleport/r_tele5.wav"), 1, ATTN_NORM, 0);
}