]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge remote-tracking branch 'origin/master' into samual/notification_rewrite
authorSamual Lenks <samual@xonotic.org>
Sun, 10 Feb 2013 00:49:22 +0000 (19:49 -0500)
committerSamual Lenks <samual@xonotic.org>
Sun, 10 Feb 2013 00:49:22 +0000 (19:49 -0500)
Conflicts:
qcsrc/common/util.qc
qcsrc/common/util.qh

13 files changed:
1  2 
defaultXonotic.cfg
qcsrc/client/autocvars.qh
qcsrc/client/csqcmodel_hooks.qc
qcsrc/client/progs.src
qcsrc/common/util.qc
qcsrc/common/util.qh
qcsrc/server/autocvars.qh
qcsrc/server/cl_client.qc
qcsrc/server/cl_player.qc
qcsrc/server/defs.qh
qcsrc/server/progs.src
qcsrc/server/w_electro.qc
qcsrc/server/w_shotgun.qc

Simple merge
Simple merge
Simple merge
Simple merge
index dc882194e1463e12e0be9d84877d0be91ad9147c,404bd7e5a486012deec784cb14be934f0c5cd85c..e781a4dcbebbef25a54035aefa85893ec8996831
@@@ -2480,75 -2480,31 +2480,104 @@@ void FindConnectedComponent(entity e, .
                queue_start.FindConnectedComponent_processing = 0;
  }
  
 +float Count_Proper_Strings(string improper, string...count)
 +{
 +      float i, total = 0;
 +      string tmp;
 +      
 +      for(i = 0; i < count; ++i)
 +      {
 +              tmp = ...(i, string);
 +              if((tmp) && (tmp != improper)) { ++total; }
 +      }
 +      
 +      return total;
 +}
 +
 +float Count_Proper_Floats(float improper, float...count)
 +{
 +      float i, total = 0;
 +      
 +      for(i = 0; i < count; ++i)
 +      {
 +              if(...(i, float) != improper) { ++total; }
 +      }
 +      
 +      return total;
 +}
 +
 +// todo: this sucks, lets find a better way to do backtraces?
 +#ifndef MENUQC
 +void backtrace(string msg)
 +{
 +      float dev, war;
 +      #ifdef SVQC
 +      dev = autocvar_developer;
 +      war = autocvar_prvm_backtraceforwarnings;
 +      #else
 +      dev = cvar("developer");
 +      war = cvar("prvm_backtraceforwarnings");
 +      #endif
 +      cvar_set("developer", "1");
 +      cvar_set("prvm_backtraceforwarnings", "1");
 +      print("\n");
 +      print("--- CUT HERE ---\nWARNING: ");
 +      print(msg);
 +      print("\n");
 +      remove(world); // isn't there any better way to cause a backtrace?
 +      print("\n--- CUT UNTIL HERE ---\n");
 +      cvar_set("developer", ftos(dev));
 +      cvar_set("prvm_backtraceforwarnings", ftos(war));
 +}
 +#endif
 +
 +// color code replace, place inside of sprintf and parse the string
 +string CCR(string input)
 +{
 +      // See the autocvar declarations in util.qh for default values
 +      
 +      // foreground/normal colors
 +      input = strreplace("^F1", strcat("^", autocvar_hud_colorset_foreground_1), input); 
 +      input = strreplace("^F2", strcat("^", autocvar_hud_colorset_foreground_2), input); 
 +      input = strreplace("^F3", strcat("^", autocvar_hud_colorset_foreground_3), input); 
 +      input = strreplace("^F4", strcat("^", autocvar_hud_colorset_foreground_4), input); 
 +
 +      // "kill" colors
 +      input = strreplace("^K1", strcat("^", autocvar_hud_colorset_kill_1), input);
 +      input = strreplace("^K2", strcat("^", autocvar_hud_colorset_kill_2), input);
 +      input = strreplace("^K3", strcat("^", autocvar_hud_colorset_kill_3), input);
 +
 +      // background colors
 +      input = strreplace("^BG", strcat("^", autocvar_hud_colorset_background), input);
 +      input = strreplace("^N", "^7", input); // "none"-- reset to white...
 +      return input;
 +}
