Misc fixes to IBO code to correctly use sizeof(glIndex_t)
Set entityState_t::team for all missiles (not just proxy mines)

Since BG_PlayerStateToEntityState sets entityState_t::team for players, CG_AddRefEntityWithPowerups doesn't need team argument anymore.
Fix creating symlinks in make-macosx-app.sh

Create symlink if arch name is found anywhere in info printed by file command, not only if arch name is the last word.
Merge remote-tracking branch 'ioquake3/master'
Fix text getting appended to vid_restart in command buffer

I was getting unknown command "vid_restart-button2" warning on OSX when trying to use alt-return to toggle fullscreen.
Merge remote-tracking branch 'ioquake3/master'
Fix setting player's team in Team Arena single player
Move LAN source, demo state, and flag state enums out of q_shared.h
Change Mac app bundle copyright for Spearmint
Change Mac OS X app bundle name to Spearmint.app

Fix make ARCHIVE=1 to look for Spearmint.app instead of ioquake3.app
Remove 5 unused variables from make-macosx scripts
Fix trap_Alloc for game DLL

Now it allocates data on the zone instead of the hunk. Hunk uses mark usage at load and then clears everything allocated beyond that at vid_restart, which was clearing memory dynamically allocated for game vm on hunk.
Don't calculate world surface fog numbers each frame

Put hard coded global fog at index 1. Make surfaces use it at load time instead of calculating fognum (defaulting to global fog if enabled) each frame.

Fixes fog at beginning of q3dm4.
Don't calculate fogDistanceVector before checking if fog is enabled
Don't use GLSL shader with fogging if surface uses (disabled) global fog
Sync GL2 CGEN_FOG with GL1 CGEN_FOG
Fix R_IsGlobalFog
Fix spatializing left audio volume (could go negative)
Fix fogging fog block ceiling texture in q3 maps (such as q3dm9)

I think the >= SS_BLEND0 check was added to stop transparent parts of rain splashes in ET's radar map from being fogged. Q3 expects this behavior for fog block textures though.
ET rain splash fog issue is only noticeable when using Spearmint with Q3 exp fogParms (instead of ET linear fogParms). It should be possible to fix in shader using "sort seeThrough".

Added in ioq3ztm r327.
Load shader files in filename order

In Quake 3, pak0.pk3 shader /file names/ have priority over all other shader /file names/.
You cannot add a new shader file that replaces one shader definition, because the pak0.pk3 /file names/ have priority.
You basically must replace the entire shader file that the shader definition is in.

Let's load shader files based on file name order so that pak1.pk3/scripts/gfx_mymod.shader and zz_mymod.shader can override shaders in pak0.pk3/scripts/gfx.shader.

Because this changes the order shader files are loaded in, it could cause compatibility issues with vanilla Q3 engine.

Also, always sort FS file lists. (That's actually the only code changes made.)