ClearState
()
| 638 | * |
| 639 | */ |
| 640 | static void ClearState() { |
| 641 | S.StopAllSounds(); |
| 642 | CL_fx.ClearEffects(); |
| 643 | CL_tent.ClearTEnts(); |
| 644 | |
| 645 | // wipe the entire cl structure |
| 646 | |
| 647 | ClientGlobals.cl = new client_state_t(); |
| 648 | for (int i = 0; i < ClientGlobals.cl_entities.length; i++) { |
| 649 | ClientGlobals.cl_entities[i] = new centity_t(); |
| 650 | } |
| 651 | |
| 652 | ClientGlobals.cls.netchan.reliablePending.clear(); |
| 653 | } |
| 654 | |
| 655 | /** |
| 656 | * Disconnect |
no test coverage detected