[SP] s_khz default to 44.
Fixed Com_Error when loading old-style pk3'd bundles on OSX

FS_FOpenFileWrite safemode wasn't allowing a dylib to be created.
[MP] Fixed crash with /give cmd if it is disabled in FinishSpawningItem. (ie: flags in non-ctf gamemode)
FinishSpawningItem can remove the entity because of gametype ruleset, thus the item sub-pointer within the entity would be null within Touch_Item.
[MP] Use XDG_DATA_HOME env for unix (non-mac) by default.
$(XDG_DATA_HOME)/openjk.
New fall-back location: ~/.local/share/openjk
~/.openjk no longer used or checked.
[SP] Use XDG_DATA_HOME env for unix (non-mac) by default.
$(XDG_DATA_HOME)/openjk.
New fall-back location: ~/.local/share/openjk
~/.openjk no longer used or checked.
[MP] Fix #450 - R_FogFactor segfault

When fixing the render command list, the shader indexes are reassigned
in the sort keys. However, when rebuilding the sort key, the entity num
was not re-shifted into the correct place in the bitfield.
[SP] Update the drawsurf sort code from MP.
Switched MAX_ENTITIES to MAX_REFENTITIES and similar defines.
MAX_SHADERS must remain 13 bits because of the weird sorting stuff with RF_ALPHA_FADE.
[SP] Disable FixRenderCommandList for now.
levelshot command was outputting bad images

copypasted MP stuff over
[SP] Fix out of bounds array access in R_FogFactor

R_FogFactor was accessing out of array bounds due to the s texture
coordinate being NaN. This follows from using a zero-length axis to
calculate the vertex positions for a cylinder fx, which was then used in
a foggy scene.

This commit corrects problems in all of the EFX update functions, which
continued to render the EFX, even when its orientation (represented by
a 3 axes) could not be determined.
[MP] Fix force regen debouncer causing hitch with long uptime
[MP] Proper bounds checking on g_maxForceRank
[MP] Fix #453: assertion when NPC jumps up

The assertion was triggered when the NPC attempts to jump directly
upwards.
Merge branch 'master' of github.com:JACoders/OpenJK
[MP] Fix #395: NPCs jump state not being set

This commit fixes the problem with NPCs not jumping when directed through
an ICARUS script. The problem stems from the signedness of enums being
implementation-dependent, and where bState_t (an enum) was used in a
greater-than comparison against -1. In this case, the enum was unsigned
which caused the comparisons to always return false.

This has been fixed by testing for inequality instead of using a greater
than comparison.
[SP] Fix for NPC behaviour setting on Linux

Similar fix to d252a69.
[MP] Fix #382 - force regen bug with saber throw

The debounce time was not being updated when the saber was being thrown.
This meant that after the saber had returned, the force points were
regenerated as if it started from the point the saber was thrown.
[MP] Clean up forcepowers validation
[MP] Fix spectators getting stuck with force grip movement speed. Clean up some bg_pmove stuff.
[MP] Adjusted name filtering. Don't allow control characters, fix @@@ filtering