]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'terencehill/bot_ai' into 'master'
authorterencehill <piuntn@gmail.com>
Sat, 8 Dec 2018 12:12:33 +0000 (13:12 +0100)
committerterencehill <piuntn@gmail.com>
Sat, 8 Dec 2018 12:14:37 +0000 (13:14 +0100)
.gitlab-ci.yml
.tx/merge-base
common.tr.po
common.zh_CN.po
qcsrc/client/view.qc
qcsrc/common/mapobjects/teleporters.qh
qcsrc/lib/yenc.qh
qcsrc/menu/xonotic/serverlist.qc
qcsrc/server/cheats.qc
qcsrc/server/client.qc
qcsrc/server/weapons/tracing.qc

index dae7bdce691869d0aad0fefacf31091f06bc1837..e773eb6f58e48d9f4adf909e065b4fe8d8ba2878 100644 (file)
@@ -29,7 +29,7 @@ test_sv_game:
     - wget -O data/maps/stormkeep.waypoints https://gitlab.com/xonotic/xonotic-maps.pk3dir/raw/master/maps/stormkeep.waypoints
     - wget -O data/maps/stormkeep.waypoints.cache https://gitlab.com/xonotic/xonotic-maps.pk3dir/raw/master/maps/stormkeep.waypoints.cache
     - make
