#define N___NEVER 0
#define N_GNTLOFF 1
#define N__ALWAYS 2
+#define ANNCE_DEFTIME 2
-#define MULTITEAM_ANNCE(prefix, defaultvalue, sound, channel, volume, position) \
+ // default time for announcer queue (time to wait before the next announcer is played)
+ // -1 = bypass queue and play the announcer immediately
+ // 0 = use the announcer sound length
+ // >0 = use the specified time in seconds
+ #define ANNCE_INSTANT -1
+ #define ANNCE_LENGTH 0
+ #define ANNCE_DEFTIME 2
+
+#define MULTITEAM_ANNCE(prefix, defaultvalue, sound, channel, volume, position, queuetime) \
NOTIF_ADD_AUTOCVAR(ANNCE_##prefix, defaultvalue) \
- MSG_ANNCE_NOTIF_TEAM(NUM_TEAM_1, prefix##_RED, prefix, defaultvalue, sprintf(sound, strtolower(STATIC_NAME_TEAM_1)), channel, volume, position) \
- MSG_ANNCE_NOTIF_TEAM(NUM_TEAM_2, prefix##_BLUE, prefix, defaultvalue, sprintf(sound, strtolower(STATIC_NAME_TEAM_2)), channel, volume, position) \
- MSG_ANNCE_NOTIF_TEAM(NUM_TEAM_3, prefix##_YELLOW, prefix, defaultvalue, sprintf(sound, strtolower(STATIC_NAME_TEAM_3)), channel, volume, position) \
- MSG_ANNCE_NOTIF_TEAM(NUM_TEAM_4, prefix##_PINK, prefix, defaultvalue, sprintf(sound, strtolower(STATIC_NAME_TEAM_4)), channel, volume, position)
+ MSG_ANNCE_NOTIF_TEAM(NUM_TEAM_1, prefix##_RED, prefix, defaultvalue, sprintf(sound, strtolower(STATIC_NAME_TEAM_1)), channel, volume, position, queuetime) \
+ MSG_ANNCE_NOTIF_TEAM(NUM_TEAM_2, prefix##_BLUE, prefix, defaultvalue, sprintf(sound, strtolower(STATIC_NAME_TEAM_2)), channel, volume, position, queuetime) \
+ MSG_ANNCE_NOTIF_TEAM(NUM_TEAM_3, prefix##_YELLOW, prefix, defaultvalue, sprintf(sound, strtolower(STATIC_NAME_TEAM_3)), channel, volume, position, queuetime) \
+ MSG_ANNCE_NOTIF_TEAM(NUM_TEAM_4, prefix##_PINK, prefix, defaultvalue, sprintf(sound, strtolower(STATIC_NAME_TEAM_4)), channel, volume, position, queuetime)
// MSG_ANNCE_NOTIFICATIONS
MSG_ANNCE_NOTIF(ACHIEVEMENT_AIRSHOT, N_GNTLOFF, "airshot", CH_INFO, VOL_BASEVOICE, ATTEN_NONE, ANNCE_DEFTIME)
}
}
-void Local_Notification_Queue_Add(MSG net_type, entity notif, float queue_time)
+void Local_Notification_Queue_Add(MSG net_type, entity notif, float queue_time, float f1)
{
- //LOG_INFOF("Comparison %d > %d", time, notif_queue_next_time);
+ // Guess length if required
+ if(queue_time == 0)
+ queue_time = soundlength(AnnouncerFilename(notif.nent_snd));
+
if(queue_time == -1 || time > notif_queue_next_time) {
- //LOG_INFOF("Running NOW!");
+ // Run immediately
- Local_Notification_Queue_Run(net_type, notif);
+ Local_Notification_Queue_Run(net_type, notif, f1);
notif_queue_next_time = time + queue_time;
} else {
- //LOG_INFOF("Queueing: %d %d", notif_queue_length, notif_queue_next_time);
+ // Put in queue
if(notif_queue_length >= NOTIF_QUEUE_MAX) return;
notif_queue_type[notif_queue_length] = net_type;
void Local_Notification_Queue_Process()
{
- if(!notif_queue_length)
+ if(!notif_queue_length || notif_queue_time[0] > time)
return;
- int j;
-
- if(notif_queue_time[0] <= time) {
- //LOG_INFOF("Process running: %d <= %d", notif_queue_time[0], time);
- Local_Notification_Queue_Run(notif_queue_type[0], notif_queue_entity[0], notif_queue_f1[0]);
-
- // Shift queue to the left
- for (j = 0; j < notif_queue_length - 1; j++) {
- notif_queue_type[j] = notif_queue_type[j+1];
- notif_queue_entity[j] = notif_queue_entity[j+1];
- notif_queue_time[j] = notif_queue_time[j+1];
- notif_queue_f1[j] = notif_queue_f1[j+1];
- }
-
- --notif_queue_length;
- Local_Notification_Queue_Run(notif_queue_type[0], notif_queue_entity[0]);
++ Local_Notification_Queue_Run(notif_queue_type[0], notif_queue_entity[0], notif_queue_f1[0]);
+
+ // Shift queue to the left
+ --notif_queue_length;
+ for (int j = 0; j < notif_queue_length; j++) {
+ notif_queue_type[j] = notif_queue_type[j+1];
+ notif_queue_entity[j] = notif_queue_entity[j+1];
+ notif_queue_time[j] = notif_queue_time[j+1];
++ notif_queue_f1[j] = notif_queue_f1[j+1];
}
}
case MSG_ANNCE:
{
#ifdef CSQC
- //Local_Notification_sound(notif.nent_channel, notif.nent_snd, notif.nent_vol, notif.nent_position);
- Local_Notification_Queue_Add(
- net_type,
- notif,
- notif.nent_queuetime,
- f1);
- Local_Notification_Queue_Add(net_type, notif, notif.nent_queuetime);
++ Local_Notification_Queue_Add(net_type, notif, notif.nent_queuetime, f1);
#else
backtrace("MSG_ANNCE on server?... Please notify Samual immediately!\n");
#endif
if(IS_PLAYER(directhitentity))
if(DIFF_TEAM(this.realowner, directhitentity))
if(!IS_DEAD(directhitentity))
- if(IsFlying(directhitentity))
- Send_Notification(NOTIF_ONE, this.realowner, MSG_ANNCE, ANNCE_ACHIEVEMENT_ELECTROBITCH);
-
+ if(IsFlying(directhitentity)) {
+ Give_Medal(this.realowner, ELECTROBITCH);
+ }
+ */
+
this.event_damage = func_null;
this.takedamage = DAMAGE_NO;
- this.velocity = this.movedir; // particle fx and decals need .velocity
+ this.velocity = this.movedir; // .velocity must be != '0 0 0' for particle fx and decal to work
if(this.move_movetype == MOVETYPE_BOUNCE || this.classname == "electro_orb") // TODO: classname is more reliable anyway?
{
/* reticle */ ATTRIB(Vortex, w_reticle, string, "gfx/reticle_nex");
/* wepimg */ ATTRIB(Vortex, model2, string, "weaponnex");
/* refname */ ATTRIB(Vortex, netname, string, "vortex");
-/* wepname */ ATTRIB(Vortex, m_name, string, _("Vortex"));
+/* wepname */ ATTRIB(Vortex, m_name, string, _("Nex"));
+ /* legacy */ ATTRIB(Vortex, m_deprecated_netname, string, "nex");
#define X(BEGIN, P, END, class, prefix) \
BEGIN(class) \
int autocvar_timelimit_overtimes;
float autocvar_timelimit_suddendeath;
bool autocvar_sv_gameplayfix_droptofloorstartsolid;
+ bool autocvar_sv_gameplayfix_droptofloorstartsolid_nudgetocorrect;
+// z411
+bool autocvar_sv_jingle_end;
+string autocvar_sv_jingle_end_list;
+float autocvar_sv_jingle_end_volume;
+
+float fragsleft;
+int fragsleft_last;
+
float checkrules_equality;
float checkrules_suddendeathwarning;
float checkrules_suddendeathend;