]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
Merge MR 'Set groundentity when sv_gameplayfix_downtracesupportsongroundflag detects...
authorbones_was_here <bones_was_here@xa.org.au>
Sun, 16 Jan 2022 20:45:18 +0000 (06:45 +1000)
committerbones_was_here <bones_was_here@xa.org.au>
Sun, 16 Jan 2022 20:45:18 +0000 (06:45 +1000)
Fixes movers not carrying players who walk onto them with no z
velocity, when sv_gameplayfix_nogravityonground is enabled

https://github.com/DarkPlacesEngine/darkplaces/pull/23

branch: bones_was_here/walking_groundentity_fix
commits: 7ea07939bef0cbe85c54d9f68cb924198b0b1f64

Signed-off-by: bones_was_here <bones_was_here@xa.org.au>
.gitignore
COPYING
Doxyfile
server.h
sv_ents.c
sv_main.c
sv_send.c

index cdb3c644c0153d9e334f2d0c2e6056f9400d2fb5..7d90b57aaf776f5372a2d4f14dea6e33050f771e 100644 (file)
@@ -25,4 +25,5 @@ Makefile.win
 *.gch
 /.vs
 /build
-/.cache
\ No newline at end of file
+/.cache
+*.kdev4
diff --git a/COPYING b/COPYING
index d60c31a97a544b53039088d14fe9114583c0efc3..e90dfed1a31ed1c0c22befce22c6f37f9cf5f2bb 100644 (file)
--- a/COPYING
+++ b/COPYING
@@ -55,7 +55,7 @@ patent must be licensed for everyone's free use or not licensed at all.
 
   The precise terms and conditions for copying, distribution and
 modification follow.
-\f
+
                    GNU GENERAL PUBLIC LICENSE
    TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
 
@@ -110,7 +110,7 @@ above, provided that you also meet all of these conditions:
     License.  (Exception: if the Program itself is interactive but
     does not normally print such an announcement, your work based on
     the Program is not required to print an announcement.)
-\f
+
 These requirements apply to the modified work as a whole.  If
 identifiable sections of that work are not derived from the Program,
 and can be reasonably considered independent and separate works in
@@ -168,7 +168,7 @@ access to copy from a designated place, then offering equivalent
 access to copy the source code from the same place counts as
 distribution of the source code, even though third parties are not
 compelled to copy the source along with the object code.
-\f
+
   4. You may not copy, modify, sublicense, or distribute the Program
 except as expressly provided under this License.  Any attempt
 otherwise to copy, modify, sublicense or distribute the Program is
@@ -225,7 +225,7 @@ impose that choice.
 
 This section is intended to make thoroughly clear what is believed to
 be a consequence of the rest of this License.
-\f
+
   8. If the distribution and/or use of the Program is restricted in
 certain countries either by patents or by copyrighted interfaces, the
 original copyright holder who places the Program under this License
@@ -278,7 +278,7 @@ PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
 POSSIBILITY OF SUCH DAMAGES.
 
                     END OF TERMS AND CONDITIONS
-\f
+
            How to Apply These Terms to Your New Programs
 
   If you develop a new program, and you want it to be of the greatest
index 07b60ace79aa325636916a47760fa5e4b976d868..5ab1e3b6a2e841012a1e523184141bc7313ad18d 100644 (file)
--- a/Doxyfile
+++ b/Doxyfile
@@ -68,7 +68,7 @@ OUTPUT_DIRECTORY       =
 # performance problems for the file system.
 # The default value is: NO.
 
-CREATE_SUBDIRS         = YES
+CREATE_SUBDIRS         = NO
 
 # If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII
 # characters to appear in the names of generated files. If set to NO, non-ASCII
@@ -259,7 +259,7 @@ ALIASES                =
 # members will be omitted, etc.
 # The default value is: NO.
 
-OPTIMIZE_OUTPUT_FOR_C  = NO
+OPTIMIZE_OUTPUT_FOR_C  = YES
 
 # Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or
 # Python sources only. Doxygen will then generate output that is more tailored
@@ -890,7 +890,7 @@ INPUT_ENCODING         = UTF-8
 # comment), *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, *.f18, *.f, *.for, *.vhd,
 # *.vhdl, *.ucf, *.qsf and *.ice.
 
