]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'master' into z411/bai-server
authorz411 <z411@omaera.org>
Sun, 1 Jan 2023 00:38:48 +0000 (21:38 -0300)
committerz411 <z411@omaera.org>
Sun, 1 Jan 2023 00:38:48 +0000 (21:38 -0300)
19 files changed:
1  2 
gamemodes-server.cfg
qcsrc/client/main.qc
qcsrc/client/main.qh
qcsrc/client/view.qc
qcsrc/common/gamemodes/gamemode/ctf/sv_ctf.qc
qcsrc/common/gamemodes/gamemode/ctf/sv_ctf.qh
qcsrc/common/monsters/sv_monsters.qc
qcsrc/common/notifications/all.inc
qcsrc/common/notifications/all.qc
qcsrc/common/util.qc
qcsrc/common/weapons/weapon/electro.qc
qcsrc/common/weapons/weapon/mortar.qc
qcsrc/common/weapons/weapon/shotgun.qc
qcsrc/common/weapons/weapon/vortex.qh
qcsrc/server/command/vote.qc
qcsrc/server/items/items.qc
qcsrc/server/weapons/common.qc
qcsrc/server/world.qc
qcsrc/server/world.qh

Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index 393ac65e25e132da7d7c598a96e83ca9eaf1ddae,9a7845a16dcc4f3e32f7a2684f1466acbe37c6f5..d2a37fa69f48329402e4499d68be754036353890
  #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)
index ec6a10876ba3aae7fc22ec20e84f40ca4d86eed5,58910887e914a87c70393d5e0e043d6403495acb..ba6b88e4b2e75ea2a176d2277eaa6b423a3a5c2c
@@@ -1244,15 -1192,18 +1244,18 @@@ void Local_Notification_Queue_Run(MSG n
        }
  }
  
 -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];
        }
  }
  
@@@ -1360,12 -1303,7 +1357,7 @@@ void Local_Notification(MSG net_type, N
                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
Simple merge
index 7a9536fb3257e8cad1dfd9a6c8059cd54d764749,97929c7dd3736ba0cf68514562ae32fc995954e0..34ec4e064f57142d2b48e1d9cc13d6c32ed76a38
@@@ -81,14 -81,12 +81,14 @@@ void W_Electro_Explode(entity this, ent
                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?
        {
Simple merge
index 66151b4c05a5cb640be9a67d8232ca0efda9444b,2d80a7a61ae89b1266299984f8a783605d9426ab..b19708ae1d2028ff389cf544480262a381625839
@@@ -18,7 -18,8 +18,8 @@@ CLASS(Vortex, Weapon
  /* 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) \
Simple merge
Simple merge
Simple merge
Simple merge
index 6ec6ccccc24191c385de96cbf59e1f90621743ac,271f394adaa91c84f801a48db1856032781ca485..06e454bc9c72feee11c569edf0067ddf0f95377d
@@@ -28,15 -28,8 +28,16 @@@ float autocvar_timelimit_overtime
  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;