-    - EXPECT=fed9f3b94a544058593aaa8addaa9402
+    - EXPECT=b27bbbd74c91ea66195d61982fd471ce
     - HASH=$(${ENGINE} -noconfig -nohome +exec serverbench.cfg
       | tee /dev/stderr
       | grep '^:'
index 514e41c68f080ff942725bcd6274ca65a7ae5dc8..64801e8544f67a40360a6775dc18130a6a626921 100644 (file)
@@ -1 +1 @@
-Sun Nov 11 07:24:12 CET 2018
+Tue Nov 27 07:24:07 CET 2018
index a62e1559a83c19d3e96e8b411601fc1fd86199eb..854b206d2f0fe082dfb058f25724a8bff53e2379 100644 (file)
@@ -10,7 +10,7 @@ msgstr ""
 "Project-Id-Version: Xonotic\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2017-07-09 00:35+0200\n"
-"PO-Revision-Date: 2018-11-08 17:13+0000\n"
+"PO-Revision-Date: 2018-11-26 14:15+0000\n"
 "Last-Translator: Demiray Muhterem <mdemiray@msn.com>\n"
 "Language-Team: Turkish (http://www.transifex.com/team-xonotic/xonotic/"
 "language/tr/)\n"
@@ -881,7 +881,7 @@ msgstr ""
 #: qcsrc/menu/xonotic/dialog_multiplayer_join_serverinfo.qc:203
 #: qcsrc/menu/xonotic/dialog_multiplayer_join_serverinfo.qc:208
 msgid "N/A"
-msgstr ""
+msgstr "N/A"
 
 #: qcsrc/client/hud/panel/scoreboard.qc:1156
 #, c-format
@@ -3307,31 +3307,31 @@ msgstr ""
 #: qcsrc/common/notifications/all.inc:590
 #, c-format
 msgid "^K3%sYou fragged ^BG%s"
-msgstr ""
+msgstr "^K3%sParçalandın ^BG%s"
 
 #: qcsrc/common/notifications/all.inc:591
 #: qcsrc/common/notifications/all.inc:600
 #: qcsrc/common/notifications/all.inc:609
 #, c-format
 msgid "^K3%sYou scored against ^BG%s"
-msgstr ""
+msgstr "^K3%sPuan yaptın ^BG%s"
 
 #: qcsrc/common/notifications/all.inc:592
 #, c-format
 msgid "^K1%sYou were fragged by ^BG%s"
-msgstr ""
+msgstr "^K1%sŞunun tarafından parçalandın ^BG%s"
 
 #: qcsrc/common/notifications/all.inc:593
 #: qcsrc/common/notifications/all.inc:602
 #: qcsrc/common/notifications/all.inc:611
 #, c-format
 msgid "^K1%sYou were scored against by ^BG%s"
-msgstr ""
+msgstr "^K1%sŞundan puan kaybettin ^BG%s"
 
 #: qcsrc/common/notifications/all.inc:599
 #, c-format
 msgid "^K3%sYou burned ^BG%s"
-msgstr ""
+msgstr "^K3%sYandın ^BG%s"
 
 #: qcsrc/common/notifications/all.inc:601
 #, c-format
index 669d4a45c58103f08a0aec4b745b93486e08c8dc..1a5ec83bc2d7cc7b7c8965e67d074b1d9e62296d 100644 (file)
@@ -9,7 +9,8 @@
 # kalawore <kalawore@outlook.com>, 2015
 # Losier Blackheath <losier.cc@gmail.com>, 2018
 # sapphireliu <balancedliu@gmail.com>, 2014
-# 茂森 杜 <dumaosen_main01@outlook.com>, 2018
+# 杜茂森 <dumaosen_main01@outlook.com>, 2018
+# 杜茂森 <dumaosen_main01@outlook.com>, 2018
 msgid ""
 msgstr ""
 "Project-Id-Version: Xonotic\n"
index ffab46236384284aa70f7b3e7538664401155bec..5172731ffb32017af4246591362dc5ec10b9a517 100644 (file)
@@ -1357,20 +1357,21 @@ void HUD_Crosshair(entity this)
 
 #define CROSSHAIR_DO_BLUR(M,sz,wcross_name,wcross_alpha) \
                        MACRO_BEGIN { \
+                               vector scaled_sz = sz * wcross_size; \
                                if(wcross_blur > 0) \
                                { \
                                        for(i = -2; i <= 2; ++i) \
                                        for(j = -2; j <= 2; ++j) \
-                                       M(i,j,sz,wcross_name,wcross_alpha*0.04); \
+                                       M(i,j,sz,scaled_sz,wcross_name,wcross_alpha*0.04); \
                                } \
                                else \
                                { \
-                                       M(0,0,sz,wcross_name,wcross_alpha); \
+                                       M(0,0,sz,scaled_sz,wcross_name,wcross_alpha); \
                                } \
                        } MACRO_END
 
-#define CROSSHAIR_DRAW_SINGLE(i,j,sz,wcross_name,wcross_alpha) \
-                       drawpic(wcross_origin - ('0.5 0 0' * (sz * wcross_size.x + i * wcross_blur) + '0 0.5 0' * (sz * wcross_size.y + j * wcross_blur)), wcross_name, sz * wcross_size, wcross_color, wcross_alpha, DRAWFLAG_NORMAL)
+#define CROSSHAIR_DRAW_SINGLE(i,j,sz,scaled_sz,wcross_name,wcross_alpha) \
+                       drawpic(wcross_origin - ('0.5 0 0' * (scaled_sz.x + i * wcross_blur) + '0 0.5 0' * (scaled_sz.y + j * wcross_blur)), wcross_name, scaled_sz, wcross_color, wcross_alpha, DRAWFLAG_NORMAL)
 
 #define CROSSHAIR_DRAW(sz,wcross_name,wcross_alpha) \
                        CROSSHAIR_DO_BLUR(CROSSHAIR_DRAW_SINGLE,sz,wcross_name,wcross_alpha)
index 68c5114f4d5bbf06d398f27b32584551737e42a8..f72f943d3612012c9c6bde5c9ecdc1507ee73c48 100644 (file)
@@ -34,12 +34,8 @@ void TeleportPlayer(entity teleporter, entity player, vector to, vector to_angle
 void trigger_teleport_use(entity this, entity actor, entity trigger);
 
 #define TDEATHLOOP(o) \
-       entity head; \
-       vector deathmin; \
-       vector deathmax; \
-       float deathradius; \
-       deathmin = (o) + player.mins; \
-       deathmax = (o) + player.maxs; \
+       vector deathmin = (o) + player.mins; \
+       vector deathmax = (o) + player.maxs; \
        if(telefragmin != telefragmax) \
        { \
                if(deathmin.x > telefragmin.x) deathmin.x = telefragmin.x; \
@@ -49,11 +45,9 @@ void trigger_teleport_use(entity this, entity actor, entity trigger);
                if(deathmax.y < telefragmax.y) deathmax.y = telefragmax.y; \
                if(deathmax.z < telefragmax.z) deathmax.z = telefragmax.z; \
        } \
-       deathradius = max(vlen(deathmin), vlen(deathmax)); \
-       for(head = findradius(o, deathradius); head; head = head.chain) \
-               if(head != player) \
-                       if(head.takedamage) \
-                               if(boxesoverlap(deathmin, deathmax, head.absmin, head.absmax))
+       float deathradius = max(vlen(deathmin), vlen(deathmax)); \
+       for (entity head = findradius(o, deathradius); head; head = head.chain) \
+               if (head != player && head.takedamage && boxesoverlap(deathmin, deathmax, head.absmin, head.absmax))
 
 float check_tdeath(entity player, vector org, vector telefragmin, vector telefragmax);
 float tdeath_hit;
index a8389e240f4e9ec0041ae5609a75c2ee9baae84a..dce6e9c9d82459022ec231eeb5ee03b3f5e41c0e 100644 (file)
@@ -34,9 +34,7 @@
                if (conv <= 0) { \
                        ret = -1; \
                } else { \
-                       bool esc = false; \
                        if (conv == '=') { \
-                               esc = true; \
                                conv = STRING_ITERATOR_GET(stringiter); \
                                conv -= 64; \
                        } \
index eec56ca5fd56725c7106d0ba246f8f70396d104f..b781ff6819b55055b52d06d5288b0a32e3bf4bd1 100644 (file)
@@ -27,14 +27,17 @@ void RegisterSLCategories()
                for(i = 0; i < category_ent_count; ++i) \
                { \
                        s = categories[i].override_string; \
-                       if((s != "") && (s != categories[i].cat_name)) \
+                       if(s != "" && s != categories[i].cat_name) \
                        { \
                                catnum = 0; \
                                for(x = 0; x < category_ent_count; ++x) \
-                               { if(categories[x].cat_name == s) { \
-                                       catnum = (x+1); \
-                                       break; \
-                               } } \
+                               { \
+                                       if(categories[x].cat_name == s) \
+                                       { \
+                                               catnum = x + 1; \
+                                               break; \
+                                       } \
+                               } \
                                if(catnum) \
                                { \
                                        strfree(categories[i].override_string); \
index 5ca5270d614dda0b5212a827c5fa5922162e8f51..c22737ed0d2d2b5d02bd9595740dca3b322cab80 100644 (file)
@@ -95,8 +95,7 @@ float CheatsAllowed(entity this, float i, int argc, float fr) // the cheat gets
 }
 
 #define BEGIN_CHEAT_FUNCTION() \
-       float cheating, attempting; \
-       cheating = 0; attempting = 0
+       float cheating = 0, attempting = 0
 #define DID_CHEAT() \
        ++cheating
 #define ADD_CHEATS(e,n) \
index 8ccd64b1e1eadbd29ef50c44b5503e3b8e78c2c3..0164444950cb09e1d5d7ab0989d9b9eba301cbe9 100644 (file)
@@ -1057,6 +1057,8 @@ string getwelcomemessage(entity this)
        return s;
 }
 
+bool autocvar_sv_qcphysics = false; // TODO this is for testing - remove when qcphysics work
+
 /**
 =============
 ClientConnect
@@ -1149,7 +1151,7 @@ void ClientConnect(entity this)
        if (IS_REAL_CLIENT(this))
                sv_notice_join(this);
 
-       this.move_qcphysics = true;
+       this.move_qcphysics = autocvar_sv_qcphysics;
 
        // update physics stats (players can spawn before physics runs)
        Physics_UpdateStats(this);
index 9e78aa3c360acdec20c36f831f13fc3182fde369..dfa1389721aa456db09d41381b607e5688bbc584 100644 (file)
@@ -26,6 +26,7 @@
 void W_SetupShot_Dir_ProjectileSize_Range(entity ent, .entity weaponentity, vector s_forward, vector mi, vector ma, float antilag, float recoil, Sound snd, float chan, float maxdamage, float range, int deathtype)
 {
        TC(Sound, snd);
+       float nudge = 1; // added to traceline target and subtracted from result  TOOD(divVerent): do we still need this? Doesn't the engine do this now for us?
        float oldsolid = ent.dphitcontentsmask;
        Weapon wep = DEATH_WEAPONOF(deathtype);
        if(!IS_CLIENT(ent))
@@ -73,20 +74,22 @@ void W_SetupShot_Dir_ProjectileSize_Range(entity ent, .entity weaponentity, vect
        vector md = ent.(weaponentity).movedir;
        vector vecs = ((md.x > 0) ? md : '0 0 0');
 
-       vector dv = v_forward * vecs.x + v_right * -vecs.y + v_up * vecs.z;
-       w_shotorg = ent.origin + ent.view_ofs;
+       // TODO this is broken - see 637056bea7bf7f5c9c0fc6113e94731a2767476 for an attempted fix
+       // which fixes issue #1957 but causes #2129
+       vector dv = v_right * -vecs.y + v_up * vecs.z;
+       w_shotorg = ent.origin + ent.view_ofs + dv;
 
        // now move the shotorg forward as much as requested if possible
        if(antilag)
        {
                if(CS(ent).antilag_debug)
-                       tracebox_antilag(ent, w_shotorg, mi, ma, w_shotorg + dv, MOVE_NORMAL, ent, CS(ent).antilag_debug);
+                       tracebox_antilag(ent, w_shotorg, mi, ma, w_shotorg + v_forward * (vecs.x + nudge), MOVE_NORMAL, ent, CS(ent).antilag_debug);
                else
-                       tracebox_antilag(ent, w_shotorg, mi, ma, w_shotorg + dv, MOVE_NORMAL, ent, ANTILAG_LATENCY(ent));
+                       tracebox_antilag(ent, w_shotorg, mi, ma, w_shotorg + v_forward * (vecs.x + nudge), MOVE_NORMAL, ent, ANTILAG_LATENCY(ent));
        }
        else
-               tracebox(w_shotorg, mi, ma, w_shotorg + dv, MOVE_NORMAL, ent);
-       w_shotorg = trace_endpos;
+               tracebox(w_shotorg, mi, ma, w_shotorg + v_forward * (vecs.x + nudge), MOVE_NORMAL, ent);
+       w_shotorg = trace_endpos - v_forward * nudge;
        // calculate the shotdir from the chosen shotorg
        if(W_DualWielding(ent))
                w_shotdir = s_forward;
@@ -151,7 +154,7 @@ void W_SetupShot_Dir_ProjectileSize_Range(entity ent, .entity weaponentity, vect
        }
 
        // nudge w_shotend so a trace to w_shotend hits
-       w_shotend = w_shotend + normalize(w_shotend - w_shotorg);
+       w_shotend = w_shotend + normalize(w_shotend - w_shotorg) * nudge;
        //if(w_shotend != prevend) { printf("SERVER: shotEND differs: %s - %s\n", vtos(w_shotend), vtos(prevend)); }
        //if(w_shotorg != prevorg) { printf("SERVER: shotORG differs: %s - %s\n", vtos(w_shotorg), vtos(prevorg)); }
        //if(w_shotdir != prevdir) { printf("SERVER: shotDIR differs: %s - %s\n", vtos(w_shotdir), vtos(prevdir)); }