-FILE_PATTERNS          = *.c *.cc *.cxx *.cpp *.c++ *.h *.hh *.hxx *.hpp *.h++ *.qc *.qh *.inc
+FILE_PATTERNS          = *.c *.cc *.cxx *.cpp *.c++ *.h *.hh *.hxx *.hpp *.h++ *.qc *.qh *.inc *.md
 
 # The RECURSIVE tag can be used to specify whether or not subdirectories should
 # be searched for input files as well.
@@ -1014,7 +1014,7 @@ FILTER_SOURCE_PATTERNS =
 # (index.html). This can be useful if you have a project on for instance GitHub
 # and want to reuse the introduction page also for the doxygen output.
 
-USE_MDFILE_AS_MAINPAGE =
+USE_MDFILE_AS_MAINPAGE = README.md
 
 #---------------------------------------------------------------------------
 # Configuration options related to source browsing
@@ -1524,7 +1524,7 @@ ECLIPSE_DOC_ID         = org.doxygen.Project
 # The default value is: NO.
 # This tag requires that the tag GENERATE_HTML is set to YES.
 
-DISABLE_INDEX          = NO
+DISABLE_INDEX          = YES
 
 # The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
 # structure should be generated to display hierarchical information. If the tag
@@ -1588,7 +1588,7 @@ EXT_LINKS_IN_WINDOW    = NO
 # The default value is: png.
 # This tag requires that the tag GENERATE_HTML is set to YES.
 
-HTML_FORMULA_FORMAT    = png
+HTML_FORMULA_FORMAT    = svg
 
 # Use this tag to change the font size of LaTeX formulas included as images in
 # the HTML documentation. When you change the font size after a successful
@@ -1721,7 +1721,7 @@ SEARCHENGINE           = YES
 # The default value is: NO.
 # This tag requires that the tag SEARCHENGINE is set to YES.
 
-SERVER_BASED_SEARCH    = NO
+SERVER_BASED_SEARCH    = YES
 
 # When EXTERNAL_SEARCH tag is enabled doxygen will no longer generate the PHP
 # script for searching. Instead the search results are written to an XML file
@@ -2464,7 +2464,7 @@ INCLUDED_BY_GRAPH      = YES
 # The default value is: NO.
 # This tag requires that the tag HAVE_DOT is set to YES.
 
-CALL_GRAPH             = YES
+CALL_GRAPH             = NO
 
 # If the CALLER_GRAPH tag is set to YES then doxygen will generate a caller
 # dependency graph for every global function or class method.
@@ -2476,7 +2476,7 @@ CALL_GRAPH             = YES
 # The default value is: NO.
 # This tag requires that the tag HAVE_DOT is set to YES.
 
-CALLER_GRAPH           = YES
+CALLER_GRAPH           = NO
 
 # If the GRAPHICAL_HIERARCHY tag is set to YES then doxygen will graphical
 # hierarchy of all classes instead of a textual one.
