• R/O
  • SSH

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

This is a fork of Zandronum used on servers hosted by The Sentinels Playground (TSPG).


Commit MetaInfo

Revision1708995e86ce66fd91958e94562e184867d434e3 (tree)
Time2022-03-28 04:17:25
AuthorBenjamin Berkels <torr.samaho@quan...>
CommiterBenjamin Berkels

Log Message

Restrict broadcasted net commands to clients who already have the full update (addresses 2667).

Change Summary

Incremental Difference

diff -r d9afeaf60ce8 -r 1708995e86ce src/network/netcommand.cpp
--- a/src/network/netcommand.cpp Sun Jan 23 23:29:50 2022 +0100
+++ b/src/network/netcommand.cpp Sun Mar 27 21:17:25 2022 +0200
@@ -76,6 +76,9 @@
7676 if ( ( _flags & SVCF_ONLY_CONNECTIONTYPE_1 ) && ( players[_current].userinfo.GetConnectionType() != 1 ) )
7777 return false;
7878
79+ if ( ( _flags & SVCF_SKIP_CLIENTS_WITHOUT_FULLUPDATE ) && ( SERVER_GetClient( _current )->State == CLS_SPAWNED_BUT_NEEDS_AUTHENTICATION ) && ( gamestate == GS_LEVEL ) )
80+ return false;
81+
7982 return true;
8083 }
8184
@@ -277,6 +280,9 @@
277280 //
278281 void NetCommand::sendCommandToClients ( ULONG ulPlayerExtra, ServerCommandFlags flags )
279282 {
283+ if ( ( flags == 0 ) && ( ulPlayerExtra == MAXPLAYERS ) && ( static_cast<SVC>( _buffer.pbData[0] ) != SVC_MAPAUTHENTICATE ) )
284+ flags |= SVCF_SKIP_CLIENTS_WITHOUT_FULLUPDATE;
285+
280286 for ( ClientIterator it ( ulPlayerExtra, flags ); it.notAtEnd(); ++it )
281287 sendCommandToOneClient( *it );
282288 }
diff -r d9afeaf60ce8 -r 1708995e86ce src/sv_commands.h
--- a/src/sv_commands.h Sun Jan 23 23:29:50 2022 +0100
+++ b/src/sv_commands.h Sun Mar 27 21:17:25 2022 +0200
@@ -71,7 +71,8 @@
7171 SVCF_SKIPTHISCLIENT = ( 1 << 0 ),
7272 SVCF_ONLYTHISCLIENT = ( 1 << 1 ),
7373 SVCF_ONLY_CONNECTIONTYPE_0 = ( 1 << 2 ),
74- SVCF_ONLY_CONNECTIONTYPE_1 = ( 1 << 3 )
74+ SVCF_ONLY_CONNECTIONTYPE_1 = ( 1 << 3 ),
75+ SVCF_SKIP_CLIENTS_WITHOUT_FULLUPDATE = ( 1 << 4 )
7576 };
7677
7778 typedef TFlags<ServerCommandFlag, unsigned int> ServerCommandFlags;