| 705 | COMMAND(listdemos, ""); |
| 706 | |
| 707 | void shiftgametime(int newmillis) |
| 708 | { |
| 709 | if(!watchingdemo) { conoutf("You have to be watching a demo to change game time"); return; } |
| 710 | |
| 711 | newmillis = max(0, newmillis); |
| 712 | if(newmillis > gametimemaximum) { conoutf("Invalid time specified"); return; } |
| 713 | |
| 714 | int gamemillis = gametimecurrent + (lastmillis - lastgametimeupdate); |
| 715 | if(newmillis < gamemillis) |
| 716 | { |
| 717 | // if rewinding |
| 718 | if(!curdemofile || !curdemofile[0]) return; |
| 719 | watchingdemo = false; |
| 720 | callvote(SA_MAP, curdemofile, "-1", "0"); |
| 721 | skipmillis = newmillis; |
| 722 | } |
| 723 | else |
| 724 | { |
| 725 | skipmillis = newmillis - gamemillis; |
| 726 | } |
| 727 | } |
| 728 | |
| 729 | void setminutesremaining(char *minutes) |
| 730 | { |
no test coverage detected