You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Added cvar fb2_forceswitch, when set to 1, after every feedback round we switch maps (1 by default)
Added command "sm_fbroundnow", Forces the fbround asap, no resets, no delays. Could be buggy, needs testing, Also reacts to the cvar fb2_forceswitch.
Removed telefragging during FB rounds
Possibly made the initial hud text more consistent.
RegConsoleCmd("sm_walkspeed", Command_walkspeed, "Change your walk speed during a fb round (HU)");
233
235
234
-
RegConsoleCmd("sm_fbmedic",Command_Medics, "Return to any player how many medics are on either team. (Useful if you cannot see the enemy medic count and want to switch to counter theirs)");
236
+
RegConsoleCmd("sm_fbmedic",Command_Swag, "Return the medic count of each team");
235
237
RegConsoleCmd("sm_fbdrawline",Command_Drawline, "Return the length in hammer units of how long a sightline is.");
236
238
237
239
#if defined DEBUG
@@ -243,6 +245,7 @@ public void OnPluginStart()
243
245
cvarList[FB_CVAR_DOWNTIME_FORCEFB_ARENA] =CreateConVar("fb2_triggertime_arena", "60" , "How many seconds left should we trigger an expected map end FOR ARENA MODE", FCVAR_NOTIFY, true, 30.0, true, 1200.0);//Min / Max (30 seconds / 20 minutes)
244
246
cvarList[FB_CVAR_DOWNTIME_FORCEFB] =CreateConVar("fb2_triggertime", "300" , "How many seconds left should we trigger an expected map end.", FCVAR_NOTIFY, true, 30.0, true, 1200.0);//Min / Max (30 seconds / 20 minutes)
245
247
cvarList[FB_CVAR_ALLOWMAP_SETTINGS] =CreateConVar("fb2_mapcontrol", "1" , "How much control do we give maps over our plugin.", FCVAR_NOTIFY, true, 0.0, true, 1.0);//false,true.
248
+
cvarList[FB_CVAR_FBNEXTROUND_FORCESWITCH] =CreateConVar("fb2_forceswitch", "1" , "If host uses !fbnextround, should we switch maps after that round is over?", FCVAR_NOTIFY, true, 0.0, true, 1.0);//false,true.
246
249
247
250
//instantiate arrays
248
251
SpawnPointNames=newArrayList(512);
@@ -252,8 +255,18 @@ public void OnPluginStart()
252
255
253
256
254
257
clFbRoundWalkSpeed=RegClientCookie("fb_PlayerWalkSpeed", "The players walk speed during fb rounds.", CookieAccess_Protected);
publicOnClientPostAdminCheck(client)//"Called once a client is authorized and fully in-game, and after all post-connection authorizations have been performed." https://sm.alliedmods.net/new-api/clients/OnClientPostAdminCheck
if(ForceNextRoundTest||FeedbackModeActive) //Tell people that FB rounds are a thing.
733
758
{
734
759
if(!IsTestModeTriggered)
760
+
{
735
761
CPrintToChatAll("\n{gold}[Feedback]{default} ~ Feedback rounds are active!");//Tell everyone about test mode.
762
+
FbMapOverrideListings();
763
+
}
736
764
}
737
765
738
766
739
767
if(!IsTestModeTriggered)//If not test mode, run normally
740
768
{
741
769
return;
742
770
}
771
+
StartFeedbackRound();
772
+
773
+
}
774
+
voidStartFeedbackRound()
775
+
{
743
776
777
+
CPrintToChatAll("------------------------ \n{gold}[Feedback]{default} ~ Feedback round started: !sm_fbrh for more info\n\n{gold}>{default}You cannot kill anyone\n{gold}>{default}Leave as much feedback as possible.\n\n ------------------------");//Tell everyone about test mode.
CPrintToChatAll("------------------------ \n{gold}[Feedback]{default} ~ Feedback round started: !sm_fbrh for more info\n\n{gold}>{default}You cannot kill anyone\n{gold}>{default}Leave as much feedback as possible.\n\n ------------------------");//Tell everyone about test mode.
757
-
758
-
759
790
//Set timer
760
791
FeedbackTimer=cvarList[FB_CVAR_ALLOTED_TIME].IntValue;//Read the cvar and set the timer to the cvartime.
ShowSyncHudText(ic, feedbackHUD, "| FEEDBACK ROUND TRIGGERED | \n > | You cannot deal damage | Leave as much feedback as possible | <");//client, channel, text
860
889
}
861
890
}
862
-
891
+
CreateTimer(0.2,DelayHudText_IntoText);
863
892
CleanUpTimer();//Incase it was already running. Clean it up before a new cycle.
864
893
fbTimer=CreateTimer(1.0, CountdownTimer, _, TIMER_REPEAT|TIMER_FLAG_NO_MAPCHANGE);//DONT CARRY OVER MAP CHANGE! Oh and repeat.
ShowSyncHudText(ic, feedbackHUD, "| FEEDBACK ROUND TRIGGERED | \n > | You cannot deal damage | Leave as much feedback as possible | <");//client, channel, text
903
+
}
904
+
}
905
+
}
866
906
/*
867
907
Use: Countdown timer logic
868
908
Every second we count down and apply anything we need to be constantly true.
@@ -901,7 +941,7 @@ public Action CountdownTimer(Handle timer, any serial)
newString:mapString[256] ="cp_dustbowl";//If no nextmap, dustbowl
907
947
GetNextMap(mapString, sizeof(mapString));
@@ -925,7 +965,7 @@ public Action CountdownTimer(Handle timer, any serial)
925
965
voidFeedbackTimerExpired()
926
966
{
927
967
ResetAlltalk();
928
-
if(GetMapTimeLeftInt() <=ReturnExpectedDowntime() ||EndOfRoundFlags&FBFLAG_FORCELASTROUND)//load next map.
968
+
if(GetMapTimeLeftInt() <=ReturnExpectedDowntime() ||EndOfRoundFlags&FBFLAG_FORCELASTROUND||cvarList[FB_CVAR_FBNEXTROUND_FORCESWITCH].IntValue==1)//load next map.
929
969
{
930
970
newString:mapString[256] ="cp_dustbowl";//If no nextmap, dustbowl
931
971
GetNextMap(mapString, sizeof(mapString));
@@ -1048,27 +1088,6 @@ public OnClientDisconnect(int client)
1048
1088
Use: Countdown timer from microwave seconds to human seconds.
1049
1089
There has to be a way to do this normally in SM. Just too lazy to look rn.
0 commit comments