(GameExportsImpl gameExports)
| 984 | } |
| 985 | |
| 986 | private static float normalizeSkillCvar(GameExportsImpl gameExports) { |
| 987 | final float skill = gameExports.gameCvars.skill.value; |
| 988 | float skillNormalized = (float) Math.floor(skill); |
| 989 | |
| 990 | if (skillNormalized < 0) |
| 991 | skillNormalized = 0; |
| 992 | if (skillNormalized > 3) |
| 993 | skillNormalized = 3; |
| 994 | if (skill != skillNormalized) |
| 995 | gameExports.gameImports.cvar_forceset("skill", "" + skillNormalized); |
| 996 | return skill; |
| 997 | } |
| 998 | |
| 999 | /** |
| 1000 | * Finds the spawn function for the entity and calls it. |
no test coverage detected