index 02d3786bb6319ec8450539e9695b7d15f69bb472..5ae7befde0f911157127168a7305f1f8d6db6a0d 100644 (file)
--- a/server.h
+++ b/server.h
@@ -581,7 +581,7 @@ int SV_EntitiesInBox(const vec3_t mins, const vec3_t maxs, int maxedicts, prvm_e
 
 qbool SV_CanSeeBox(int numsamples, vec_t eyejitter, vec_t enlarge, vec_t entboxexpand, vec3_t eye, vec3_t entboxmins, vec3_t entboxmaxs);
 
-void SV_MarkWriteEntityStateToClient(entity_state_t *s);
+void SV_MarkWriteEntityStateToClient(entity_state_t *s, client_t *client);
 
 void SV_SendServerinfo(client_t *client);
 void SV_WriteEntitiesToClient(client_t *client, prvm_edict_t *clent, sizebuf_t *msg, int maxsize);
index 8dd9db4d944c5307f585d5248ffe2254fee091cc..895601fa77a63178316c6139f788f8e2a47d7112 100644 (file)
--- a/sv_ents.c
+++ b/sv_ents.c
@@ -395,7 +395,7 @@ void SV_WriteEntitiesToClient(client_t *client, prvm_edict_t *clent, sizebuf_t *
        sv.sententitiesmark++;
 
        for (i = 0;i < sv.numsendentities;i++)
-               SV_MarkWriteEntityStateToClient(sv.sendentities + i);
+               SV_MarkWriteEntityStateToClient(sv.sendentities + i, client);
 
        numsendstates = 0;
        numcsqcsendstates = 0;
index c39069eb5b8f81926a63e0bf9f2c5893a777de07..8b5cfb84d7dbd95ab4e1d742c215a0b5bd30148b 100644 (file)
--- a/sv_main.c
+++ b/sv_main.c
@@ -93,6 +93,7 @@ cvar_t sv_cullentities_trace_entityocclusion = {CF_SERVER, "sv_cullentities_trac
 cvar_t sv_cullentities_trace_samples = {CF_SERVER, "sv_cullentities_trace_samples", "2", "number of samples to test for entity culling"};
 cvar_t sv_cullentities_trace_samples_extra = {CF_SERVER, "sv_cullentities_trace_samples_extra", "2", "number of samples to test for entity culling when the entity affects its surroundings by e.g. dlight"};
 cvar_t sv_cullentities_trace_samples_players = {CF_SERVER, "sv_cullentities_trace_samples_players", "8", "number of samples to test for entity culling when the entity is a player entity"};
+cvar_t sv_cullentities_trace_spectators = {CF_SERVER, "sv_cullentities_trace_spectators", "0", "enables trace entity culling for clients that are spectating"};
 cvar_t sv_debugmove = {CF_SERVER | CF_NOTIFY, "sv_debugmove", "0", "disables collision detection optimizations for debugging purposes"};
 cvar_t sv_echobprint = {CF_SERVER | CF_ARCHIVE, "sv_echobprint", "1", "prints gamecode bprint() calls to server console"};
 cvar_t sv_edgefriction = {CF_SERVER, "edgefriction", "1", "how much you slow down when nearing a ledge you might fall off, multiplier of sv_friction (Quake used 2, QuakeWorld used 1 due to a bug in physics code)"};
@@ -570,6 +571,7 @@ void SV_Init (void)
        Cvar_RegisterVariable (&sv_cullentities_trace_samples);
        Cvar_RegisterVariable (&sv_cullentities_trace_samples_extra);
        Cvar_RegisterVariable (&sv_cullentities_trace_samples_players);
+       Cvar_RegisterVariable (&sv_cullentities_trace_spectators);
        Cvar_RegisterVariable (&sv_debugmove);
        Cvar_RegisterVariable (&sv_echobprint);
        Cvar_RegisterVariable (&sv_edgefriction);
index a1ee1050ab3cb69b14251c0be1bdc3b7ef165e27..3e125f3a58560589759d398858a43608d280f3e7 100644 (file)
--- a/sv_send.c
+++ b/sv_send.c
@@ -34,6 +34,7 @@ extern cvar_t sv_cullentities_trace_samples_players;
 extern cvar_t sv_cullentities_trace_eyejitter;
 extern cvar_t sv_cullentities_trace_expand;
 extern cvar_t sv_cullentities_trace_delay_players;
+extern cvar_t sv_cullentities_trace_spectators;
 
 /*
 =============================================================================
@@ -859,7 +860,7 @@ qbool SV_CanSeeBox(int numtraces, vec_t eyejitter, vec_t enlarge, vec_t entboxex
        return false;
 }
 
-void SV_MarkWriteEntityStateToClient(entity_state_t *s)
+void SV_MarkWriteEntityStateToClient(entity_state_t *s, client_t *client)
 {
        prvm_prog_t *prog = SVVM_prog;
        int isbmodel;
@@ -906,7 +907,7 @@ void SV_MarkWriteEntityStateToClient(entity_state_t *s)
                        // tag attached entities simply check their parent
                        if (!sv.sendentitiesindex[s->tagentity])
                                return;
-                       SV_MarkWriteEntityStateToClient(sv.sendentitiesindex[s->tagentity]);
+                       SV_MarkWriteEntityStateToClient(sv.sendentitiesindex[s->tagentity], client);
                        if (sv.sententities[s->tagentity] != sv.sententitiesmark)
                                return;
                }
@@ -946,7 +947,7 @@ void SV_MarkWriteEntityStateToClient(entity_state_t *s)
                        }
 
                        // or not seen by random tracelines
-                       if (sv_cullentities_trace.integer && !isbmodel && sv.worldmodel && sv.worldmodel->brush.TraceLineOfSight && !r_trippy.integer)
+                       if (sv_cullentities_trace.integer && !isbmodel && sv.worldmodel && sv.worldmodel->brush.TraceLineOfSight && !r_trippy.integer && (client->frags != -666 || sv_cullentities_trace_spectators.integer))
                        {
                                int samples =
                                        s->number <= svs.maxclients