handle the server changing the pps threshold of the game Usage: "$setpps " where pps is the Packets Per Second
| 710 | // handle the server changing the pps threshold of the game |
| 711 | // Usage: "$setpps <int pps>" where pps is the Packets Per Second |
| 712 | void DMFCInputCommand_SetPPS(const char *input_string) { |
| 713 | if (basethis->GetLocalRole() != LR_SERVER) |
| 714 | return; |
| 715 | int d; |
| 716 | char temp[20]; |
| 717 | |
| 718 | //"$setpps" |
| 719 | if (!StringParseWord(input_string, temp, 20, &input_string)) { |
| 720 | basethis->DisplayInputCommandHelp(DTXT_IC_SETPPS); |
| 721 | return; |
| 722 | } |
| 723 | |
| 724 | // parse value |
| 725 | if (!StringParseNumber(input_string, &d, &input_string)) { |
| 726 | basethis->DisplayInputCommandHelp(DTXT_IC_SETPPS); |
| 727 | return; |
| 728 | } |
| 729 | |
| 730 | if (d < 1) |
| 731 | d = 1; |
| 732 | if (d > 20) |
| 733 | d = 20; |
| 734 | basethis->Netgame->packets_per_second = d; |
| 735 | |
| 736 | DLLAddHUDMessage(DTXT_PPSSETMSG, d); |
| 737 | |
| 738 | basethis->SendNetGameInfoSync(); |
| 739 | } |
| 740 | |
| 741 | // handles listing the ban list on a dedicated server (so if you want to remove a player from it) |
| 742 | // Usage: "$banlist" |
nothing calls this directly
no test coverage detected