From: Rene S. <sa...@us...> - 2005-02-19 21:20:30
|
Update of /cvsroot/jake2/jake2/src/jake2/game In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30838/src/jake2/game Modified Files: PlayerClient.java Log Message: bugfixes in selectspawnpoint() functions Index: PlayerClient.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/game/PlayerClient.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** PlayerClient.java 12 Feb 2005 21:43:02 -0000 1.8 --- PlayerClient.java 19 Feb 2005 21:20:10 -0000 1.9 *************** *** 450,453 **** --- 450,457 ---- es = GameBase.G_Find(es, GameBase.findByClass, "info_player_deathmatch"); + + if (es == null) + break; + spot = es.o; if (spot == spot1 || spot == spot2) *************** *** 490,497 **** // if there is a player just spawned on each and every start spot // we have no choice to turn one into a telefrag meltdown ! spot = GameBase.G_Find(null, GameBase.findByClass, ! "info_player_deathmatch").o; ! ! return spot; } --- 494,503 ---- // if there is a player just spawned on each and every start spot // we have no choice to turn one into a telefrag meltdown ! EdictIterator edit = GameBase.G_Find(null, GameBase.findByClass, ! "info_player_deathmatch"); ! if (edit == null) ! return null; ! ! return edit.o; } *************** *** 580,594 **** if (null == spot) { ! if (GameBase.game.spawnpoint.length() == 0) { // there wasn't a ! // spawnpoint ! // without a ! // target, so use ! // any ! spot = (es = GameBase.G_Find(es, GameBase.findByClass, ! "info_player_start")).o; } if (null == spot) GameBase.gi.error("Couldn't find spawn point " + GameBase.game.spawnpoint + "\n"); } } --- 586,604 ---- if (null == spot) { ! if (GameBase.game.spawnpoint.length() == 0) { ! // there wasn't a spawnpoint without a ! // target, so use any ! es = GameBase.G_Find(es, GameBase.findByClass, ! "info_player_start"); ! ! if (es != null) ! spot = es.o; } if (null == spot) + { GameBase.gi.error("Couldn't find spawn point " + GameBase.game.spawnpoint + "\n"); + return; + } } } |