]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'master' into bones_was_here/q3compat
authorbones_was_here <bones_was_here@xa.org.au>
Wed, 23 Sep 2020 11:48:29 +0000 (21:48 +1000)
committerbones_was_here <bones_was_here@xa.org.au>
Wed, 23 Sep 2020 11:48:29 +0000 (21:48 +1000)
1  2 
qcsrc/common/physics/player.qc
qcsrc/common/weapons/all.qc
qcsrc/common/weapons/weapon/shotgun.qc
qcsrc/lib/spawnfunc.qh
qcsrc/server/autocvars.qh
qcsrc/server/client.qc
qcsrc/server/main.qc
qcsrc/server/miscfunctions.qc
qcsrc/server/race.qc
qcsrc/server/world.qc

Simple merge
Simple merge
index bed384ec69697b1bbf6f0df42b84fc2db2f94f9d,321610ad3e30b225615283625993ebf959eb621a..3f0f42c6c42bedfe3f2d551bbf216b93b9fc9447
@@@ -6,9 -6,9 +6,11 @@@
  /** If this global exists, only functions with spawnfunc_ name prefix qualify as spawn functions */
  noref bool require_spawnfunc_prefix;
  .bool spawnfunc_checked;
+ /** Not for production use, provides access to a dump of the entity's fields when it is parsed from map data */
+ //noref string __fullspawndata;
  
 +.string fullspawndata;
 +
  // Optional type checking; increases compile time too much to be enabled by default
  #if 0
        bool entityfieldassignablefromeditor(int i)
index 16a8b91aa4bb218eae56c3a40f9ab40e06494747,83ea702ae729f91ca1465aa2ad5254510bb3ef8b..28d08befe600655e24b7983b580f58db954e8344
@@@ -532,4 -533,23 +532,23 @@@ bool autocvar_sv_showspectators
  bool autocvar_g_weaponswitch_debug;
  bool autocvar_g_weaponswitch_debug_alternate;
  bool autocvar_g_allow_checkpoints;
 -bool autocvar_sv_q3defragcompat_changehitbox = false;
 +bool autocvar_sv_q3compat_changehitbox;
+ int autocvar_sv_clones;
+ bool autocvar_g_footsteps;
+ float autocvar_sv_maxidle;
+ bool autocvar_sv_maxidle_spectatorsareidle;
+ int autocvar_sv_maxidle_slots;
+ bool autocvar_sv_maxidle_slots_countbots;
+ bool autocvar_sv_autotaunt;
+ bool autocvar_g_warmup_allguns;
+ bool autocvar_g_warmup_allow_timeout;
+ float autocvar_g_weaponspreadfactor;
+ float autocvar_g_weaponforcefactor;
+ float autocvar_g_weapondamagefactor;
+ float autocvar_g_weaponratefactor;
+ float autocvar_g_weaponspeedfactor;
+ float autocvar_sv_foginterval;
+ bool autocvar_sv_ready_restart_repeatable;
+ bool autocvar_g_jetpack;
+ bool autocvar_sv_taunt;
+ bool autocvar_sv_ready_restart;
Simple merge
Simple merge
index c74637c07e6b5f886f5fa8dd3b7af8fbc16ee9cc,b748c17a00ccd96fd25ac4efc93f2ee242d7e1a0..7da78ca0212baa6274886ec256f69b53ec00a8b6
@@@ -1421,84 -1329,3 +1329,59 @@@ float LostMovetypeFollow(entity ent
        }
        return 0;
  }
- .bool pushable;
- bool isPushable(entity e)
- {
-       if(e.pushable)
-               return true;
-       if(IS_VEHICLE(e))
-               return false;
-       if(e.iscreature)
-               return true;
-       if (Item_IsLoot(e))
-       {
-               return true;
-       }
-       switch(e.classname)
-       {
-               case "body":
-                       return true;
-               case "bullet": // antilagged bullets can't hit this either
-                       return false;
-       }
-       if (e.projectiledeathtype)
-               return true;
-       return false;
- }
 +
 +string GetField_fullspawndata(entity e, string f, ...)
 +/* Retrieves the value of a map entity field from fullspawndata
 + * This bypasses field value changes made by the engine,
 + * eg string-to-float and escape sequence substitution.
 + *
 + * Avoids the need to declare fields just to read them once :)
 + *
 + * Returns the last instance of the field to match DarkPlaces behaviour.
 + * Path support: converts \ to / and tests the file if a third (bool, true) arg is passed.
 + * Returns string_null if the entity does not have the field, or the file is not in the VFS.
 + *
 + * FIXME: entities with //comments are not supported.
 + */
 +{
 +      string v = string_null;
 +
 +      if (!e.fullspawndata)
 +      {
 +              LOG_WARNF("^1EDICT %s (classname %s) has no fullspawndata, engine lacks support?", ftos(num_for_edict(e)), e.classname);
 +              return v;
 +      }
 +
 +      if (strstrofs(e.fullspawndata, "//", 0) >= 0)
 +      {
 +              // tokenize and tokenize_console return early if "//" is reached,
 +              // which can leave an odd number of tokens and break key:value pairing.
 +              LOG_WARNF("^1EDICT %s fullspawndata contains unsupported //comment^7%s", ftos(num_for_edict(e)), e.fullspawndata);
 +              return v;
 +      }
 +
 +      //print(sprintf("%s(EDICT %s, FIELD %s)\n", __FUNC__, ftos(num_for_edict(e)), f));
 +      //print(strcat("FULLSPAWNDATA:", e.fullspawndata, "\n"));
 +
 +      // tokenize treats \ as an escape, but tokenize_console returns the required literal
 +      for (int t = tokenize_console(e.fullspawndata) - 3; t > 0; t -= 2)
 +      {
 +              //print(sprintf("\tTOKEN %s:%s\t%s:%s\n", ftos(t), ftos(t + 1), argv(t), argv(t + 1)));
 +              if (argv(t) == f)
 +              {
 +                      v = argv(t + 1);
 +                      break;
 +              }
 +      }
 +
 +      //print(strcat("RESULT: ", v, "\n\n"));
 +
 +      if (v && ...(0, bool) == true)
 +      {
 +              v = strreplace("\\", "/", v);
 +              if (whichpack(v) == "")
 +                      return string_null;
 +      }
 +
 +      return v;
 +}
Simple merge
Simple merge