• 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

Revision8a979c540d006196f585d9208d94e0dc3fd86892 (tree)
Time2021-11-11 00:50:41
AuthorAdam Kaminski <kaminskiadam9@gmai...>
CommiterAdam Kaminski

Log Message

Inform clients exactly how much longer they still need to wait before joining, changing teams, or suiciding again, not how long they should at least wait for.

Change Summary

Incremental Difference

diff -r 01c61a151347 -r 8a979c540d00 src/cl_commands.cpp
--- a/src/cl_commands.cpp Wed Nov 10 09:10:26 2021 -0500
+++ b/src/cl_commands.cpp Wed Nov 10 10:50:41 2021 -0500
@@ -564,7 +564,8 @@
564564 {
565565 if (( sv_limitcommands ) && ( g_ulLastJoinTime > 0 ) && ( (ULONG)gametic < ( g_ulLastJoinTime + ( TICRATE * 3 ))))
566566 {
567- Printf( "You must wait at least 3 seconds before joining again.\n" );
567+ // [AK] Show the client how many more seconds they need to wait before they can join again.
568+ Printf( "You must wait %d seconds before joining again.\n", static_cast<int>( 3 - ( gametic - g_ulLastJoinTime ) / TICRATE ));
568569 return;
569570 }
570571
@@ -598,7 +599,8 @@
598599 {
599600 if (( sv_limitcommands ) && ( g_ulLastSuicideTime > 0 ) && ( (ULONG)gametic < ( g_ulLastSuicideTime + ( TICRATE * 10 ))))
600601 {
601- Printf( "You must wait at least 10 seconds before suiciding again.\n" );
602+ // [AK] Show the client how many more seconds they need to wait before they can suicide again.
603+ Printf( "You must wait %d seconds before suiciding again.\n", static_cast<int>( 10 - ( gametic - g_ulLastSuicideTime ) / TICRATE ));
602604 return;
603605 }
604606
@@ -612,7 +614,8 @@
612614 {
613615 if (( sv_limitcommands ) && !( ( lastmanstanding || teamlms ) && ( LASTMANSTANDING_GetState( ) == LMSS_COUNTDOWN ) ) && ( g_ulLastChangeTeamTime > 0 ) && ( (ULONG)gametic < ( g_ulLastChangeTeamTime + ( TICRATE * 3 ))))
614616 {
615- Printf( "You must wait at least 3 seconds before changing teams again.\n" );
617+ // [AK] Show the client how many more seconds they need to wait before they can change teams again.
618+ Printf( "You must wait %d seconds before changing teams again.\n", static_cast<int>( 3 - ( gametic - g_ulLastChangeTeamTime ) / TICRATE ));
616619 return;
617620 }
618621
diff -r 01c61a151347 -r 8a979c540d00 src/d_netinfo.cpp
--- a/src/d_netinfo.cpp Wed Nov 10 09:10:26 2021 -0500
+++ b/src/d_netinfo.cpp Wed Nov 10 10:50:41 2021 -0500
@@ -990,7 +990,7 @@
990990 && ( (ULONG)gametic < ( g_ulLastNameChangeTime + ( TICRATE * CLIENT_NAMECHANGE_WAITTIME ))))
991991 {
992992 // [AK] Show the client how many more seconds they need to wait before they can change their name again.
993- Printf( "You must wait another %d seconds before changing your name again.\n", static_cast<int>(CLIENT_NAMECHANGE_WAITTIME - ( gametic - g_ulLastNameChangeTime ) / TICRATE) );
993+ Printf( "You must wait %d seconds before changing your name again.\n", static_cast<int>(CLIENT_NAMECHANGE_WAITTIME - ( gametic - g_ulLastNameChangeTime ) / TICRATE) );
994994 return false;
995995 }
996996 }