(SubgameEntity self, GameExportsImpl gameExports)
| 663 | } |
| 664 | |
| 665 | public static void respawn(SubgameEntity self, GameExportsImpl gameExports) { |
| 666 | if (gameExports.gameCvars.deathmatch.value != 0 || gameExports.gameCvars.coop.value != 0) { |
| 667 | // spectator's don't leave bodies |
| 668 | if (self.movetype != GameDefines.MOVETYPE_NOCLIP) |
| 669 | CopyToBodyQue(self, gameExports); |
| 670 | self.svflags &= ~Defines.SVF_NOCLIENT; |
| 671 | PutClientInServer(self, gameExports); |
| 672 | |
| 673 | // add a teleportation effect |
| 674 | self.s.event = Defines.EV_PLAYER_TELEPORT; |
| 675 | |
| 676 | // hold in place briefly |
| 677 | gclient_t client = self.getClient(); |
| 678 | client.getPlayerState().pmove.pm_flags = Defines.PMF_TIME_TELEPORT; |
| 679 | client.getPlayerState().pmove.pm_time = 14; |
| 680 | |
| 681 | client.respawn_time = gameExports.level.time; |
| 682 | |
| 683 | return; |
| 684 | } |
| 685 | |
| 686 | // single player only |
| 687 | // restart the entire server |
| 688 | gameExports.gameImports.AddCommandString("menu_loadgame\n"); |
| 689 | } |
| 690 | |
| 691 | static boolean passwdOK(String i1, String i2) { |
| 692 | if (i1.length() != 0 && !i1.equals("none") && !i1.equals(i2)) |
no test coverage detected