++
+ vector vec3(float x, float y, float z)
+ {
+       vector v;
+       v_x = x;
+       v_y = y;
+       v_z = z;
+       return v;
+ }
+ #ifndef MENUQC
+ vector animfixfps(entity e, vector a, vector b)
+ {
+       // multi-frame anim: keep as-is
+       if(a_y == 1)
+       {
+               float dur;
+               dur = frameduration(e.modelindex, a_x);
+               if(dur <= 0 && b_y)
+               {
+                       a = b;
+                       dur = frameduration(e.modelindex, a_x);
+               }
+               if(dur > 0)
+                       a_z = 1.0 / dur;
+       }
+       return a;
+ }
+ #endif
index 2c9ed82b25ca4190d0e46b2836be4ab54bff2e84,4e553e4ba5d1611fc73fa83289c45b0d0de27b57..f5fa6eaabfe417f27a9c10bb546a463e6255b2c4
@@@ -373,41 -365,8 +373,47 @@@ typedef entity(entity cur, entity near
  typedef float(entity a, entity b, entity pass) isConnectedFunction_t;
  void FindConnectedComponent(entity e, .entity fld, findNextEntityNearFunction_t nxt, isConnectedFunction_t iscon, entity pass);
  
 +// expand multiple arguments into one argument by stripping parenthesis
 +#define XPD(...) __VA_ARGS__
 +
 +float Count_Proper_Strings(string improper, string...count);
 +float Count_Proper_Floats(float improper, float...count);
 +
 +#ifndef MENUQC
 +void backtrace(string msg);
 +#endif
 +
 +// color code replace, place inside of sprintf and parse the string... defaults described as constants
 +// foreground/normal colors
 +var string autocvar_hud_colorset_foreground_1 = "2"; // F1 - Green  // primary priority (important names, etc)
 +var string autocvar_hud_colorset_foreground_2 = "3"; // F2 - Yellow // secondary priority (items, locations, numbers, etc)
 +var string autocvar_hud_colorset_foreground_3 = "4"; // F3 - Blue   // tertiary priority or relatively inconsequential text
 +var string autocvar_hud_colorset_foreground_4 = "1"; // F4 - Red    // notice/attention grabbing texting
 +// "kill" colors
 +var string autocvar_hud_colorset_kill_1 = "1"; // K1 - Red    // "bad" or "dangerous" text (death messages against you, kill notifications, etc)
 +var string autocvar_hud_colorset_kill_2 = "3"; // K2 - Yellow // similar to above, but less important... OR, a highlight out of above message type
 +var string autocvar_hud_colorset_kill_3 = "4"; // K3 - Blue   // "good" or "beneficial" text (you fragging someone, etc)
 +// background color
 +var string autocvar_hud_colorset_background = "7"; // BG - White // neutral/unimportant text
 +
 +string CCR(string input);
 +
 +#ifndef MENUQC
 +#ifdef CSQC
 +#define GENTLE (autocvar_cl_gentle || autocvar_cl_gentle_messages)
 +#else
 +#define GENTLE autocvar_sv_gentle
 +#endif
 +#define normal_or_gentle(normal,gentle) (GENTLE ? ((gentle != "") ? gentle : normal) : normal)
 +#endif
 +
 +// allow writing to also pass through to spectators (like so spectators see the same centerprints as players for example)
 +#define WRITESPECTATABLE_MSG_ONE_VARNAME(varname,statement) entity varname; varname = msg_entity; FOR_EACH_REALCLIENT(msg_entity) if(msg_entity == varname || (msg_entity.classname == STR_SPECTATOR && msg_entity.enemy == varname)) statement msg_entity = varname
 +#define WRITESPECTATABLE_MSG_ONE(statement) WRITESPECTATABLE_MSG_ONE_VARNAME(oldmsg_entity, statement)
 +#define WRITESPECTATABLE(msg,statement) if(msg == MSG_ONE) { WRITESPECTATABLE_MSG_ONE(statement); } else statement float WRITESPECTATABLE_workaround = 0
++
+ vector vec3(float x, float y, float z);
+ #ifndef MENUQC
+ vector animfixfps(entity e, vector a, vector b);
+ #endif
Simple merge
Simple merge
index 165783781069d9457f367bde54e69ae0ba21f616,03347a9c86d2cb718abae96a77c1eb855feb38a6..10ca2ccab33c23c9586f505af261300474b5fd41
@@@ -1256,10 -1167,10 +1168,10 @@@ void FakeGlobalSound(string sample, flo
                case VOICETYPE_TAUNT:
                        if(self.classname == "player")
                                if(self.deadflag == DEAD_NO)
-                                       setanim(self, self.anim_taunt, FALSE, TRUE, TRUE);
+                                       animdecide_setaction(self, ANIMACTION_TAUNT, TRUE);
                        if(!sv_taunt)
                                break;
 -                      if(sv_gentle)
 +                      if(autocvar_sv_gentle)
                                break;
                        msg_entity = self;
                        if (msg_entity.cvar_cl_voice_directional >= 1)
@@@ -1353,10 -1264,10 +1265,10 @@@ void GlobalSound(string sample, float c
                case VOICETYPE_TAUNT:
                        if(self.classname == "player")
                                if(self.deadflag == DEAD_NO)
-                                       setanim(self, self.anim_taunt, FALSE, TRUE, TRUE);
+                                       animdecide_setaction(self, ANIMACTION_TAUNT, TRUE);
                        if(!sv_taunt)
                                break;
 -                      if(sv_gentle)
 +                      if(autocvar_sv_gentle)
                                break;
                        FOR_EACH_REALCLIENT(msg_entity)
                        {
Simple merge
index 71f088ba5aef0c7538300f2e10c2b096af5405d6,db93116109612dd97660f35306509908f43df41c..dcd144d31634b3474985f63f917c564dd02e41dd
@@@ -235,7 -233,7 +236,8 @@@ mutators/mutator_superspec.q
  ../warpzonelib/util_server.qc
  ../warpzonelib/server.qc
  
+ ../common/animdecide.qc
  ../common/util.qc
 +../common/notifications.qc
  
  ../common/if-this-file-errors-scroll-up-and-fix-the-warnings.fteqccfail
Simple merge
Simple merge