MCPcopy Create free account
hub / github.com/demoth/jake2 / IsNeutral

Method IsNeutral

game/src/main/java/jake2/game/PlayerClient.java:1296–1309  ·  view source on GitHub ↗

Returns true, if the players gender flag was neither set to female nor to male.

(SubgameEntity ent)

Source from the content-addressed store, hash-verified

1294 * male.
1295 */
1296 public static boolean IsNeutral(SubgameEntity ent) {
1297 char info;
1298
1299 gclient_t client = ent.getClient();
1300 if (client == null)
1301 return false;
1302
1303 info = Info.Info_ValueForKey(client.pers.userinfo, "gender")
1304 .charAt(0);
1305
1306 if (info != 'f' && info != 'F' && info != 'm' && info != 'M')
1307 return true;
1308 return false;
1309 }
1310
1311 /**
1312 * Changes the camera view to look at the killer.

Callers 1

ClientObituaryMethod · 0.95

Calls 2

Info_ValueForKeyMethod · 0.95
getClientMethod · 0.45

Tested by

no test coverage detected