[Note: see Changelog_pb1.txt for items up to public beta 1,
Changelog_pb2.txt for items changed between pb1 and pb2,
Changelog_pb3.txt for items changed between pb2 and pb3,
Changelog_pb4.txt for items changed between pb3 and pb4a, and
Changelog_pb5.txt for items changed between pb4a and pb5.1. This file
contains items changed since pb5.1]


- Fix for mantis #1999. Should have correct buffer size on
reading. Thanks for a quality bug report. [NM]

- Upgrade bink libraries to 1.9p (1.9.16.0). This supports
multithreaded decompression, but that's not used. [NM]

- First pass at enhancing network code with latest Gamespy libraries.
First item done: use Gamespy Transport 2 to go back to all data over a
single port, using UDP. (No more forwarding 3 ports in multiple
protocols). Seems to work in limited testing here. This rewrite will
help with other parts of the gamespy libs. It also means that most of
the BZ2 network thread is useless now -- things like pings and the
like will now be affected by system framerate. Removed some
now-redundant items from GamePrefs.ini [NM]

- Framerate display now caps out at 500fps. More precision, but sent
slightly less often while playing. [NM]

- Excluded all ATI Rage cards listed at
http://pci-ids.ucw.cz/read/PC/1002 from allowing DXT textures. Done
because VendorID 0x1002 / DeviceID 0x5446 doesn't do DXT, reported on
boards. [NM]

- Switched IRC (ingame chat lobby) code to Gamespy's 'chat' irc code.
[NM]

- Switched to Gamespy's 'Query & Reporting 2' code. This should allow
for more flexibility down the road. Mostly works in LAN testing
here. Note - because of this change, pre-pb6 games can NOT see pb6
games, and vice versa. [NM]

- Switched from Winsock 2.0 to Winsock 2.2. This is fully supported
since Win2000, as far as all the docs I've read note. [NM]

- Spams user to upgrade their patch install if it's obsolete compared
to a version file stored online. [NM]

- MiniUPNP forwards to port 17770/UDP, only. No more need to forward 3
ports on in multiple protocols. (Technically, it forwards on whatever
port you set in gameprefs, which defaults to 17770). [NM]

- When on the 'internet thru gamespy', and it finds a game on the same
lan as you, a join will now try to connect to the game using that
game's internal IP address. This should make internal joins reliable
whether you use 'internet thru gamespy' or 'TCP/IP lan only'. [NM]

- Nat negotiation (aka 'natneg') code looks like it's in. This is one
of the bigger, more important changes -- it should hopefully let
people host games w/o having to mess with their router settings. Most
of the work above for Gamespy libs changes (excluding irc) have been
prerequisites for this.

   Testers - try hosting games w/o port forwarding (either manual at
the router, or auto thru UPNP) and see if they're
visible/joinable. [NM]

-- b84a released==============

- Gamespy logos (as required by their licensing) are displayed on the
loading screen, if MP is on. Gamespy tech is used even in a lanonly
game, so it's displayed anytime MP is on. I just hacked up intro.tga;
someone else may want to hack it up better. [NM]

- Removed Gameprefs.ini::HostMasterServerName, HostMasterServerPort,
ClientMasterServerName, ClientMasterServerPort, as it's a LOT harder
to switch those up now. Also removed the last remnants of the network
thread. Everything's pumped thru the main thread update loop now.
Also removed ExtraSleepInShellGamespyScanning. [NM]

- List of mods in use on a server correctly shows the full name of
.pak files. It was only showing the first character, a sign that it
was misusing unicode. [NM]

- Some work on mantis #2043 - some more logging (battlezone.log,
console) when things go sour. Did notice that port # passed to gamespy
might not have been in network byte order, as expected. [NM]

- When UPNP is disabled in *Prefs.ini, it should now no longer do
any work. [NM]

-- b84b released==============

- More work on #2403 - more logging in battlezone.log. Also found that
byte order flipping above was wrong, and putting it where it shouldn't
be. Undid that.

-- b84b2 released==============

- More work on #2403. Changed order of function calls to match the
order they appear in the gamespy sample's source code, as opposed to
the gamespy documentation. Seems to work as expected when I send a
message (similar to a nat negotiation cookie, but testable on my LAN)
once I switched the order. [NM]

- Leaving a session should get it off the gamespy master servers asap.
Also, when a session is registered w/ master servers, user should be
notified of that. [NM]

- Graffiti'd up a few more MP screens with the 'Powered by GameSpy'
logo -- this time on some of the shell screens. Also split out (for
private testers) the static changed files for b84, such as these
textures. [NM]

-- b84c released==============

- Initial versions of Gamespy Voice support in. It's compiled into the
game, not hooked up yet. Also added a bunch of options for it in the
sound options page -- had to split it to 2 pages, just like graphics.
Best way to initially test this is to turn local echo on (so you hear
yourself), select voice input device(s), start up a MP game (don't
need to launch a mission, sitting in the shell is fine), and talk. You
should hear yourself w/ a slight echo. Modem users will probably want
to disable voice recording & playback, as it definitely eats up
bandwidth. If you do have things set to 'modem', then any voice
recorded will be extra-compressed; 'broadband' gets average
compression.

   Right now, voice data is treated just like chat messages -- if you
have chat messages sent to all, then your voice packets will be sent
to all. And, you will not hear from anyone on your /ignore list . This
is not optimal, but it ought to work for a first pass. [NM]

-- b84d released==============

- Removed buffers and mttexes around them in network code now that
it's back to fully singlethreaded. Might be slightly faster, not
sure. In any case, it should hopefully be more predictable in its
behavior. [NM]

- Fix for stuttering as host. Code to turn on multiworld for servers
when client joined was lost in the shuffle. Restored. [NM]

- Fix for mantis #2045. Don't double-delete players on exit. [NM]

- Turning voice chat on/off from sound options page #2 should take
effect immediately in a MP game. Still need to tell the server to stop
bothering to send voice packets, but this ought to work for a first
pass. [NM]

- Possible fix for mantis #2046. If this happens again, more context
as to what was going on at the time would be great. Thanks. [NM]

-- b84e released==============

- Massive overhaul to game's time system. Refactored time measurement
code into a helper class, and moved global variables, etc into
it. This should reduce the # of calls to QueryPerformanceCounter()
overall, and be a bit cleaner overall. Timeskews should be more
reliable in very high fps situations, and remote players should
resimulate more accurately. Still need to figure out whether I totally
broke time in MW. [NM]

- Overhauled code to unpack gamestate from server to be done at a more
consistent place in the frame. Cleaned up some of what I think is bad
code. Seems to work on my lan in quick 2-machine tests in debug. I
might have disturbed enough rocks (metaphorically speaking) with this
and the above changes that other lurking bugs will now be exposed. No
idea. Do test. These changes might make things better, especially in
the long run as bugs are squished, and possibly worse in the short
term. [NM]

-- b84f released==============

- Fix for buildings not deploying. Old game time system set dt = 0.1
seconds during the updating of things. Put in code to emulate that
behavior. [NM]

- Tweaked random # code to be more in sync w/ what the tweaked
gamestate unpacking code will set things up. 2-player DM on my LAN in
debug didn't have any resyncs in the first few minutes. Also, had 8
joiners (all from my main box) of a 10-player DM Bane session hosted
by my laptop. All in debug w/ lots of logging going on. [NM]

-- b84g released==============

- Sync join should work once again. [NM]

- Fix for #2067. AV fix. [NM]

-- b84g2 released==============

- Probable fix for mantis #2023 - some AIP specifies a missing
asset. Should avoid the crash, and also warn the user a little more
about it. [NM]

- More work on lagouts, etc. Gutted & redid the move packet sending
code, as well as the lost packet requests. The code should be a bit
straightforward, at the expense of slightly larger move packets. I'd
like to try and get things working well, and then make an optimization
pass on it again. [NM]

- Possible fix for sky jumpiness in MW. Do test weather, etc. [NM]

- Possible fix for AV in BinkHelper::Show_frame. Reported on boards. [NM]

-- b84h released==============

- Possible fix for mantis #2077. Lost moves for unknown players
shouldn't cause an AV. [NM]

- Possible fix for mantis #2073. Reduced max packet size
slightly. [NM]

- Tuned down (slightly) the amount of movepackets sent per second. [NM]

- Re-enabled lots of logging in localprefs_bzone.ini. If you get
faking moves, lagouts, please upload logs from all players in the
game. Thanks. [NM]

-- b84h2 released==============

- Possible fix for mantis #2062 - AV fix from second or third launch
of game. [NM]

- Work on mantis #2081 - should get a bit more callstack info if this
happens again. [NM]

- Game.histogram will now show network statistics. Tracks how many
bytes & packets are sent by BZ2, voice, and overhead (server browsing,
other overhead), for both in & outgoing packets. [NM]

- More refactoring of lost packet resend code. Really long-term
missing packets get higher priority in resends. (This might increase
bandwidth a little.) Did put in some squelch code to make sure that
moves for one timestep/ID get resent only once per request. That might
help if a few adjacent moves get lost and are re-requested. [NM]

-- b84I released==============

- Fixme message is spammed to everyone's chat window if local user
doesn't record contiguous moves. Seems possibly implicated in the
second lagout of mantis #2087.  I'm adding this just to help verify
whether it happened or not. [NM]

- game.histogram actually shows realistic numbers for bytes
sent/received. Ooops. [NM]

- Formatted lagout logs more the way humans read it, e.g.:
1,3,5,7,10-11,14-15,20-23,28-31. Just got tired of large table dumps.
[NM]

- More info in lagout logs, including timeskews from server, what's
in missing packet logs. [NM]

- Fix for mantis #2059 - removed some chars from allowable irc
nicknames list. [NM]

- Work on the 'out of memory' in gamespy send code. Should spam more
info if this happens again. I'll need that info, thanks. [NM]

-- b84j released==============

- Probable fix for mantis #2094. Dampened timeskews back to where
they were pre-84j. [NM]

- Work on lagouts (bugs 2102, 2085, 2097, 2092, 2087, 2079, 2090,
2095, 2051) including the all-players-lagout bug. Moved about 3000
lines into a new file, and changing the names of anything and
everything that accessed player inputs. And cached movepackets for
resending. And random # seeds for a turn.  Also refactored a bunch of
C-ish data structures into C++ w/ accessors.  Lots more logging if a
move goes in the wrong bucket, etc.  Things may be more unstable in
the short term as things are now dynamically allocated, plus lots of
logic tests.  [NM]

- Work on mantis #2103. Logs out how big the join/resync savegame
sizes are to chat file. Things shouldn't be exceeding the 64Kb
per-connection buffer size. [NM]

- Reduced chatfile logging to squelch some messages until it thinks
the game's lagged. Might need to pull this back somewhat if I'm
missing the beginnings of problems. [NM]

- Fix for mantis #2110, 2111 - replacement bzshell_multi_irc.cfg to
correct spacing. Thanks. [NM]

- Fix for mantis #2075 - "/names" should work once again in irc. [NM]

- Fix for mantis #2074 - refreshing sessions should work while irc is
open. [NM]

- Fix for mantis #2042. Another sanity check to ensure commands are
sent to a craft. Also made [CraftClass]::CanBailout default to = false
for RecyclerVehicles. Modders can tweak the ODF to go back if they
really want. [NM]

- Fix for mantis #2089. Added
[ArtilleryClass]
HovercraftPhysicsWhenUndeployed = false

   If this is true, when artillery is undeployed (moving), it'll use
the standard hovercraft physics. If this is false, then it'll use
[ArtilleryClass]::omegaTurret and ::alphaTurret in its own physics
code. [NM]

-- b84k released==============

- Fix for mantis #2114, 2117. Editor build should start up once again.
Forgot to test. [NM]

- More work on mantis #2113, 2116. On a join/resync, is stricter about
what moves are kept in buffers & cached. The non-contiguous moves
message may end up being a false positive message that gets squelched
soonish. [NM]

- Added another fixme message for an assert that could fire in a debug
build -- # of players differs between local and server. [NM]

- Fix for mantis #2058. If "/uniquelogfile" is on the commandline,
then the battlezone.log file will be timestamped with the time at
creation, just like chatlog files. Note - this has the possibility of
consuming a lot of disk space, which is why it is not on by
default. [NM]

- Fix for mantis #2091. Added GamePrefs.ini::PauseSPOnAlttab = true. See
comments above it. [NM]

-- b84L released==============

- Fix for mantis #2118 - lagouts after someone leaves. Players were
getting flagged as playing after the leave, so the normal cleanup
never happened. Also updated logging a bit in these cases. [NM]

- Fix for what might be a bunch of the memory trashing AVs. I was
doing what ammounted to a double-free on the gamespy connection
pointer, which can *definitely* cause weirdness. Fixed, so that when
Gamespy tells me a connection is closed, BZ2 code forgets about the
pointer and trusts Gamespy to free it. [NM]

-- b84L2 released==============

- Forgot to bump internal version # for things, so 84L could probably
join 84L2. This is bad. Releasing another quick-fix build. [NM]

-- b84L3 released==============

- Switched Visual Studio compiler options to generate precise floating
point calculations, instead of fast. This might help w/ collision
issues.  Not sure. Do test various things; can put this back if
it breaks too much. [NM]

- Work on mantis #2123 - tightened up when servers should kick really
lagged players somewhat. Also made the low-level transport take a more
proper codepath when removing a player from the game -- should
generate the proper message and handle that. Do test. [NM]

- Work on mantis #2119, 2123, 2103, others -- the out of memory error
message. Did two things: (1) quadrupled incoming/outgoing buffer sizes
for the low-level transport code. (2) Switched from zlib compression
of join buffers to LZMA SDK from http://www.7-zip.org/sdk.html . (Yes,
yet another DLL. These are getting excessive, I think). This seems to
have better compression, at the cost of possibly more of a speed hit
when someone joins. Compressed sizes and # of ms to encode are logged.
I'm not compressing things at maximal compression, mainly because the
last few % of compression can cost double to triple the CPU. [NM]

-- b84m released==============

- Tweaked lag column for in-game scores display. Recent changes are as
paranoid as possible in not expiring moves until it's triply sure that
they're not needed anymore by anyone. Changed things to track minimum
of first missing move or highest timestep ever recorded. [NM]

- Made render lines (unit selection, shadower missile targeting
circle, etc) to draw at a fixed Z-depth. Do test, see if this breaks
anything, especially things like ground sprites, etc. Also check out
the 2D path display (alt-f9), see if it still works. [NM]

- Reduced lzmalib compression dictionary size to fit in memory better,
and an error message if it doesn't work w/ result values. Also made
lzmalib use dlmalloc in BZ2 for better integration/performance. [NM]

-- b84m2 released==============

- Backed off on lost packet requests. There's now a little more 'grace
period' before a machine will start yelling at the other end for the
packets, and re-requests are spaced out a little more too. This should
help reduce bandwidth used. [NM]

- Tweaked optimizations again to try and get some more logging on the
post-game crashes. [NM]

- AV fix in PlayerInputManager::HandleMoveSubPacket. Not on mantis,
but on the boards. [NM]

- Fix for mantis #2101 - packets sent are coalesced into larger pieces
as much as is feasible. This should cut down on the 40-byte per-UDP
packet overhead whenever packets can be coalesced. [NM]

-- b84n released==============

- Tweaked LZMA compression on join/resyncs. Smaller dictionary size,
but higher compression level. So far, logs have shown compression time
in the 50-150ms range (i.e. about 1/20 to 1/6 of a second), which I
feel should be pretty tolerable. Let me know if it's not. [NM]

- Reduced size of server's ping/fps/alt-tab info packet. [NM]

- Tweaked time code so that visual worlds should have more consistent
values for time. Separated out the concept of 'render time' and
'mission time'. (I bet they never were separated after BZ1, where the
two were one and the same.) Test if this makes walker deaths work
better in MW, and/or the 'units under attack' beep. [NM]

- Reduced sizes of movepackets sent. Might still be slightly larger
than 1.0's movepackets, but with the outpacket coalescing done above,
overall bandwidth should probably be lower. Packets are triple-sent to
try and work around lossage. [NM]

- Possible AV fix for PersonProcess::DoUState1. Reported on
boards. [NM]

- Work on mantis #2127, others. Added in more logging to
NetManager::Commands::ShowHideTeam2Interface().  Seems like some
memory is getting trashed, not sure if it's the pointer or the data
pointed to. If this dies again, I might need the full battlezone.log
file. (It logs values on startup, and also in the loop that seems to
be dying.)  Thanks. [NM]

- Tweaked timeskew code to store data more efficiently, and also work
correctly when tps is not 10. Should also only track 'fresh' moves for
greater accuracy. [NM]

- Fix for mantis #2135. Editor build should be more aggressive at
updating the minimap. [NM]

-- b84O released ==============

- Tweak for mantis #2136. If local player's moves weren't expired, and
the memory's needed to overwrite w/ latest, it spams a warning, but
then goes ahead and stomps over the old moves. [NM]

- Added GamePrefs.ini::DoFrameSmoothing . See comments above it.
[NM]

- Fix for mantis #2148 - max ping value should be clamped from
1..9999.  Might be able to try and enter something longer, but it
should be corrected. Also tweaked rules for max ping kick --
previously, it was any single recent ping time under the limit would
keep in. Now, it filters out both the best & worst recent ping time
received, and averages the rest. (It's always done that before
displaying onscreen.) The check of average vs max is done
periodically, so the average might periodically duck slightly over the
limit w/o a kick, but if the average is over when the check happens,
it's autokick time. [NM]

- Tweak on mantis #2146, 2127, others. More callstack logging. I think
there might be more than 1 postgame crash going on, not sure. [NM]

-- b84O2 released ==============

- Fix for mantis #2137. Pause join should work once again. [NM]

-- b84O3 released ==============

- Fix for mantis #2149/2150 - shouldn't be able to overflow max packet
size. [NM]

- Fix for mantis #2053. Moved .cfg files to same place pb5.1 installer
put them in sub-build .7z file. Made exe try and delete the mis-placed
files. On Vista/Win7, this may fail. If you're still getting
bzescape_####x###.cfg dupe files, try starting over from pb5.1,
install the private build assets .7z, then latest private .7z. [NM]

- On a badping kick, prints out all ping times received from that
player.  [NM]

- Fix for mantis #2093 - .sav/.bzn/.trn file mentioned on cmdline will
be ignored if said file doesn't exist. Did need to parse cmdline a
third time (after loading .pak files and AddDirRecurse()), so this
might have side effects :( [NM]

- Fix for mantis #2088. The code that crashed doesn't exist anymore,
but tried to make sure new code isn't vulnerable to similar
errors. [NM]

- Fix for mantis #2107/2138 - updated virtual classes. 2121 - missile
scout flames. (Note - 2121's changes had 4 .xsi files, 1 .msh file.
Seems like this could lead to problems.) 2019 - scrap cheat fix. 2025
- pbfence odfs. 2125 - sound options page #2 fix. 2026 - DMCubes
allowed vehicles. [NM]

- Fix for mantis #2112 - softened warning to go to logfile only, not
open console on startup. [NM]

- Possible fix for mantis #2122. Added
GamePrefs.ini::ClearChatBetweenGames.  [NM]

- Fix for mantis #2021 - star positions should be randomized based on
a seed based on the map name, allowing them to be tweaked on the fly
w/o jumping around. [NM]

- Multiworld's 'far' distance is now Max(400.0f, farPlane *
1.25). Should make things stick around more in huge-visibility
maps. [NM]

-- b84p released ==============

- Fix for mantis #2140, 1917. /ip /iplist should work once again, and
for clients & server. Note - server may not have its own IP known
until someone joins. Also, if first client joining MP game is via lan,
clients will see that server's IP as the internal IP, not the
external. [NM]

- Fix for mantis #2151/2152 - players who left could cause errors like
"Uhoh- data present for X at pos Y has ts Z not A" or "Uhoh-
overwriting moves at timestep ..."  . Missed a value in the copy
constructor & operator=, so things were out of whack. Also tweaked
logging on player deletion so I can better trace who sent the
request. [NM]

- Tweak to post-join or post-resync timeskews. Normally, the server
never skews its time. But, after a join, the server will try to make
up for the time lost in the compressing of the savegames. That way,
fewer clients should need to adjust their clocks. Logs still show the
compression hit as under 1/10 of a second. [NM]

-- b84p2 released ==============

- Removed post-game call to ChatManager::PrintSystemMessage, as it
might be causing some post-game crashes. I'd prefer a good repro case,
but until then, this might work. [NM]

- Fix for mantis #1787 - updated dmfig8.trn. mantis 2134 - fbartl2.odf. [NM]

- Possible fix for mantis #2159. Tries repeatedly to close out
connections after a client leaves. [NM]

- Possible fix for mantis #2164 - applies less of the time diff from
the server at once. Also, server clears what data it has on client's
diff after it tells the client to move its clock. This should allow it
to more accurately recalculate the diff after the client's gotten and
applied the diff. [NM]

- Fix for something RD's been bugging me forever about, not sure if
it's mantis'd. Pregame list of maps will show the map's description
name if it's known to the local system. If the map isn't present on
the local system, should show in yellow. (Wrong version should still
be red, and take precedence over not present yellow.) [NM]

- Fix for Gamespy cert requirements. qr2_send_statechanged() should
only be sent on important state changes, and no more than once every
10 seconds. Also, for 2071, added in a battlezone.log & console
message to say "Unregistered server w/ Gamespy". If that message is
printed, then the Gamespy master server should be notified that the
session should be removed. Nothing I can do after that. [NM]

- Fix for mantis #2133 - changing audio options in a MP game should
make them take affect in realtime. [NM]

- Fix for mantis #2061. Game type in server browsing screen should be
valid once again. NOTE - these strings are NOT read from the localize
file, mainly because we do not want griefers editing that file and
broadcasting 'interesting' messages. Something that's both
modder-friendly and griefer-resistant would be good, but I don't have
a good plan on how to do that. If nothing else, could bake a bunch
more common strings into the exe. [NM]

- Fix for mantis #2170 - tweaked scrapit2.bzn. [NM]

- Possible fix for mantis #2161 - wcscpy_s switched to truncating-form
of that function. Also made ICListBox::AddTextItem more
multithread-friendly. Found what should be the real root cause: a
while back, I got rid of various network threads, and various support
code for them too. Problem is, UPNP still has its own thread, and was
printing from a different thread. Made UPNP's messages go thru a
lightweight threadsafe queue of messages. The regular message printer
will now bomb out if it's not called from the right thread. [NM]

- Fix for mantis #2063. Changed irc nicks won't appear twice in the
list. [NM]

- Hull, ammo gauges should reposition correctly now when the user
toggle fullscreen <-> windowed mode. [NM]

-- b84q released ==============

- Update for when clients fail to join a game. If chatlogging is
on, will dump out much more info. [NM]

- Fix for mantis #2176. Updated river4.bzn to make more area within
the edge_path. [NM]

- Moved supporting DLLs used by the exe to an 'AppDLLs' folder. This
should reduce clutter in the install. Updated BZ2, DXTGen, installer,
build scripts, etc to reference this new structure. Only PCRE is in
the same folder as the exe as I've not been able to break a static
dependency. Full build cleans up old files, and also moves the
changelog to the Extras/Changlog folder. [NM]

- Helper 3rd party lib updates. Independent JPEG Group's JPEG now at
version 8a. libpng now at version 1.4.1. libtiff now at 3.9.2
2010-02-22 version. littlecms now at version 1.19, pcre at version
8.01.  MiniUPNP now at the miniupnpc-1.4.20100202.tar.gz
distribution. Added lua 5.1.4 DLLs and luac.exe, but they're not used
(yet?). [NM]

- Fix for mantis #2147. Server options are now on a separate page,
like extra options. Reduced size of that box, and tweaked backgrounds
to match. Also, added separate voice chat destination buttons so that
text chat destination & voice chat destinations should be
separate. Removed 'switch server' button from network's nopause escape
screen. [NM]

- Added in two legal screens for startup. They're shown if /nointro
is not present. [NM]

-- b84r released ==============

- Tweaked formatting/font sizes of legal screens. They'll be shipped
in next full version or large changeddata file. Still somewhat tempted
to redo at an even higher resolution (even though I created them at
1024x768, not the older 640x480), because they look a little fuzzy
when blown up to 1920x1200 on my screen here. Upped time spent
displaying those screens slightly, and also clamped them to the
largest 4:3 rectangle that fits on the selected window size/screen
resolution. [NM]

- Tweak for item mentioned on mantis #2177. When most audio options on
page #2 were being handled, they were read & applied, then the new
preference was stored. Flipped to the correct order -- store then
apply. [NM]

- Client connection shows proper IP & port, not '<ADDRESS>' [NM]

- When voice chat is enabled, player(s) that are talking have a '(T)'
after their name. When they're quiet, there's no '(T)' after their
name. Updated pregame, ingame, and escape screens to all check
this. [NM]

- Checks for new patches a max of once every 24 consecutive hours.  If
this is still a little too much, might reduce this to a week. [NM]

- Tweaked code to determine public & private IPs, which is used by
UPNP to determine how and where to redirect to. Version check (now
once every 24 hours, see above) was doing the internal IP
determination; now, any looking for sessions on gamespy will also
determine it. [NM]

- Fix for mantis #2177. Updated cfgs for MP screens, extra options,
etc. [NM]

- Work on mantis #2179 - clients log out what they're sending to the
server. If joining Axe's games fail, I'll need chatlogs from Axe and
the prospective clients, and see if it's mis-sent, or garbled in
transmission. [NM]

-- b84r2 released ==============

- Fix for mantis #2156. Windowed resolutions not in list of monitor
resolutions shouldn't trigger a dialogbox on startup. [NM]

- Fix for mantis #2183. Talker should be identified correctly. [NM]

- Possible fix for mantis #2182. Closing packet transport connections
now go onto a request queue, which should help avoid double-deleting
them. [NM]

- Undid the great time code tweaking, except for a few very small
parts I liked the refactoring. This might fix walker death lag in MP,
etc.  Let me know. [NM]

-- b84s released ==============

- AIP log message 'BuildSubmit failed, line 426' should have far more
detail now if it happens again. [NM]

- Feature adds for mantis #2173/1617, and 2057. Added in bzone.cfg
entries for 'AppendToMyDocs' (must be at the top of the file), and
'SetEditorDirectory'.  Both must be in the ConfigureFileSystem()
chunk, not a sub-chunk. Seems to work in limited testing here. See
bzone.cfg for commented-out examples of their use. [NM]

- (Re)Fix for mantis #1917. Servers will try and note their public IP
more aggressively. Also, IPs of new clients are sent to existing
clients. Forgot that step. [NM]

- Fix for mantis #1882. Forces camera to push settings into DX9 if
changed.  [NM]

-- b84s2 released ==============

- Possible fix for mantis #2186, 2191. Undid the great undo of time
code, i.e. back to the 84r2 code. Did make the Gamespy lib code read
the same cached value as the rest of the code reads, which should
reduce the number of calls into Windows kernel. Might be
faster. Unsure. [NM]

-- b84t released ==============

- Enabled some callstack optimizations (i.e. faster code, but
potentially less info) in net code. Current code doesn't seem to have
the postgame crashes anymore. [NM]

- Moved a lot of strings embedded in the exe to localize.odf. Also
prehashed their lookup keys. Should make for a slightly smaller exe,
and makes me feel like this is done a little better. BZ2's localize
system still royally stinks, though. [NM]

- Possible fix for infinite looping sfx, e.g. the amb_wind/flying sfx,
and possible also 2188.  MW audio load code is now a little more
brute-force about what it does, not trying to be clever. Do test. [NM]

- Possible fix for mantis #2197. Should ramp down the amb_wind/flying
sfx over time when the user lands. [NM]

- Fix for mantis #2196 - tweaked bzshell_multi_team.cfg . [NM]

-- b84t2 released ==============

- First work on a helper thread for Gamespy libs. Created one, running
by default at 100Hz (i.e. every 10ms). All gamespy server query
responses are handled thru this now. Gamespy packet sending will need
to be moved to this, but I don't want to do that all in the same
build.  Running Gamespy packet i/o from a thread is a requirement of
theirs for for server browsing & transport -- they do not want it tied
to game framerate, as pregame and ingame ping times need to be as
accurate as possible. Running at ~10ms per update (might drop this to
5ms) should satisfy their tech requirements for using their libs.
[NM]

- Fix for mantis #2202. Flaremind firesounds should restart if you
re-enter the audible distance to them. This is not a default audio
behavior; have to add special code for each item this needs to be
done. [NM]

- Possible re-fix for mantis #2057. Reads userprefs/pilots file after
applying AppendToMyDocs(). This might cause side effects. Also makes
AppendToMyDocs append, not a subfolder. [NM]

- Possible fix for mantis #2205. If userID follows gamesurge irc name
guidelines, it's used. Otherwise, bzplayer is used as before.
According to http://www.gamesurge.net/faq/Connectivity/ , it says the
rules are:

   Q: Why am I getting a Username Invalid error every time I try to
      connect to GameSurge?

   A: The simple and easy fix for this error, is to edit your IRC
      client's configuration options, and modify your email address to
      something that contains no uppercase letters, no numbers, and no
      special characters other than @. For example:
      "gamesurge@email.com

[NM]

- Fix for mantis #2193 - change team names button toggles on/off w/
setting for teams on/off on the game options page. [NM]

- Possible fix for #2184, or at least a code cleanup. Made the
graphics drop code run off the exact same framerate as what's shown to
the rest of the game & user in top-right on screen. Too many competing
systems trying to measure framerate. Now there's one less. Also
tweaked framerate values for how some prefs go on/off in gameprefs.
Compiled, but untested. [NM]

-- b84u released ==============

- Fix for mantis #2184. Graphics drop code only runs twice a second
now. Also, checks for graphics drop/re-enable item >= 0, which allows
weather to re-enabled once framerate is over 40. Turning on graphics
drop logging would have noted this quickly. [NM]

- Reduced size of data (i.e. bandwidth used) sent to new clients on
joining. Also avoids some unnecessary worldswaps on receiving this
info, which should be simpler. Just waits until the next regularly
scheduled worldswap. [NM]

- Logging of vehicles also waits for next lockstep update to work,
rather than forcing an unnecessary worldswap. [NM]

- Recy variant names may not start with any leading whitespace,
punctuation, or 'The '. Try something like 'A ' or 'An '. And,
generally, a little more humility. [NM]

- Packets asking for missing timesteps should be vastly reduced,
especially when multiple timesteps are missing. The lost timestep
request packet got a lot bigger during earlier builds of pb6 to aid
debugging and traceability, but it's time to consider bandwidth
once again. [NM]

-- b84v released ==============

- Tweaked stack dump code to use stack walker code from
http://www.codeproject.com/KB/threads/StackWalker.aspx , which links
to http://stackwalker.codeplex.com/ . This should allow dumping
callstacks of other threads, which will be useful in a minute. Also
added a '3rdPartyLicenses.txt' to next full build, with legalese about
the 3rd party libs I'm using. Still needs to be filled out for all
projects (e.g. ogg, zlib, OpenIL, etc). [NM]

- Added a watchdog thread to try and get callstacks from game freezes.
This is a separate thread that runs in the background, and if the main
thread appears to be in an infinite loop for > 25-30 seconds, it
should grab a callstack and force a quit. The watchdog thread doesn't
kick in until ~45 seconds after application startup, so the first time
it'd notice any problem is approx a minute and a half after app
startup. If you're experiencing freezes in MP games, please do NOT
immediately try and kill BZ2, but try letting it sit for a bit for the
watchdog to kick in. The watchdog can be squelched by adjusting
GamePrefs.ini::WatchdogThreadEnabled [NM]

- Named threads for debugger, according to
http://msdn.microsoft.com/en-us/library/xcb2z8hs.aspx . This shouldn't
affect anything to end-users, but it helps me track things. [NM]

- Fix for mantis #2209 - pings of 2500 are shown as '???'. This is a
magic value in the low-level code for when it doesn't get a reply. If
the host doesn't have ports forwarded, but is relying on netneg to let
clients in, the low-level code will return a ping 2500 to them. Most
games w/ ping 2500 ought to be joinable, but I could be wrong. [NM]

- Fix for mantis #2210. Broken by recent breakout of game options to
separate page. Path to UI elements changed. [NM]

- Added in /mute , /unmute and /showmute chat commands. These behave a
lot like /ignore, /unignore and /showignore , but the ignore series is
for text chat messages, and mute is for voice comm (if enabled). Added
this and a few more chat commands to the /help list as well. [NM]

- Added in console commands network.session.guiignore,
network.session.guiunignore, network.session.guimute,
network.session.guiunmute.  Not hooked up in any .cfg files, but would
be great if someone did this. [NM]

- Fix for mantis #2055. Added ability, on sound options page #2, to
set the audio device used for non-MP voice playback. Seems to work in
limited testing here. Changing this setting requires exiting BZ2 and
restarting. [NM]

-- b84w released ==============

- Possible fix for occasional shell darkenings - made change for 2055
above safer by only triggering the "can't change ingame" dialog when
the user clicks on things. When I clear & refill those listboxes, I
suspect that was triggering a device change. [NM]

- Fix for mantis #2212. Watchdog should not get a false positive on
credits movie or any other fullscreen bink movies. [NM]

- Probable fix for mantis #2214. Did work to try to make sure watchdog
thread won't step on main thread's timing values, and vice versa. This
might also help 2216. Not sure. [NM]

- Possible fix for issue noted on boards. Nuked all redbook (i.e. CD
audio) code, including code to set windows mixer volumes before
playing and hopefully restore them on exit. Ogg music still seems to
play ingame. With my recent track record, this'll probably have an
effect noticed in 3 weeks. [NM]

-- b84w2 released ==============

- More work on mentis #2214. Switched back to old clock function for
keyboard repeat code. [NM]

-- b84w3 released ==============

- New function added above to make sure threads didn't step on main
thread's timing values wasn't being called. Could have made things
worse. Fixed. Maybe 2214 and 2216 will be better now. [NM]

-- b84w4 released ==============

- Bunch of small fixes for 2217, possibly others: (1) battlezone.log
stays open on app close, in case any crashes happen after the logfile
is requested closed. (2) Watchdog thread exits quickly if app shuts
down before the initial 45-second quiet period. (3) Tweaked callstack
log line format slightly. [NM]

- Fix for mantis #2213. Local player's entry in team lists should have
the '(T)' flag for speaking when they talk. [NM]

- Reduced timeout between "get the new patch!" version checks to every
8 hours in private builds, increased check to every 2 days in public
builds. [NM]

-- b84w5 released ==============

- Fix for mantis #2218. Fix will be shipped next full build. [NM]

- Possible fix for mantis #2188/2215. All craft/persons store a sfx
handle for 'misc' uses. Moved all short-term sfx not stored anywhere
(powerup give sfx, plus deploy/undeploy sfx) to be stored in there. On
save/restore, sfx are checked if they're still valid, and killed if
not. Might help with things. Not sure. [NM]

- Work on mantis #2220/2225. (Bugs marked as private, so most of you
probably can't dig in.) Added some more files to asset checker. If
host modifies them, and client doesn't, then bad assets time. Also
tweaked DLL code to check various things before applying an ivar. [NM]

- Added Gameprefs.ini::ShowWarningOnOptionsRequireRestart , as some
testers still report they get darkened shells on startup in some
modes.  Try setting this to false. And please file a mantis, not just
on the forums, ok? [NM]

- Tweaked bzone.cfg handed out. AppendToMyDocs must appear under
ConfigureFileSystem(), not under ConfigureStream(). Uncomment the
example line in the provided file to use. [NM]

- More work on 2217 - more work to keep battlezone.log file open as
long as possible, even if it means it's an opened file that Windows
has to close after the app exits. [NM]

-- b84x released ==============

- More work on mantis #2220/2225. Not going to post details of how/what
I'm doing. [NM]

- Work on mantis #1993. Pulled out tap code to a helper class. Then,
made both PoweredBuildingClass and TurretCraftClass use that helper
class. So, it should be able to read from odfs:

[PoweredBuildingClass] or [TurretCraftClass]
PoweredByTaps = true
powerName, powerName1 .. powerName8 = ""
AutoBuildTap1 .. AutoBuildTap8 = true

   Shouldn't break savegame compatability w/ old versions. [NM]

- Work on mantis #2038. Added to ODFs:

[APCClass]
UseRecallSoldiers = true
RecallSoldiersTimeout = 30.0 // pre-pb6 defaulted to 5.0

   UseRecallSoldiers is a way to turn off the periodic work to get all
soldiers to stand in a star pattern around the APC. Toned down the
amount of time spent doing this. Also added

[CraftClass]
DoBlastUsesFields = true

   If this is false, then it skips various object interaction checks
when trying to do a blast attack. Updated issold.odf to have this
set to false. [NM]

- Work on mantis #2038. Optimized some particle effects code, I think,
by doing some hinting to the compiler that some items will never
alias. [NM]

- Work on mantis #2038. Top function in bzone.exe, according to the
profiler, in the savegame, is the skinning (w/ optional unit chroming
code). Set MaxChromeDistance = 80 in issold.odf just in case. That
skinning code could still probably use some work to detangle multiple
levels of indirection, but it's not something I feel like tackling
today. [NM]

- Removed unused constants from DLL source Shared/StartingVehicles.h
[NM]

- Probable fix for AV mentioned in mantis #2226. [NM]

- Fix for mantis #2144. Added to ODFs

[APCClass]
HovercraftPhysicsWhenUndeployed = false

   If true, acts more like a hovercraft when undeployed (i.e. flying).
[NM]

- Fix for mantis #1502. Added to ODFs
[BlinkDeviceClass] or [CannonClass] or [DispenserClass] or [LauncherClass] or [SalvoLauncherClass] or [SatchelPackClass] or [TargetingGunClass]
InitialShotDelay = 0.0

   If > 0, this sets the initial delay the trigger must be down before
the first shot goes out. Values <= 0 are treated as 0. Note:
'satchelpack' ODFs read [DispenserClass]::shotDelay , but
[SatchelPackClass]::InitialShotDelay is read. Not sure why it reads
one param from the wrong class.

   This change is pretty intrusive, and could cause problems. Please
test examples of weapons under all these classes. For other things,
the parameters [FlareMineClass]::triggerDelay &
[SprayBuildingClass]::triggerDelay parameters seem to do the same
thing. [NM]

-- b84y released ==============

- Possible fix for mantis #1502/2229. Made the logic more brute-force
to do an initial delay, at the cost of bulking up savegames slightly.
Affected classes: BlinkDevice, Cannon, ChargeGun, Dispenser, Launcher,
MachineGun, MultiLauncher, SalvoLauncher, SatchelPack, TargetingGun,
TorpedoLauncher.  This change is pretty intrusive, and could cause
problems. Please test examples of weapons under all these classes. [NM]

- Fix for mantis #2231 - tweaked bzescape_graphic[2].cfg. [NM]

- Update Zlib to v1.2.5, PCRE v8.0.2, MiniUPNP client source code from
miniupnpc-1.4.20100418.tar.gz . [NM]

---- 1.3 beta 85 (version 1.3.60.85) released=======

- Fix for mantis #2235. Full build installer doesn't nuke binkw32.dll
from the root directory, even though it's now loaded from the AppDLLs
folder. Instead, hides it, along with a few lesser-used files. Added a
few files to the nuke list, such as lgtex.pak, mdtex.pak, and
texture.dat. The 1.3 full build installer only checks for bzone.exe
and data.pak files -- they don't have to have valid contents, just
need to exist, period.  Helper applications checking for BZ2 should do
the same. Unfortunately, source code for some seems to have been lost.
Thus, the compromise of hiding a now unused file. [NM]

- Fix for mantis #2237. Changed text that only mods that replace out
parts of the UI should see. [NM]

- Fix for mantis #2236. Treads are now lit. However, the brightest
parts are those on top, right under the fenders. That's mainly because
most map lighting is mostly overhead. Not sure this is an
improvement. [NM]

- Fix for shell getting obscured by the "changes to certain options
requires a restart" dialog. Now, it should only be triggered when an
option is changed while on the graphics/sound options pages. [NM]

- Possible fix for mantis #2194. Shell bitmaps are loaded w/ only 1
mip, just like pb5.1. (Changed on 12/19/2009, part of bootup
legal/logo screens.) It seems like some graphics cards cheat and try
and show a smaller mip than the actual pixel area onscreen would use.
Giving it only 1 mip to work with may avoid that. [NM]

- Possible fix for mantis #2238. Code changes for 2220/2225 moved
around. [NM]

-- b85a released ==============

- Moved all packet I/O to the gamespy thread that was recently added.
This is a fairly invasive and risky change, but a required one, per
gamespy requirements docs. This should make in-game pingtimes more
accurate, as pings are checked for every 10ms. Might drop this to 5ms
later. Added in a bunch of CRITICAL_SECTION guards that hopefully
shouldn't get in the way of framerate, but keep an eye on this. Also,
added in a bunch of thread checks -- various places in the code will
check if they're in the wrong thread, and bomb out if preconditions
fail.  Passed limited testing here. If this build is DOA, go back to
85a. [NM]

-- b85b released ==============

- Moved NatNeg (NAT Negotiation) to thread. Can't easily test this on
my LAN. [NM]

-- b85b2 released ==============

- Broke up large CRITICAL_SECTION for gamespy thread into 4 smaller
ones. Using InterlockedCompareExchange to make the CPU handle this at
the instruction level, not a call to the Win32 kernel. [NM]

- Mutex changes again. Added Boost 1.42.0 to BZ2's source code base,
at the cost of ~160MB disk space for the SVN pull of the source code
base. Using boost::mutex for all mutexes in main BZ2 source that had
been using the Interlocked* functions. (These mutexes are mostly in
the network code, but also in the OGG playback code.) The boost
approach is supposed to be faster than either CRITICAL_SECTION or
(Interlocked* + Sleep(0)) that I'd been using from dlmalloc. Will
probably edit dlmalloc next to use boost::mutex. [NM]

- Updated Readme13.rtf, as apparently 'AUDIO' looked funny on Word on
Windows w/ Turkish language pack installed. Wordpad showed it
correctly. (I default to viewing rtf files in wordpad; don't have Word
past 2003 or any language packs installed here.)  I'm just guessing at
a possible fix. [NM]

-- b85b3 released ==============

- Moved dlmalloc to use boost::recursive_mutex as threatened. [NM]

- Client voice mutes -- in general, by turning off MP voice playback
or setting MP voice playback volume to 0, or specifically by /mute ing
a player -- are sent to the server. The server shouldn't send packets
to clients that don't want it. This'll help reduce
bandwidth. [NM]

- Gamespy thread now executes at 5ms frequency (i.e. 200 times per
second) by default now. Made sure player join/leave operations are
done w/ gamespy thread suspended during the duration of those events.
Gamespy voice samples at 20ms (i.e. 50 times per second). Voice was
sampling at 10ms for a while now. [NM]

-- b85c released ==============

- Edited message in battlezone.log file when texture can't be created
to point people at the latest graphics drivers. Some n00bster who has
delusions of computer adequacy can't even manage to figure this one
out. [NM]

- Probable fix for 2244. Message exploit that's been there since 1.0,
I believe. [NM]

- Full build installer won't create 'logs' or 'gamestats' folders in
the install directory.  Waits for BZ2 to be run to determine if these
should go under $MyDocs or relative to the BZ2 folder.  [NM]

- Fix for some lag recently introduced. Was only sending game data
about once a second, rather than as generated. [NM]

- Possible fix for occasional deadlock in waiting for gamespy thread
to complete some actions. Reported on forums, not mantis. [NM]

- Fix for mantis #2246. Made text fit in space alotted in
*sound2.cfg. [NM]

-- b85c2 released ==============

- Rebased all helper DLLs built as part of the BZ2 buildprocess, once
again. This should slightly decrease initial load times. Have a helper
.bat file to make iterating on changes pretty quick. New DLLs will be
out next full version. [NM]

- Possible fix for AV in ICEdit::ReplaceSelectedText(). [NM]

- Possible fix for AV in mantis #2247. Should not try and render a
frame when the DirectX device has been lost. There are other issues
noted in the log, such as a quit-to-shell disconnect from server that
shouldn't happen, or at least shouldn't happen w/o a lot of logging as
to why. Will need to see server's logs to see why. [NM]

- Proper fix for mantis #1942 - was calculating a distance between
each terrain chunk and the middle of the camera's view volume, rather
than distance between camera's position and terrain chunk
position. This will probably make the medium-terrain faster, as more
chunks will be outside of the boundary for drawing all texture layers.
On the downside, this boundary is now closer, so it'll be more
visible. This should also help sort terrain pieces correctly
front-to-back relative to the camera, so that graphics cards can draw
them in a more optimal order. [NM]

- FamilyNode::Load marks matrix and sphere as dirty, ensuring that they
get updated properly.  This fixes passive objects (buildings) that get
moved around by external forces (seismic wave) in multiworld. [Ken]

- Replaced numeric blend mode in ColorRenderClass with a defined
enumeration value for ease of comprehension. [Ken]

- Fixed broken SliderDecImage and SliderIncImage processing in
ICSlider::Setup. [Ken]

- Fixed broken UseSlider in ICCheckList::Setup.  [Ken]

- Did a lot of work to the terrain rendering code. It now has levels
of detail, a feature that can reduce the number of triangles rendered
onscreen. This is enabled by default, and with different values for
when LODs should be switched. These can be set from the map's .trn
file:

[NormalView]
HeightErrorLimit0 = 0.00006
HeightErrorLimit1 = 0.00002
HeightErrorLimit2 = 0.000008
ColorErrorLimit0 = 0.1
ColorErrorLimit1 = 0.01
ColorErrorLimit2 = 0.001

   They can also be tweaked in realtime from the console:

terrain.heighterrorlimit[0..2] [value]
terrain.colorerrorlimit[0..2] [value]

   Note that higher values for these make it more likely to consider
switching to the LOD'd terrain. Conversely, setting the value to 0
will disable this system. (When in editor view, it temporarily sets
the value to 0.) I'm seeing at least 25% fewer triangles drawn (but
more drawcalls done) here with the system at the above values. [NM]

-- b85d released ==============

- Fix for mantis #2250 - watchdog thread is suspended when a Windows
file dialog (i.e. open/save file) is present. [NM]

- Work on mantis #2263 - far more logging if it happens again. [NM]

- Work on mentis #2259 - made the main thread appear more active to
the watchdog thread in two places shown in the callstack. The watchdog
thread shouldn't be firing off the "uhoh!" dialog box w/o approx 25
seconds of inactivity. If BZ2 is inactive for that long, there is a
problem.  If happening ingame, I really encourage modders to add more
items to the svar8 checkfile so that assets are preloaded and asset
checked. [NM]

- Work on mantis #2266 - notes main thread id earlier. Still doesn't
fix the underlying issue, which is a DirectX error the second
run. This fix should allow the DirectX error to be logged,
though. [NM]

- Fix for mantis #2027, AV after DirectX error. DX does not like
values too small to be reasonable. [NM]

- Fix for mantis #2262 - dynamically increases size of tiled sky tiles
if there would be too many to fit in an index buffer. [NM]

- Fix for mantis #2243. Modders may not tweak certain files. I mean it.
[NM]

- Asset changes. Fix for mantis #2254. Tweaked
bzshell_editor.cfg. Mantis 2255 - GreenHeart update (b6). Mantis 2258 -
dropzone trn map size changes. [NM]

- Possible fix for mantis #2252. Changed audio call functions. Note:
try a distinctive sound effect like "ncom2.wav." This sound may be
faint, and something more distinctive might be more noticeable. [NM]

- Possible fix for mantis #2245. Items w/ canRescue = false will never
eject a pilot at the end of a rescue task. Made a few more vehicle
classes (recycler vehicle, service trucks) default this flag to false.
[NM]

-- b85e released ==============

- Fix for mantis #2271. Resets all ivars before reading a map's .inf
file.  Made the default ivar contents a helper function, cleaning up
4-5 bits of duplicated code. [NM]

- Changed color error limits for terrain LODing. Terrain LODing should
happen less at higher screen resolutions, which would make it more
apparent. Alpha layers are counted for error when considering
LODing. Also made a terrain console section, moved commands under
there. Adjusted changelog above to show current limits. I'd *STRONGLY*
encourage modders to not put anything in their map's .trn files for
LODing until I'm a bit closer to happy with things. I may change
formulas or default values for a bit. [NM]

- Coalesced 'glue' terrain patches, found between high & low LOD
patches, when possible. Have a large table of the most commonly
encountered patterns, and attempts to coalesce when possible. This
should reduce the number of drawcalls to DirectX, which should help
performance. [NM]

-- b85e2 released ==============

- Possible fix for mantis #2275. Added what is -- to me -- a redundant
NULL pointer check. Looking at the disassembly of the old code, it
absolutely did a NULL pointer check before executing the code. But,
the crashdump says otherwise. So, do it again. [NM]

- Fix for holes in terrain when set to med/high. Forgot to implement a
function for 4-layer terrain glue coalescing. [NM]

- Tweaked error limits for terrain coalescing, again. Are you
remembering to not put any values in your .trn files until I'm done? [NM]

-- b85e3 released ==============

- Fixed bug on ATI cards -- was giving it not enough verts to
DrawIndexedPrimitive.  This was causing holes in terrain. My main box
is nvidia, and it worked just fine, even though the ATI behavior is
technically more correct. Just legalistic. [NM]

-- b85e4 released ==============

- Changes to svar5 (recycler variant) are logged to the chat window, just
like map changes. Requested by many over the years. [NM]

- If only 1 audio buffer possible (including, but not limited to,
Vista/Win7), hides hardware audio buffer location options on sound
options pages. If 3D is not possible, hides all options related to
3D. [NM]

- Major rewrite to the way multiworld worldswaps are
done. MissionHandler.cpp now has a set of actions it can do (render,
update lockstep, update build world), and it picks among them by
priority and estimate time left to keep framerate up. Did fix some
possible inefficiencies in this system, so it might run slightly
faster. Starting build worlds can still be expensive, might need to
investigate more. Not sure how much can be done.

   Also found a 3-5x multiplier on MWF, so that a MWF of 10 would
start a copy every 3-5 seconds at 10tps. Eliminated that. This might
increase load for slower systems, but slower servers ought to be able
to set MWF to 30 to get the same behavior as before. (Not sure if I
should do a 3x multiplier by default -- DM MWF of 12 and ST/MPI MWF of
30.) Also made it so that in IA/MPI, it should delay a multiworld
update until just after the AIP code runs, so the AI should be a
little smoother.

   Do test, especially on slower machines. Basically, the reduced
inefficiencies should help. But, doing the worldswaps 3-5x as often is
likely to quite add overall load. [NM]

-- b85f released ==============

- Allowable range on the 'multiworld.frequency' adjusted from [1..20]
-> [1..40]. This is because 1.3pb6 is 3x finer-grained for MWF than
-1.0-1.3pb5.1. [NM]

- Updated multiworld worldswap code. If the user alt-tabs away, it
turns multiworld off until the user returns. Also, if MW is on, the
lockstep world updates are batched up, so that the cost of switching
to/from the lockstep world are amortized over larger chunks. Also
boosted priorities to sure that updating the lockstep world isn't
starved for time. This makes the save from mantis 2285 better in
debug. [NM]

- Added a line to game.histogram, just above the network stats. It has
3 entries, 'Vis' 'Lock' and 'Rend', each with 2 numbers -- the number
of ms spent in that job, and the second is the # of times that job was
called. These stats are updated every second. 'Vis' is the time spent
updating the visual world, 'Lock' is the time spent updating the
lockstep world, and 'Rend' is the time spent rendering. Note that the
numbers will usually add up to a number a little less than the 1000ms
per second, as there's some areas like updating inputs, audio, etc
that are not part of the MW job system and therefore tracked for
time. [NM]

-- b85f2 released ==============

- Possible fix for #2297. Undid change made for 85f2, now does NOT
turn MW off when alt-tabbed. Made build world just flush and redo if
it's more than a second behind the lockstep world. This should help
catch up faster if things get really wonky. [NM]

- More logging on mantis #2293. Everything looks like it should work.
But, it's not. If it happens again, will need logs made w/ this
version or later. [NM]

- Possible fix for mantis #2274. Upped logging just in case it happens
again. [NM]

- Possible fix for mantis #2257. Doubled size of pathfinding's heap.
Still, it seems like some maps make that code very unhappy. [NM]

- Fix for mantis #2270. Added gh update b10. [NM]

- Restored the tester's version of localprefs_bzone.ini to do LOTS of
logging about lagouts, etc. Went missing in b84 -> b85
transition. [NM]

- Possible fix for mantis #2192. If happens again, should provide some
logging of who pushed data onto the stack. [NM]

- Max MWF settable in shell should be 40 now. Remember, pb6 is 3x more
sensitive, so a (mwf of 10 in pb6) == (mwf 30 in 1.0-1.3pb5.1) [NM]

-- b85g released ==============

- Even more logs for 2293/2299. Even more logging. Still can't figure
out the deadlock from the logs. [NM]

- Fix for mantis #2294. Added to ODFs:

[PopperClass]
TargetHidden = -1 // 0 = no hidden, 1 == only hidden, -1 = all
TargetInteractable = -1 // 0 = no non-interactable, 1 == only non-interactable, -1 = all

[NM]

-- b85g2 released ==============

- Fix for mantis #2264. Join by IP now has base port of :17770 by
default, as BZ2 1.3pb6 only uses one port for both gamespy and BZ2
traffic. If the port is omitted from the line entered in JoinIP, then
the default baseport specified in *prefs.ini is used.  [NM]

- Began using lua in BZ2. (Needed some quick refresher on lua as I'm
going to be using it some at work.) For shell, game .cfg files,
referenced by the exe (e.g. 'bzgame_moves.cfg'), it now looks for a
.lua file of the same name, e.g. 'bzgame_moves.lua'. That lua file
should have a function of this sort:

function DetermineCfgFile(width, height)
end

   This function can do what it wants, but should return a string
which is the .cfg to use. Width and height are numbers, and are the
screen dimensions, in pixels. A more complex lua function for
'bzgame_moves.lua' is as follows:

function DetermineCfgFile(width, height)
  if(width <= 640) then
    return "bzgame_moves_small.cfg"
  else
    return "bzgame_moves_med.cfg"
  end
end

   Note: what lua returns is sanity checked. If the lua file doesn't
exist, or what the lua file returns doesn't exist, then the old
codepaths of checking for "%s_%dx%d.cfg" is used. What lua returns, if
that file exists, is not further checked for the resolution-dependent
filenames.

   I expect modders should be able to make small/med/large versions of
the ingame UI now, and not have to try and make one file per possible
resolution.

   I'd also be curious to see if someone can use the source code
decorating things like tolua/tolua++/luabind (see
http://www.gamedev.net/community/forums/topic.asp?topic_id=306982 ) to
generate out all the boilerplate C/C++ side code to expose all the
scriptutils.h functions to lua. If that happens, it wouldn't be hard
to make mission 'dll' files simply be lua files. Or make all of the
AIPs lua. AIPs could certainly benefit from becoming turing
complete. [NM]

- Thermonuclear (or just lua-sized) flyswatter for mantis #2287,
2290. Added, to AIPs

[Plan#]
planCondition = "Lua"
LuaFunction = "" // Fill in name of lua function.

   If the 'planCondition' is "Lua" (case-insensitive), then that is
the one and only condition processed on that plan. The AIP code will
look for a .lua file with the same base name as the .aip file
(i.e. "stock13_ii0.aip" -> "stock13_ii0.lua"), and load that lua file
when the AIP is switched. [Note: separate lua instance/namespace from
the .cfg switcher above, don't think you can go crazy here.] When that
.lua file is loaded, it calls this function in the lua:

-- Called on lua file startup. team is the team # (0..15) of the team
-- that this aip/lua is run on
function InitAIPLua(team)
  -- Might want to scribble the team # into a global, e.g. uncomment this line:

  -- gTeam = team
end

   Each time the condition is checked, it calls the function specified
in the aip's 'LuaFunction = ""' line. (If the LuaFunction remains an
empty string, the condition will fail 100% of the time.) Assuming the
line is 'LuaFunction = "Plan1Condition"', it will call

function Plan1Condition(team, time)
end

   The function takes two parameters, team and time. Team should be
the same as in InitAIPLua. Time is the # of seconds since mission
startup. This function should return 1 or 2 items. (Yes, multiple
return values are allowed from Lua.) First returned value should be a
boolean (true|false) that says whether the conditional passed, and the
second (optional) return value is a string to print in the AIP log.
For example, could write the above function as

function Plan1Condition(team, time)
    -- Condition is always true
    return true
end

or

function Plan1Condition(team, time)
    if(time > 60) then
	    return true, "More than 1 minute has elapsed"
    else
	    return false, "Less than 1 minute has elapsed"
	end
end

   The second version of the function will log to the aiplog file.
Any syntax errors or the like in your lua file/function will also go
to the aiplog file. 

   Obviously, the conditional function will want to know more the team
& time. Thus, there's a bunch of callbacks that can be called. All of
these are in the 'AIPUtil' hierarchy:

AIPUtil.print(team, str)
AIPUtil.GetScrap(team, bCheckAllied)
AIPUtil.GetMaxScrap(team, bCheckAllied)
AIPUtil.GetPower(team, bCheckAllied)
AIPUtil.GetMaxPower(team, bCheckAllied)
AIPUtil.CountUnits(team, classStr, teamMatchStr, useProvides)
AIPUtil.CountCraft(team, classStr, teamMatchStr)
AIPUtil.PathExists(pathnameStr)
AIPUtil.PathBuildingExists(pathnameStr)

   AIPUtil.print takes 2 parameters, the team # it's being generated
for, and a string. That string is printed to the AIP log file. 

   The Get[Max]Scrap/Power functions are similar - they take a team #,
and a boolean as to whether it's for that team only, or for all allied
teams. Thus, AIPUtil.GetScrap(1, false) will get the current scrap for
team 1, only. AIPUtil.GetScrap(1, true) will get current scrap for
team 1 and all allied teams. (i.e. thug recycler variants). If a bad
team # is passed in, it'll return nil, not a number.

   AIPUtil.CountUnits and AIPUtil.CountCraft are similar. The team #
should be as above. CountUnits() requires a valid game object class
(e.g.  "ivrecy") in the 'classStr', while CountCraft() can take a
valid game object class or an empty string to count all units. For
teamMatchStr, that parameter must be "sameteam" or "friendly" or
"enemy", and that restricts the search to teams of that type. The last
parameter on CountUnits(), 'useProvides' is a boolean as to whether
provides are also checked. Most of the time, CountUnits() will be more
flexible, allowing provides. CountCraft() doesn't check provides, and
could be a little faster. If a bad parameter is passed in to this
function, it'll return nil, not a number.

   AIPUtil.PathExists() just checks if a path exists by that name,
returning a boolean. AIPUtil.PathBuildingExists() returns nil if the
path doesn't exist, and if it does exist, a boolean as to whether
there's a building at that spot.

   Note that all logical operations (and, or, not) should be done in
lua, not the AIP file. Given all that, here's a sample, more complex
AIP lua conditional:

function Plan1Condition(team, time)
    -- Get my scrap in a local variable.
    local myScrap = AIPUtil.GetScrap(team, true)
    if(myScrap > 60) then
        AIPUtil.print(team, "Scrap for team " .. team .. " = " .. myScrap)
    end

	local gspir1Exists = AIPUtil.PathExists("gspir1")
    local cpuHasFactory = AIPUtil.CountUnits(team, "VIRTUAL_CLASS_FACTORY", 'sameteam', true)
    local humanHasBomber = AIPUtil.CountCraft(1, "ivbomb", 'sameteam')
	if(((cpuHasFactory >= 1) and (humanHasBomber >= 1)) or (myScrap > 90) or (not gspir1Exists)) then
        return true, "Plan1Condition true"
    else
        return false, "Plan1Condition false. hasFact=" .. tostring(cpuHasFactory) .. " hasBomber= " .. tostring(humanHasBomber)
    end
end

   Finally, some notes on things. Lua allows you to store things in
globals between function calls. Right now, there is *NO* functionality
to load/save any of this. So, I'd really recommend against doing this,
as it won't be distributed on a join/resync. Also note that I've
explicitly disabled some functions from the standard sets of lua
functions, such as everything under the 'io.' and 'os.' hierarchies.
Just trying to make sure that end users are somewhat better protected
from malicious mods.

   As to learning lua, here are some references:

Official site: http://www.lua.org/
 - Documentation at http://www.lua.org/docs.html , including the
   reference manual at http://www.lua.org/manual/5.1/

Visual Studio 2008/2010 plugin for syntax coloring, error checks:
  http://vslua.codeplex.com/
  - Note: this requires a non-express (i.e. pay) version of Visual Studio.

SciTE IDE for Lua: http://code.google.com/p/luaforwindows/

   Various other editors have lua syntax highlighting. 

   If you want to just check lua files for syntax errors, then the
luac.exe installed w/ BZ2 in the AppDLLs folder is useful. Open up
a command prompt, change dir to the AppDLLs folder, and run

luac -p test.lua

   The -p means 'parse' for errors, and 'test.lua' is the filename
to check. You could also do

luac -p ..\addon\aips\test.lua

[NM]

- Added Gameprefs.ini::KeepHistogramLogfile . If on, data is currently
logged twice per second, even though some data is refreshed only once
per second. (network stats, update vis/lock/render stats) Writes to a
.csv file so that Excel or your spreadsheet of choice can open it
rather quickly. That's just an ascii file w/ commas between data. I
think I got all the columns lined up with the headers, but I could be
wrong. If off, it'll be consistently off at least. [NM]

-- b85h released ==============

- Fix for missing comma in list of DLLs. Now properly loads that in
release.  [NM]

- Added FPS, alt-tab info to histogram logfile. [NM]

- Restored Gameprefs.ini::NetworkThreadPriority and
NetworkThreadAffinityMask.  Might help w/ some of the logs in 2300
noting an excessive ping kick with high variation/jitter in the
pings. Network thread might be getting starved for time on single-core
boxes. [NM]

- Defaulted MWF to 20. This is still more efficient than
1.0-1.3pb5.1's mwf, as the old code was 3x coarser in measurements.
The new default of 20 is equivalent to an old-MWF of 6.67. [NM]

-- b85h2 released ==============

- Added Render*.cfg::AllowScaleBackdrops . See comments above it. [NM]

- Per http://www.bzuniverse.com/forum/index.php/topic,11398.0.html ,
*CUT* the ability to read non-.dxtbz2 textures. (There's also been way
too many updates to all the helper image-reading libs; this helps cut
down on exposure.) If a texture exists, but is not in .dxtbz2 format,
a very obvious (green/purple checkerboard w/ yellow text) replacement
texture is used instead. I should have done the same for ta5/pb5.1;
better late then never. [NM]

- Fix for mantis #2276. Also added graphics option for terrain
lodding, including graphics autoadjust settings. [NM]

- Terrain size not a multiple of 32 console message now printed in
release builds too. The mantis 2303 map is guilty of this. [NM]

- Possible fix for some stuttering introduced in the recent MW
rewrite.  Had a test backwards, so the lockstep updates were getting
starved until the emergency catchup code ran. Now, it should do some
smaller pieces occasionally. [NM]

-- b85h3 released ==============

- Textures not converted to .dxtbz2 will get a battlezone.log file
entry about them. Search for 'dxtbz2'. [NM]

- Gamespy thread runs at 200Hz (i.e. 5ms between runs) on multi-CPU
(or multi-core) systems, and 100Hz (10ms between runs) on single-CPU
systems. Just trying to balance out the load. [NM]

- Fix for infinite loop in
MissionHandlerUpdateLockstepAction::GetWorkPriority(), caught by
watchdog thread. (Finally, that thing pays off w/ a useful
callstack). [NM]

-- b85h4 released ==============

- Fix for mantis #2304. Suspended the watchdog thread while
editor-specific dialogs are up. [NM]

- Timeskews weren't reliably being sent to clients under certain
cases. Fixed. This, along w/ the stuttering fix above, should help fix
mantis #2307. [NM]

- Deleting players who have left should be a bit more reliable.  FIXME
messages sent when things aren't fully as expected. [NM]

-- b85h5 released ==============

- Added to histogram logfile: simulation counts for the various
worlds. [NM]

- Threw in the towel on the job system for MW. Back to the old code.
Did remove the 3x multiplier on MWF, at least, so default MWF is now
20. [NM]

-- b85h6 released ==============

- Switched lua to use the same memory allocator as the rest of BZ2,
dlmalloc. Also added in some more lua callbacks:

BZ2Util.dofile()
BZ2Util.GetVersion()

   BZ2Util.dofile() takes one string, e.g. "foo.lua", and tries to
load and execute it. Returns a boolean on file loading
success. Returns nil if not passed a string. dofile() will read a lua
file from any BZ2-supported location, such as inside a .pak file or
loose under an AddDirRecurse() location. dofile() is useful for shared
functions used by various file(s); anything in the loaded lua file is
parsed -- which includes executing, if there's any loose statements
outside of functions.

   BZ2Util.GetVersion() ignores any/all arguments, and returns one
string, the same string that's shown at the bottom of the pilot login
screen. [NM]

- Fix for mantis #2312. All deployed deployables (and derived classes)
periodically check if a collision raycast from a bit above them hits a
point higher than their current position. If so, they're popped up to
the new height. I hope this doesn't break turrets in tunnels or the
like.  Without a real collision system, it's really hard to tell if
things are within others. [NM]

- Fix for mantis #2305. Removed backdrop scaling. Marginal benefits
don't really outweigh the bugs. [NM]

- Vastly reduced cpu time spent by BZ2 when alt-tabbed in shell.  The
sleep code was executing only when the window was visible; fixed it so
that it works w/ window present & alt-tabbed. [NM]

- Removed Gameprefs options for NumConcurrentJoiners, keepalive &
nagle, as those are TCP-only.  Flipped option to make UPNP quieter by
default as most users wouldn't know how to read it. Added
Gameprefs.ini::ShowIPOnJoin. [NM]

- Change to the skydome rendering code. Did extra work to center it
around the current camera position, each render cycle. This needs to
be the case because the dome is rendered around the player and the
player is never able to punch thru it by moving. BZ2 has always done
this. [NM]

- Fix for mantis #2317. Players in excess of map limits should be
auto-kicked when the server switches maps. [NM]

-- b85i released ==============

- Some work on mantis #2321. Put sanity checks on the parameters
passed into a memcpy. Didn't get the top few lines of the AV log that
would tell me a little bit more info. [NM]

- Fix for mantis #2322. Forgot to set up error logging correctly. [NM]

- Fix for mantis #2309. Squelched message. Seems to do the right thing
afterwards. [NM]

-- b85i2 released ==============

- Giblet upgrades. Should be in the next full build, or DXTGen build.
  - Independent JPEG Group's JPEG source version 8b, from http://www.ijg.org/
  - libpng version 1.4.3 from http://www.libpng.org/
  - libtiff 3.9.4, 2010-08-13 version from http://www.remotesensing.org/libtiff/ 's CVS instructions
  - PCRE 8.10, from http://www.pcre.org/ 

(If you don't understand the term 'giblets', see
http://blogs.msdn.com/b/sdl/archive/2008/01/04/recent-symantec-and-ibm-vulnerabilities-giblets-banned-apis-and-the-sdl.aspx
http://blogs.msdn.com/b/larryosterman/archive/2008/03/07/the-trouble-with-giblets.aspx
) [NM]

- Fix for mantis #2313. Added, to ODFs:

[DamageFieldClass]
TeamFilter = 0 // 0 = all teams, 1 = same team only, 2 = allies, 3 = enemies, 4 = not same team
DamageOwner = false // If false, weapon owner won't be damaged. True = yes.

   Note that the DamageOwner flag, and not TeamFilter affects whether
the weapon's owner is touched or not. TeamFilter is applied to all
nearby objects except the weapon's owner. Compiles, but untested. (No
savegame attached to bug.) [NM]

- Possible fix for mantis #2315. Aircraft with ODF specifying
AlwaysDeployed = true should start off deployed. Compiles, but untested. (No
savegame attached to bug.) [NM]

- Fix for mantis #2302. Added, to ODFs

[WeaponMineClass]
TargetHidden = -1 // 0 = no hidden, 1 == only hidden, -1 = all
TargetInteractable = -1 // 0 = no non-interactable, 1 == only non-interactable, -1 = all
TeamFilter = 3  // 0 = all teams, 1 = same team only, 2 = allies, 3 = enemies, 4 = not same team

   Code should be substantially the same as mantis #2294 on
[PopperClass] mentioned above.  Compiles, but untested. (No savegame
attached to bug.) [NM]

- Fix for mantis #2319, 2295, 2323 -- please see the sticky post about
including full paths on submitted assets, thanks. [NM]

- Fix for mantis #2251. Kick reasons posted in BZ2
irc. #2208. Recolored BZ2 irc text to make topic more noticeable. Also
delayed topic's printing so that it appears after global
spammage. [NM]

-- b85j released ==============

- Upped # of server ivars from 64 to 128. Per-player ivars
(i.e. civars) extend past that. Mods that use a lot of ivars should
start at 127 and work down, because those added for general use will
continue to be creeping up. As always, see the vars.txt included in
the BZ2 DLL source for what vars are used by the engine. [NM]

- Pregame game options page has a use for ivar33 (MP voice on/off --
server's preference will affect everyone in the game), and ivar34
(alt-tab tolerate in seconds). [NM]

- Implemented voice chat Push To Talk mode. If push-to-talk is enabled
(the default), as long as the 'v' key is down ingame, your microphone
will be hot. The key binding for the 'v' key is in bzinput_common.cfg;
bumped internal version number in userprefs file to force that to be
re-read. End users should be able to rebind via the ingame menus --
look for Options -> Instant -> Command -> MP Voice: Push To Talk. (2nd
item in right column). Didn't see any obvious place to put it in those
menus, so that'll have to do. [NM]

-- b85j2 released ==============

- dlmalloc info for how much memory was allocated via it printed in
exception handler. Just a bit of possibly useful info when tracking
things down. [NM]

- Added GamePrefs.ini::AudioWhenAltTabbed . See comments above it.
[NM]

- The 'upgrade now' dialog when an obsolete version is detected now
has 'ok' and 'download' buttons. Both dismiss the dialog box, but
download will open the user's webbrowser of choice to where BZ2 can be
downloaded from. Haven't tested how well this runs when BZ2 is in
fullscreen. [NM]

- Rude hack for mantis #2248. Bad assets kick should appear correctly
on the kicked player's screen. [NM]

- Added latest DirectX web installer to the Redist folder. It's small,
and some people might want to try running it in case of DX problems. [NM]

- Push To Talk is treated as off in the shell, because the code to
check for the key (default: v) isn't running in the shell. BZ2 will
transparently switch to everyone has a hot mic in the shell, then PTT
once the game launches. [NM]

- Asset updates. Mantis #2324, 2335, 2328 (rev 8/22/2010 D). [NM]

- AV fix for mantis #2334. Things using
[ExplosionClass]::ChunkScrapClass# will have scrap generated. But,
it'll always be on the 'n' team. This is just a bandaid fix. [NM]

-- 1.3PublicBeta6-rc1 (1.3.60.86) released==========================================

- Better fix for mantis #2248. Better use of multithreading to get
message sent w/o a fixed wait. [NM]

- Fix for mantis #2172. Workarounds for some scrap exploits. Compiles,
but untested. (Savegames are helpful, testers) [NM]

- Possible fix for MW collisions (involving the player) causing camera
warp sometime after the hit. Made sure that the list of objects used
for collision is in a consistently sorted order no matter what world
it's in. Might be a slight performance hit, not sure. [NM]

-- b86a released ==============

- Optimized code adding to list of game objects. Adds are mostly in
sorted order already, so check for that first. Also, took the object
list sorting to another level. Applied that sorting to lists of
AiProcesses, Explosions, Chunks, Craft, Deposits, Extractors, Scrap,
Entities, Ordnance, and Weapons. [NM]

- Restored the mix3d volume slider, even if the sound card doesn't
support 3D sound (e.g. vista/win7). The value it edits is used even in
some 2D audio paths, apparently, so it's good to show it. [NM]

- Applied mantis #2248's code changes to all actions that close
sockets or connections. Should hopefully mean that any last packets
waiting to be sent to a (cleanly) departing player get sent before the
drop. As I noted on the boards:

   Some people seem to be desiring 1.2-1.3pb5.1's behavior where the
   server knows ASAP when a client crashes. That's an OS-level feature
   of TCP/IP connections, which BZ2 doesn't use anymore. (You can't do
   nat negotiation w/ TCP/IP)

   With UDP, there is no true connection to drop. It has to timeout
   the connection. All UDP-based games will show this. Try some of the
   Quake/Unreal games on a lan, see how long it takes to timeout the
   player when you kill the process. BZ2 1.0-1.1 were also UDP-only,
   and will show the same behavior.

   A lagout (try pulling the ethernet cable on a LAN game) should
   delete the BZ2 player as soon as it's noticed. But, as above, it'll
   take some time to notice.

[NM]

- Fix for mantis #2351. Changing nickname ingame should print correct
message. Eyeballing 1.3pb4a source, it sure looks like this bug's existed
for a while. [NM]

- Work on mantis #2348. Reduced the number of lines of text printed
out when a player leaves by default. However, if
*prefs.ini::VerboseLagInfo = true, then it'll print early and often.
[NM]

- Fix for race condition closing out GamespyTransport connections
between Gamespy thread and main thread. Should refcount things better
now. [NM]

- Fix for debug assert seen in low-level MW swap code after a player
leaves. Might have been some oddities in non-debug builds, not
sure. Best to be paranoid. [NM]

- Chunks properly inherit the noscrap flag from owner now. If this is
not done, possible crashes w/ evidence of memory trashing seen in
debug. Need to investigate that more. [NM]

-- b86b released =====================

- Refactored code to determine if something is a local or remote
player. Was being done all over the code; might as well do it with a
better name. Also refactored velocity-getting code to return const
reference when accessor didn't need to modify it. [NM]

- Upped # of recent log message lines from 4 -> 8. These are buffered
for the exception handler's use. At least one public bug report, 4 lines
wasn't enough. [NM]

- Fixing a memory trashing bug seen w/ modded assets. Framework for
noticing too-small use of entities. BZ2 will now abort and die asap
rather than knowingly trash memory in these cases. [NM]

- Fixing a memory trashing bug seen w/ modded assets. Put in a check
where partially-loaded odfs could load other odfs, which came back to
the first one (e.g. a.odf -> b.odf -> [...] -> a.odf). A's type is
incomplete at the second load time, which means the compiler would
allocate not enough space for it. Now, throws an abort and die when
such a self-dependency is seen. The one place where cyclic unresolved
ODF dependencies are normal, the weapon altName, which can do combat
-> assault -> combat (or a->c->a) is now specially loaded last to try
and make sure the root file is fully loaded before digging into linked
items. [NM]

- Console message when the user on a team is set to a gameobj that's
not a person or craft. That's a bad state to get into. Seen w/ modded
assets (same as the above 2 items) before I shuffled some code around.
[NM]

- Fixed a copy/paste bug where only [ExplosionClass]::ChunkScrapClass1
was being read. Made it read and use ChunkScrapClass1..3 as advertised
in changelog. [NM]

- Nuked client not ponging/server not ponging code. That's a
pre-Gamespy Transport bit of code that didn't get axed earlier in the
rewrite. Gamespy Transport code is reliable to notice when another
party isn't responding. Don't need multiple, competing systems
running. [NM]

- Re-enabled some code that was pulled from the public build. This
includes where it checks for the latest version. Also, on failed
joins, it logs all the bytes of the introductory packet, from both
client and server's perspective. Those having troubles hosting with or
without ports forwarded, please try a game in the problem
configuration. Submit logs from hosting w/ client's logs as well. [NM]

- Watchdog thread is suspended from operation when exception is noted.
Seems like it sometimes fires again after the exception first
hits. Seen in second log on mantis #2352. The first problem noted in
that log is as-yet unresolved. [NM]

-- b86c released =====================

- Fix for crash seen when hitting 'c' key/selecting sniper weapon at
times.  Missed updating two weapons to load the altname last. Made
sure that the altname parameter defaults to NULL. Reported by
Daylight.  [NM]

- Localize.odf::GamespyVersionStr is not read anymore. That parameter
now comes from the same string shown on the bottom of the login
screen.  [NM]

- Possible fix for mantis #2354. It seems as if Gamespy Transport is
mangling the client's hello packet. Obfuscated pieces of it to try and
get that thru w/o mangling. [NM]

-- b86c2 released =====================

- Fix for mantis #2355. Tweaked order of logging so that it avoids the
crash. [NM]

- Watchdog thread now watches over both main thread and the gamespy
thread. The GS thread seems to have wedged in some of the logs in
mantis #2357, 2352. However, none of those logs have useful
callstacks, unfortunately. As the watchdog thread can successfully
dump the main callstack, hopefully it can dump the GS thread too.
[NM]

- Fix for mantis #2356. Downgraded the recursive load to a diagnostic,
not an error. If you get the 'buffer too small' error, do look in
battlezone.log, and if that entry is listed, then the recursive load
might well be the issue. Submit repro steps if possible in that
case. [NM]

-- b86c3 released =====================

- Final part of fixes for mantis #2172. Pilots built for free won't
ever consider getting into a unit built w/o a pilot. [NM]

- Wrappered memory allocations thru some chokepoints. This way, I can
switch back to the MS allocator quickly by tweaking one cpp file. [NM]

- Corrected some memory misuse pointed out by the changed allocators.
BuildingClass, TurretCraftClass now copy tunnel info, which prevents
double-deletion on exit. Tweaked code to be able to run with or
without memory pools. Also tweaked code to not read object handles
after they're (potentially) destroyed. A separate list of now-dead
handles is kept. This makes it work better when pageheap is on. [NM]

- Refactored some inline functions in headers to be proper class
members of the entity class. This is a helper for the next few
cleanups. CommandPanel code had to change to not store pointers to
objects, but store handles instead. This should be safer, and lead to
fewer access-after-delete bugs. Might be slightly slower, but I hope
it's not noticeable. [NM]

- Abort if MAX_ENTITES (4096) is exceeded, rather than trashing
memory.  [NM]

-- b86d released =====================

- Fix for mantis #2361: Alternate approach to reduce use-after-delete
for entities. Deleted entities are now pushed off in a separate list,
and deleted in a batch outside the main simulate loop. This might give
safety w/o a lot of resyncs which 86d introduced. [NM]

-- b86d2 released =====================

- Compiled out 'badturnhack'. Seems to make buildworld complete its
actions faster. Might have a small pop after building visual world,
not fully sure. [NM]

- Fix for mantis #2360. OpenIL libs use dlmalloc too. Also made it so
that the OpenIL libs are initialized on first use, and not
shutdown. Before, it would initialize/free per use (refcounted). [NM]

- Much more work to validate copies of entities in other
worlds. Forgets about such entities at the first sign of things not
lining up. Helps fix most read-after-delete pointer misuse, still some
left in OffensiveProcess. [NM]

-- b86d3 released =====================

- OffensiveProcess now uses handles for long-term storage; pointers
are retrieved only from the handles. Seems to fix a bunch of cases
where pointers were being read after going stale. This might make
things slightly more unstable in the meantime as code occasionally
tries to read off a NULL pointer, but it passed a 15 minute dmbane
32-bot soak test here. (Default vehicles only) [NM]

- Proper check of RTTI for AttackTaskP before typecasting up to larger
structure, and reading the end of it. Fixes crash seen w/ pageheap on.
(Would be reading random memory w/ pageheap off; in normal end-user
builds, AI processes are pooled up so that only the last item in a
block of entries would have the chance of reading non-memory and
causing an AV. All the rest of items in that block would read
garbage.) Also fixed RTTI for IsUnitTask() to be true when true. [NM]

- Fix for mantis #2366. Vertex/index buffers can't be deleted in the
middle of a frame for skinned objects. They're properly queued up for
deletion at a safe point. [NM]

-- b86d4 released =====================

- Fix for targeting being lost on worldswap. Mismatch between
constructor and destructor code. [NM]

- Fix for reticule dropping on worldswap. Badturnhack (hey, that's the
variable name, and I'm pretty sure it's called that all the way back
in the 1.0 source) is used for one turn, then it's ignored. Seems to
work better here. [NM]

-- b86d5 released =====================

- Fix for mantis #2365. Sanity check before chasing a potentially NULL
pointer. [NM]

- Possible fix for mantis #2368. More work to purge list before
destructors called. [NM]

- More work to sanity-check types before updasting to larger class.
Scanned over all items derived from AiProcess, AiTask. Found some that
wrote to such pointers. Hopefully, this'll prevent some rare random
memory trashing. [NM]

-- b86d6 released =====================

- Fix for AV noted in mantis #2370. [NM]

- Reset to "C" locale on startup. This might fix an issue seen when
people have non-US-standard numeric formats, like the European default
of "1.234,56" for one thousand, two hundred thirty-four and 56/100.
BZ2 odf files are not in that format, and never should be read in with
Euro-nonsense. [NM]

- Possible fix for Gamespy sessions not disappearing after games. If
the user cleanly exits the session -- i.e. quits out of multiplayer
section of main menus, or uses Alt-X to leave the session to windows
-- it seems to remove from the list of sessions faster here. Exits to
windows via crashes, poweroffs, or various other dropped communication
to the master servers, e.g. network cable severing, router on fire,
etc won't send the goodbye packets. If goodbye packets don't arrive at
the master servers, it'll take longer to disappear. [NM]

- Moved memory fill strategies out of dlmalloc into the memory manager
wrapper one level up. Added in more possible memory fill strategies,
including filling memory with float-NANs (0xffc00000). This is not
used in end-user builds. [NM]

- Fix for mantis #2372-- AV in AttachOffensive::DeployShouldAttack(). 
This and mantis 2370 are the same root cause - was trying to read
deleted memory. That's bad. Current code will bomb out rather than
allow reading from random memory. In the short term, more crashes. In
the longer term, I can fix up those areas, and hopefully there'll be
fewer resyncs and the like. [NM]

- Refactored code that checked if the lockstep world version of an
entity died. This code is used to delay the death of a unit in visual
worlds until it's known for sure that it died in the lockstep
world. Code should work a little better now. [NM]

- Fix for mantis #2325 - race mode should work once
again. Deathmatch01.dll code fixes by Nielk1. [NM]

- Fix for mantis #2336. New FFA maps. Will be included in next full
build. [NM]

- Fix for 'ai unit not found' from DM DLL, seen mainly in debug
builds. Added a new DLL callback, IsNotDeadAndPilot2(). See
ScriptUtils.h for how that subtly differs from
IsAliveAndPilot2(). This replacement function is called in the DM DLL
in an area saying it's a fix for mantis #400. Should probably retest
that bug now that I've changed its fix. [NM]

- Fix for mantis #2338. New GH variant update. [NM]

- Fix for mantis #2356. Downgraded severity of message in
battlezone.log.  Also made it appear in editor build only. [NM]

- Potential fix for mantis #2359. If natnegotiate fails, should drop
out of the 'joining...' dialog and to an error message. Hard to test
this here -- I suggest having someone host (behind a router), have
prospective client see the session list, then have the host use Task
Manager to kill BZ2 to ensure it'll fail the join. Also tweaked the
error messages shown on natneg errors slightly. [NM]

- Fix for mantis #2349. /gsoff and /gson commands might work once
again. If not, I'm going to remove them as a bad qr1 hack. [NM]

- Fix for mantis #2344. From chat window, "/nav <foo>" will set the
next created nav name to the entered string. Compiles but is
untested. [NM]

-- b86e released =====================

- Fixes for mantis #2345, 2346. Bugs caused by fat-fingering the ivars
for voice chat (33) and alt-tab tolerate seconds (34). Switched to
using named constants for a bunch of ivars in code. Should have done
that years ago. [NM]

- Fix for mantis #2341. Lowered initial voice capture volume to
80/100.  Note: this setting is applied ONLY to those that are
upgrading to pb6 from a pre-pb6 install, or have deleted their
userprefs/pilots file. Those with a userprefs/pilots file will use
whatever value is currently set. [NM]

- Possible fix for mantis #2083. Going to keep quiet on details.
People just can't stop bragging about their "exploits." If there was a
fight between pirates and ninjas, the 'exploiters' would definitely
fall on the side of pirates. And pirates far lamer than Guybrush
Threepwood. [NM]

- Fix for mantis #2332. Added new texture. [NM]

- Fix for mantis #2343. Some sanity checking on things. Keeping
quiet on what/where/why. [NM]

- Fix for mantis #2358. Added, to ODFs

[WeaponClass]
AllowOffmapFiring = false

   If this is false (default), the weapon cannot be triggered when
off-map, as defined by the edge_path pathpoints. If true, the weapon
can be fired from anywhere. Mods like G66 that exploit this feature
will need to add this flag. [NM]

-- b86f released =====================

- Timeskew from server is applied a bit more aggressively. Bigger jolt
to clients, but hopefully faster time to getting on target. [NM]

- Work on mantis #2375 - Tweaked rules for sending movepackets to
clients. For servers set as broadband (which should be the default for
most people), it'll flush outgoing packets more aggressively. This'll
use more bandwidth, but hopefully with less latency. This should help
smooth out the case with server A, clients B & C, where B&C have
less-smooth views of each other. Note - this applies to human player's
units only; AI units (on AI teams, or human teams) shouldn't really be
affected by this. [NM]

-- b86f2 released =====================

- More work on mantis #2375. Put in framework for averaging out recent
moves, useful for visual world predictions. Not called by anything
yet. [NM]

- Fix for mantis #2368/2381. Post-game crash in ~ENTITY should be avoided. [NM]

- Fix for mantis #2380. AV in HandleDeletePlayer ->
Render_External_View with no current D3D device should be fixed. [NM]

- More work on mantis #2375. Noticed some code that had been
resurrected was writing into one set of globals, while the rest of the
code is reading from class statics that I'd refactored those globals
into. Thus, could do the wrong thing. Fixed. Also made addHealth
parameters not apply when resimulating units (craft/pilots) inhabited
by a human player. This might fix some bouncing around of the health
bar in MP for units occupied by human players.

   Also, for mantis #2375 testing, try the console command
game.altremotepredict to see if this makes things better or
worse. This setting can also be adjusted w/
*prefs.ini::DefaultAltRemotePredict . This is in pb6 as well; might
give better or at least different results for those having issues w/
warp in pb6. [NM]

-- b86f3 released =====================

- Fix for mantis #2386. Shouldn't get spam of messages like "No remote
resim: off or big delay".  Had changed default value for a flag for
debugging purposes, but forgot to put it back. My bad. [NM]

- Work on mantis #2387. Reduced time before watchdog thread notices
gamespy thread has wedged.  There's still some bugs being posted that
note that the GS thread has locked, but it's timing out the main
thread first.  [NM]

- More logging on joins, failed joins, etc. This is sent to
battlezone.log. If you get failed joins when it ought to work, please
mantis the battlezone.log from server and prospective client(s) [NM]

- Tweaked joining game code. Now, timeouts are specified (in the code)
in milliseconds. Default try to join time is 12 seconds. Doing this
simplified some real old code that was a little dodgy. [NM]

- Fix for mantis #2384. Integrated in GH Update 10-9-2010c.7z, the
latest posted version. [NM]

-- b86f4 released =====================

- Possible collisions-in-MW tweak. Doesn't [re]do collisions when
updating remote players. This might make things better. However, I am
seeing some collision warp in 1-machine hilo.bzn w/ MW on, and running
into/over the starting turrets. Collision code is a big nasty mess
that I'd rather not spend hours trying to fix. [NM]

- Possible fix for first issue seen in mantis #2395 - turrets firing
while deploying. Did extra work to force weapons off during state
transitions. Don't have 3+ machines on the internet to fully
test. [NM]

- Possible fix for last issue seen in mantis #2395. Added to ODFs:

// for classLabel = "lockdown", like stock's lockdown_a.odf

[LockShell]
Lifespan = 0.1 // How long the target is in lockdown after a hit, in seconds.

   If a target is hit by multiple lockshell ordnance, the lifespan is
not additive. It does, however take the max of all active lockshell
lifespans currently applied, e.g. if hit on the same frame by ordnance
A with lifeSpan = 0.2 and also ordnance B with lifeSpan = 0.6, then it
will be in lockdown for 0.6 seconds. Lifespan has a minimum of 1 turn
(default 0.1 seconds at 10tps). Compiles but is untested. [NM]

-- b86f5 released =====================

- Fix for mantis #2379, deadlock between main & gamespy threads. Been
around for a while, but finally got enough logs to figure out what
causes it. [NM]

- Fix for mantis #2373. Shouldn't try to double-shutdown gamespy
server.  [NM]

- Routed gamespy allocations thru dlmalloc too. [NM]

- Better fix for first issue seen in mantis #2395 - turrets firing
while deploying. More items are reset back to where the lockstep
entity has them before resimulating. [NM]

- More work on MW pops. All TurretControl objects should be reset back
to where the lockstep entity has them before resimulating. This might
help fix the necks of human-controlled walkers in MP, part of the
mantis #2395 videos. Compiles, but not MP-tested. [NM]

-- b86f6 released =====================

- Even more classes and member variables are QuickCopy()'d before
resimulating remote players. Note: some of the things now copied
include weapon states, health & ammo. I've allowed it to resim
addhealth/addammo on players, as it should be safe to do that now that
it's copied from a consistent basis before the resim. Do test to see
how well this works in practice. [NM]

- Even more logging for joins, NatNegotiate, etc. If having problems
joining, then please post battlezone.log files from both server and
failed-joiner boxes.  Please don't trim logs or anything. Also found
that I don't think I was fully starting up the server-side natneg,
fixed. Additionally, on serverside, when a game is registered on the
backend servers, it'll try and detect the type of NAT, and spam that
to the server's battlezone.log. [NM]

-- b86f7 released =====================

- More logging added for AV seen occasionally in FamilyNode::Find().
No idea why it's happening; need more detailed callstacks. [NM]

- Possible fix for mantis #2403. Was using outdated function to
determine if was server, which sent it down the wrong codepaths. If
this doesn't work, reupload logs from both server and cilent. [NM]

- Fix for mantis #2396. Undid the removal of options. Not sure they'll
work as expected, but might help. [NM]

-- b86g released =====================

- Probable fix for mantis #2405. Was re-using a buffer w/o filling it
with fresh data first. Ooops. [NM]

- Fix for mantis #2384. Integrated GH Update 10-16-2010a.7z. [NM]

-- b86g2 released =====================

- Possible fix for mantis #2409. Changed order of starting up natneg
functions. Doesn't send cookie to server until local socket is
ready. But, I'm still not seeing "QR2 got natneg cookie" in the
server's battlezone.log file as I expect should be there. Upped
logging to spam out complete contents of NN and QR2 packets received
to the chatlog file. If things still go sour, I'll need the server's
battlezone.log & chatlog files, plus the client's battlezone.log
file. [NM]

-- b86g3 released =====================

- Possible fix for mantis #2392. Was using wrong variable to notice
when to give the initial, free, bomber at the bomber bay. Also, made
it so that bomber bays track their associated bomber when
built. Before, it would look for something in TEAM_SLOT_BOMBER at
startup. This might allow multiple bomber bays to be better supported.
But, that's not a stock feature. [NM]

- More work on unjoinable sessions. Ramped Gamespy debugging to max,
and redirected it into the battlezone.log file. This is going to spam
the battlezone.log file, a lot. Once again, host and see what gets
logged.  Thanks. [NM]

-- b86g4 released =====================

- Even more work on unjoinable sessions. Added
Gameprefs.ini::UseGamespyNatNeg.  Those of you having problems
hosting, try setting it to false. I'd also recommend trying all 4
combinations of UseUPNP & UseGamespyNatNeg (i.e. 1) false & false, 2)
false & true, 3) true & false, 4) true & true) to see which one(s)
work. [NM]

-- b86g5 released =====================

- Fix for mantis #2413. Wasn't saving and restoring right values for
entities. This fix might help w/ some other MW smoothness, not
sure. [NM]

- Fix for item noted on my LAN. If in shell, and no packets are
received from remote end for > 10 seconds, then it'll kick them out
with the 'not ponging' message.  In-game, there's a timeout. But, it
appears that Gamespy Transport doesn't do that. Tested via process
kill. [NM]

-- b86g6 released =====================

- Turned off Gamespy mega-logging. Also did a burn-to-the-ground clean
and rebuild of all code. There's been too much randomness where things
are ok one build, bad the next. [NM]

- Moved the application of the lockdown flag (e.g. emp stream) to a
new 'presimulate' function. This ensures that this flag is set at a
consistent point in the simulations between worlds, etc. Before, it
was set whenever the ordnance hit. I may move more status-affecting
items into this new function. [NM]

- Fix for mantis #2415. Added, to ODFs:

[HoverCraftClass] or [AircraftClass]
flameName1 .. flameName16 = "flame_1" .. "flame_16"
flameTextureName1 .. flameTextureName16 = "trail.tga"
flameSpriteName1 .. flameSpriteName16 = "splash.0"

   The old limit for flames was 4 per craft, now bumped to 16. Made
the texture and sprite adjustable per instance. [NM]

- Fix for mantis #2404. Remote resimulations were clearing a flag used
by the UI. [NM]

-- b86h released =====================

- Fix for mantis #2424 - removed spam left in code. [NM]

- Watchdog thread shouldn't fire if there is a long loadMessage still
playing on starting a SP mission. [NM]

- More work on mantis #2375. Started using the framework for averaging
out recent moves, useful for visual world predictions. Might help
smooth out things, especially the multiple-mine dropping shown in part
of the mantis #2395 video. [NM]

- Fix for mantis #2420. EngineFlames shouldn't cause AV on hovercrafts
w/o a meshroot. [NM]

- Fix for mantis #2377. Copied craft explosion code into torpedos;
this should allow them to deposit scrap, generate chunks, etc. This
might cause some chunks or scrap to appear on existing ODFs, as the
parameters in existing ODFs were effectively ignored. Compiles, but is
untested. Do test existing torpedos. [NM]

- Full build installer only forwards 17770/UDP to the installed BZ2
when requested. Old code of 17770-17772 TCP&UDP isn't needed since
pb6, but forgot to tweak the installer. [NM]

- Work on mantis #2426. Disassembly isn't seeming to line up w/ what
reported callstacks show. Tweaked order of code to be a little more
defensive before calling virtual functions. If still happening, should
get a bit more info. [NM]

- Fix for mantis #2423. Remote player movement should be a bit
smoother. [NM]

- Asset updates: mantis #2416 [NM]

-- b86i released =====================

- Fix for mantis #2419 - tracked vehicles should have more
friction. Thanks to Daylight for tracking down which build it started
happening in, which made it much easier to see which boneheaded move I
made that caused it. [NM]

-- b86i2 released ============================

- UpdateTurretAim(), UpdateReticleAim(), UpdateWeaponAim() are done
when resimulating remote players. Various turrets/controllers used in
that are QuickCopy'd before doing that. This might help w/ weapon aim
of walkers and other craft w/ turrets or joints in MP. Compiles, but
is untested.  [NM]

- Fix for mantis #2433. Fixme caused by values set way outside of sane
ranges shouldn't happen anymore. Values are clamped at runtime to a
very large range that should keep things from going further off the
rails. [NM]

- Reduced some of the spam to the battlezone.log file now that a root
cause for some of the unjoinable sessions has been identified. [NM]

- Asset updates: mantis #1921 [NM]

-- b86i3 released ============================

- Fix for mantis #2431. If GamePrefs.ini::ShowIPOnJoin is true, then
clients that join games will see IPs just after they join. [NM]

- Fix for mantis #2427. Added to ScriptUtils.h

// Name accessors. This is the label set on items. Note - for GetName,
// if you want to store the returned value long-term, copy it off. The
// next call to GetName will overwrite the value. Also, NULL will be
// returned if the handle is invalid.
DLLEXPORT const char* DLLAPI GetLabel(Handle h);
DLLEXPORT void DLLAPI SetLabel(Handle h, const char* pLabel);

   Also tightened up code slightly to use const char* more for labels

[NM]

- Some slight timeskew changes. If multiple fresh moves are in a
movepacket, then only the latest is used for calculating timeskew.
Shouldn't need to happen often, but should be a little more accurate
when it does happen. [NM]

- Fix for mantis #2382. More sanity checks before launching DM. This
is related to the 2220/2225 sanity checks for ST/MPI, so do retest
those as well. Can test these w/o joiners. [NM]

- Fix for mantis #2394. Reassign teams w/o gaps should work once
again. Note: only server can do this, and only before the game
launches. [NM]

- Work on mantis #2391. Some more defensive programming to try and
avoid an infinite loop. [NM]

- Fix for mantis #2434 - handles a NULL list from DirectX better.
[NM]

- Fix for mantis #2435. Added, to ODFs:

[GameObjectClass]
InitAnimation = ""
RunAnimation = ""
InitAnimIsLooped = false
RunAnimIsLooped = true

   If the first two entries are not blank, it attempts to use them.
The last two entries are flags as to whether the anim is looped or
1-way; if the init anim is looped, I don't think it'll ever proceed to
the run anim. Note that certain classes (e.g. extractor) have their
own code that can act like this. Specifying these new parameters for
those classes could cause conflicts and is not recommended. Compiles
but is untested. 

   Special note: looking in the code, anything w/ a deploy anim
possible (including, but not limited to aircraft, construction rigs,
persons, scavengers/hoverscavs, service trucks/hover service, tracked
deployables (and derived like commvehicle, deploybuilding,
recyclervehicle), tugs, and turret tanks) wait for animations to cease
before state transitions are allowed. Thus, putting a RunAnimation,
especially a looped runanim, on them will probably prevent state
transitions. If you have problems, then don't put anims on those
units. [NM]

- Fix for mantis #2376. Added to chat command list:
/lockteams
/unlockteams
/globalmute [name/id#]
/globalunmute [name/id#]
/globalignore [name/id#]
/globalunignore [name/id#]

   When teams are locked, players shouldn't be able to change teams.
The global mute/ignores must be done as server, and will squelch all
text/voice traffic from a player. Compiles, but is untested. [NM]

-- b86j released ============================

- Fix for mantis #2371. Any entity w/ [EntityClass]::AllowHQShadows =
true will have stencil shadows attempted for it. Stencil shadows are
still probably just as buggy as before. If this causes a lot of
problems, I might need to change the default value for AllowHQShadows.
[NM]

- Fix for mantis #2398. Flat layers in sky should be more visible,
especially if the user first spawns in at altitude. [NM]

- Fix for mantis #2406. Colors in terrain color wireframe mode
should line up w/ normal view better. [NM]

- Fix for mantis #2153. Stacked commands with control.base.* in them
should force things to update so that a subsequent command in the same
set should go thru. This is a very minimal fix for stacked commands;
I'm wary that this might have side effects. [NM]

- Started refactoring some sky drawing code. Looks like somebody
wedged 4-6 .cpp files into one w/o a good reason. Separated, hopefully
no other changes. [NM]

-- b86j2 released ============================

- Work on mantis #1858. If SkyPointsArePoints = false, should behave a
bit better now. The console::stars.size setting is now in approximate
degrees (subject to some randomization), not pixels, so things may not
be identical in size to before. Also, with the map in
skypointsarepointsfalsebug.zip on #1858, the points will look a lot
better if the skypoints texture (console::stars.texture) is set to
something with an alpha channel, or console::stars.modulate is on. And
also probably dropping the size with console::stars.size [NM]

- Fix for mantis #2022. Added to .trn files

[NormalView]
SkyPointsBothHemispheres = false

   If this is true, approximately 50% of the sky points should reside
in the bottom hemisphere of the sky. If false (default), all should
reside in the top hemisphere. [NM]

- Fix for mantis #2439. sky.color and sky.height ought to rebuild the
tiled sky. Compiles, but is untested. [NM]

- Fix for mantis #2041. Added console::sun.ambientcolor as a way to
adjust .trn::[NormalView]::AmbientColor. Compiles, but is
untested. [NM]

- Fix for mantis #2048, 2049. Added to scriptutils.h:

// Gets the nth tap of object h. h must be something that supports
// taps, e.g. poweredbuilding (or derived)/turretcraft.
DLLEXPORT Handle DLLAPI GetTap(Handle h, int index);

// Sets the nth tap of object baseObjectHandle to
// tapObjectHandle. baseObjectHandle must be something that supports
// taps, e.g. poweredbuilding (or derived)/turretcraft.
DLLEXPORT void DLLAPI SetTap(Handle baseObjectHandle, int index, Handle tapObjectHandle);

// Local ammo accessors. If an invalid handle/weaponIndex is passed
// in, it'll return 0.f. Note that all this is done in floats, not the
// way GetCurAmmo/GetMaxAmmo/SetCurAmmo use longs. The underlying code
// uses floats, and it's just easier for me to expose that as-is.
DLLEXPORT float DLLAPI GetCurLocalAmmo(Handle h, int weaponIndex);
DLLEXPORT void DLLAPI AddLocalAmmo(Handle h, float v, int weaponIndex);
DLLEXPORT float DLLAPI GetMaxLocalAmmo(Handle h, int weaponIndex);
DLLEXPORT void DLLAPI SetCurLocalAmmo(Handle h, float v, int weaponIndex);

[NM]

- Fix for mantis #1181. Added to ODFs:

[JetPackClass]
MaxVelocity = 1e6

   This is the maximum velocity (in 3D) the craft can have while it's
moving under the influence of the jetpack. Velocity over this is
clamped to this. Compiles, but is untested. [NM]

- Fix for mantis #1270. When console::sun.period is done, it should
recalculate the speed of the sun's movement. (Before, did this
calculation on startup only) The formula for that movement is
velocityRadians = 2 * Pi / (sunPeriod * 3600). Thus, a sunPeriod of
1.0 should mean that it does a complete circle in one hour of
realtime. (1 hour = 3600 seconds). A sunPeriod of 24 should mean that
it does a complete circle in one day of realtime. [NM]

-- b86k released ============================

- Fix(?) for mantis #1337. Added to ODFs:

[MagnetGunClass]
UseCone = true

   If this is false, then it doesn't care what things are in the cone,
and push is constant. If you want things to push based on how far they
are fron the cone, the code takes sine(coneAngle), so you'll find the
best push at coneAngle = 90 degrees. The odf uses radians for
[MagnetGunClass]::coneAngle, so 90 degrees = Pi/4 radians =
1.570796. [NM]

- Fix for mantis #1324. Bumped valid range on
[GameObjectClass]::requireCount from 0..4 -> 0..16. That ought to be
plenty for people. [NM]

- Work on mantis #2038. Tweaked code to batch-transform all skinned
vertices on a model at once, rather than piecemeal. This should allow
for a some tighter loops rather than continually transforming verts
one at a time. The SSE code to transform things has a setup cost that
can be amortized when processing large batches at once; also, the SSE
code allows for processing a pair of vertices simultaneously. Do test.

   Also manually optimized code slightly by pulling tests of
loop-constant variables out of inner loops and instead copy/pasting
for loop contents 2-3 times so that the test/branch only needs to happen
once. Basically, code used to look like:

const bool onePath = ... // something that won't ever be changed in the loop
for(i=...)
{
   if(onePath)
   { // ...
   }
   else 
   { // ...
   }
}

   And, now it looks like

if(onePath)
{
  for(i=...)
  { // ...
  }
}
else
{
  for(i=...)
  { // ...
  }
}

   This sort of copy/paste optimization should only be done if things
are in the top-10 functions according to a profiler, as manual
copy/paste is far more fragile. DLL authors should probably never try
something like this, as DLLs aren't anywhere as expensive as the
skinning code. I've heard the Intel C/C++ compiler can automatically
do things like this, and that'd be less error-prone. With these
changes, the savegame on #2038 seems to behave better here -- on my
Core2Duo E6600, GeForce 8800GTX 640MB, running 640x480 windowed, the
mantis #2038 savegame bottoms out about 30fps. 

   Still to do on #2038 -- if not chroming the resultant verts, avoid
reassembling vertex buffers. Set up an alternate set of index buffers
and just make the video card reassemble things. That's what it's got
hardware built for anyhow. [NM]

-- b86k2 released ============================

- More work on MW lag. Tweaked fixes for mantis #13. Earlier solution
for mantis #13 turned off resimulation for remote human-piloted
tracked vehicles. Now, what should be a better fix is in place -
QuickCopy() does a deeper copy of tracked vehicle's parameters, which
is hopefully enough to provide smoother behavior for tracked vehicles.
Tested on my LAN w/ 500ms of artificial lag. [NM]

-- b86k3 released ============================

- More work on MW lag for remote human players:
 - GameObject's quickcopy now also copies over colors for units,
   target/tug handles, and shot info. Might help w/ items mentioned by
   DW on irc -- that when pilots enter ships, the color isn't fully
   synced up.
 - Found more variables not fully copied over for turrets on vehicles,
   fixed.
 - Tracked vehicle's tread positions should be saved and restored
   better across worldswaps, so that the treads don't pop after a
   second of inactivity.
 - Fixed signed/unsigned issue with integer math and interpolating
   moves that could cause interpolation to give unexpected results.
 - Weapon carriers's items are quickcopied over. 
 - Added console command 'game.badturnhack'. It toggles between two
   bits of code. See if one is better than the other. (And yes, that's
   what it's been called since 1.0) 

[NM]

-- b86k4 released ============================

- More work on MW lag for remote human players:
 - Found discrepancy between two systems as to what turn the lockstep
   world is at. Made one authoritative. This could cause remote resims
   to run the wrong number of times.

[NM]

-- b86k5 released ============================

- More work on MW lag for remote human players:
 - Remote players should get remote resimulated only when there's new
   data available for them. This should be no more than 10x/second at
   default tps. Before, it could possibly over-resimulate them.
 - More work on low-level QuickCopy before remote resims
 - Added GamePrefs.ini::SmoothCodePath = -2 possibility. Really means
   no extra smoothing. Seems to work a little better here.
 - Move averaging goes even further ahead now.
 - Remote players are resimulated immediately after buildworld finishes up.
[NM]

-- b86k6 released ============================

- More work on MW lag for remote human players:
 - game.smoothcodepath has range of -2..4, same as gameprefs.ini
 - Force-update matrix and sphere on quickcopy if dirty.
 - Craft's renderPos should be updated on smoothcodepath -2
 - Deprecated movemanager for turns, now uses TimeManager.
 - Histogram stores 4x the data (I'm using this for extra debug info here)
 - PostSimulate frame # is updated correctly for remote players
[NM]

- Version # on exe is 1.3.61.86. Third digits is the public beta it's
part of, pb6.1. [NM]

-- b86k7 released ============================

- More work on MW lag for remote human players:
 - Time elapsed should be slightly more stable on MW swap.
 - After server sends timeskews, waits a bit longer for client to
   apply before recalculating how far off they are.
 - Check if lockstep entity is dead should return true a little
   faster. This might help some of the hesitations on deaths in
   visual worlds.

- Re-enabled message saying "FIXME: killAtTS #### < worldTS ####. Not
cool."  I suspect this fixme is why there's sometimes a resync after
people leave.  Seen occasionally on my LAN here. [NM]

- Edited callstack optimization level adjustments, previously tweaked
for mantis #388, 587, 591, 723, 829, 911, 1100, 1301, 1302, 1528,
1618, 2081.  Might produce slightly faster code. If callstack
optimizations made the bug disappear, might make one or more of those
bugs reappear. [NM]

- Fix for mantis #2461. Added, to ODFs

[PoweredBuildingClass] or [TurretCraftClass]
DestroyTapsWithParent = true

   If this is true (default), then tapped objects will be destroyed if
their parent object is destroyed. If false, then the taps should
remain if their parent object is destroyed. Compiles, but is untested.
[NM]

- Possible fix for mantis #2455. Don't quickcopy isObjective. [NM]

-- b86l released ===================================

- More work on MW lag for remote human players:
 - Time elapsed should be slightly more stable on MW swap. Tweaked
   this again, so that sub-frame time progression is tracked
   separately for 1) lockstep and 2) both visual worlds at once.
[NM]

- More work on mantis #2038. Uses aligned SSE memory for potentially
faster operations on older CPUs. IIRC, pre-Core2Duo, unaligned
accesses had speed hits. [NM]

- Minor optimization - removed some static buffer overrun checks from
builds released to users. These checks have never fired once since
writing; debug builds still include them. Might run slightly faster
now. [NM]

-- b86l2 released ===================================

- Moved weapon simulations to be done at the same time as the owning
craft. This should allow slightly better control (in the future) over
the ordnance they create. [NM]

- More work on MW lag for remote human players:
 - Made it even more aggressive at noticing when lockstep copy of
   entity has died. This should help reduce the gap between when this
   happens and when the visual world can react.
[NM]

- Fix for mantis #2462. If a user tries to join a session, and doesn't
have the .bzn present on their system, and the map's .inf file has
MapURL="http://..."  filled out, it'll prompt the potential joiner to
visit the download site. Users should never have their web browser
opened w/o permission (i.e. clicking the 'download' button). [NM]

- Removed MapURL entries from stock map .infs. (Changes will be
present in next full build.) No need to point people to download stuff
that's already present in pb6.x. [NM]

-- b86l3 released ===================================

- Tweak to lockdown turns (e.g. emp stream). Now stores an absolute
turn number at which things are safe to resume. Previously, was a
countdown, but remote resims of remote human players could reduce the
countdown too aggressively. Compiles but is untested. [NM]

- Put an infrastructure in place for fully resimulating clients in
visual worlds just after true moves arrive for them. Will be useful
(in the future) for weapons and the ordnance they create. Tested
w/ debug messages here. [NM]

- For non-LAN network games, always launch w/ multiworld on. This
might help w/ the particle efx disappearing on joiners issue that
keeps getting reported, but there's still no good repro cases that
work on my end. [NM]

-- b86l4 released ===================================

- Revert the changes made for 86l2 in trying to separate out time
elapsed between lockstep and visual worlds. Also (temporarily)
reverted the code to force a remote resim on new data available, as
that might be causing some stuttering as if remote players aren't
properly interpolated. Just trying to get a stable build w/ remote
player's ships looking decent (their weapons may still be iffy until I
finish up the code for that.) [NM]

-- b86l5 released ===================================

- Some work to try to slightly optimize the update loop. Noticed it
would always do work to switch to lockstep world every frame, even if
nothing needed to be done in there. Now, tries to be smarter about
doing work -- switches only on timeout or if it knows there's work to
be done. Ideally, this should help framerate slightly. Last time I
made changes like this, things went sour, so I'm going to try a test
build w/ very few changes to be a reference. [NM]

- Tweak to try and make blink happier w/ current code. Now, if a
remote user blinks, remote resims are disabled until the next
worldswap. This will mean a higher chance of a warp/pop of
position/orientation at the next MW swap (default: every 2 seconds),
but after that MW swap, they should use the higher-precision remote
resims. (Until they blink again, then the remainder of that MW swap
will be no remote resims.) [NM]

-- b86l6 released ===================================

- After a join/resync (virtually the same thing to the underlying
code), server waits some more time before looking at client's
clockskew. [NM]

- Some further tweaks to optimize the update loop for MP. Might be
slightly faster fps than pb6. Also found a case where it wouldn't
render after worldswap. Made it do the render if fps is high
enough. [NM]

- Morphed ships shouldn't get their weapons double-simulated after
morphing. Bug introduced recently when trying to coalesce weapon
simulations for MP. [NM]

- Giblet upgrades - boost v1.45.0 now used. Also added use of boost to
Readme13.rtf, forgot to do that earlier. My bad. [NM]

- Fix for overflow in logs posted by Smoke_Jaguar on private boards.
Sends command packets on player delete only once per player being
deleted. [NM]

- Added in code to track ordnance generated by remote player's craft
on a particular frame. If data comes in later that is trustworthy
(i.e. no guessed-at moves since last lockstep update), it tosses away
the original ordnance and replaces them w/ new items based on the
trustworthy data, aged to current time. Visually, the aging to current
time has some issues -- for example, miniguns fired w/ a lag of 3
(300ms) aged to current do not appear up close; the other player needs
to be a certain distance away for the shot tracers to appear. The
minigun's muzzle flashes do seem to work as expected, but that
particle effect is not aged. (Not 100% sure if it should be.)
Previously, I think that neither the muzzle flashes nor the ordnance
would appear for players w/ a lag > 0, especially for fast-moving
weapons like miniguns or beam weapons, and quick trigger clicks. [NM]

-- b86m released ===================================

- Work on mantis #2367. As Daylight noticed it started around 84n, the
biggest changes around that time was packet coalescing (added in
84n). Reduced max coalesced packet size slightly to see if this helps.
In 'fix', moved the 'clients should use natneg' option from
Gameprefs.ini::UseGamespyNatNeg to an option on the game creation
dialog box. [NM]

- Updated prefs system to be a singleton, rather than naked global
data/functions. (Some C++ purists just sneered and consider this
change to be a cure about as bad as the disease.) Put in an update
loop task to notice when the profile has changed, and if so, flush to
disk. [NM]

- Fix for mantis #2474 - Moved weapon simulations to bottom of
Craft::Simulate() update. This should help make sure the weapons are
in the right place when strafing/moving.  Also made sure that
pilots/soldiers call the weapon updates too. [NM]

-- b86m2 released ===================================

- Fix for occasional remote resim of a unit that's not owned by a
remote player. Added in a sanity check to ensure that before
resimulating. Probably shouldn't be noticeable to end users, but did
cause some occasional fixme debug messages on debug builds here. [NM]

- Code refactoring to slightly reduce sizes of packets sent over the
wire. Affects a bunch of packets, most notably text/voice chat, moves.
[NM]

- 'c' key will trigger pilot/soldier jetpacks/other special weapons.
Copy-paste error when separating out code. [NM]

-- b86m3 released ===================================

- DLL callbacks that move craft around (i.e. FE portals) turn off
resims of remote player objects until the next multiworld swap. Should
help make their position more visually accurate. [NM]

- Default value for 'clients should use natneg' is now
on. Userprefs/pilots files previously created should be upgraded to
set that as default. [NM]

-- b86m4 released ===================================

- Fix for mantis #2470, 2477 - AV in Carrier::SetSelected(). [NM]

- Fix for mantis #2455. Dropoff points and other items w/ blinking
text when unobjectified in MW should be fixed. Also tweaked the
ObjectiveList code to be more aggressive at filtering out dead objects
to prevent overflows. This should be safe, but I can revert out the
filtering if needed. [NM]

- Possible fix for mantis #2430. bz2edit.exe will allow filenames
ending w/ .bzn or .trn on the commandline that point to a file that
doesn't exist to trigger a new map creation.  However, bzone.exe will
still do the current behavior of validating filenames on the commandline,
and ignore files that don't exist. [NM]

- Fix for mantis #2446. Added seeker_f.inf. [NM]

-- b86n released ===================================

- More work to try to ensure that pilot's weapons are simulated while
dying. [NM]

- Updated helptext below sound options page 2 push-to-talk
option. Also fixed bzinput_common.cfg to default the binding for
push-to-talk to be 'V' by default. (Spelling error between that cfg
and what code was expecting.) This default is applied when there is no
local userprefs file, or the userprefs file is from pre-pb6. [NM]

- Work on mantis #2478. Added more logging. [NM]

-- 1.3PublicBeta6.1-rc1 (1.3.61.87) released==========================================

- Rebuilt all w/ the 'public build' flag set to off. That was one of the
major changes between 86n and b87. [NM]

-- b87a released ===================================

- Reorg of various 3rd party source code folders. (I.e. things like
zlib, libpng, and other items noted in Readme13.rtf, etc). Just a
cosmetic item; shouldn't affect how things appear to end users. [NM]

- First pass at a proper logging system. See eventlog.ini in the same
dir as the exe. It should be fully capable of recording all
keyboard/mouse/stick inputs, both in the shell and ingame. It logs
your userprefs/pilots file, and (hopefully) all of the
gameprefs/localprefs and commandline flags, so recordings should be
portable. 

   Such a system will become more robust over time, but right now
there's probably a bunch of things I'm forgetting to synchronize;
right now, I'd like people to try recording 3-15 minute SP/IA games --
with and without multiworld -- and zip up the output and send that on
to me. I'll try playing them back and see where they diverge, and try
to repeat the process. (Don't use the console yet, as that doesn't
replay correctly.) Right now, this is bz2edit only, as I've not done
all the work to log every packet going over the wire.

   There are two goals to this system:

- If SP/IA can be recorded successfully (not that hard if starting in
shell, not loading savegame), this can help find sync bugs by ensuring
they play back with numerical stability. Also, once a game can be
replayed back once, I'll work on a console command so that in the
shell, the replay can be restarted. Playing back

- If MP can be recorded, then that gives a window for me to be able to
see exactly what was seen, look into issues. But, that's a lot of work.

   For recording timing-sensitive or tricky repro cases --
i.e. anything that requires skill on my end to repro a bug -- it's
best to get a savegame with everything ready to repro the bug. Then,
launch BZ2 w/ the savegame on the commandline (i.e. shortcut) -- put
"saved\mysavegame.sav" on the commandline (no quotes). Adjust the
filename to match. Then, get a recording -- 10-20 seconds max is best;
long recordings are huge and waste time playing back each time here.
Exit BZ2 (i.e. alt-x, enter) a few seconds after the bug happens to
keep the recording short. It should be good enough to upload the
events file and your savegame.

   Other notes

- ONLY bz2edit.exe can record right now. bzone.exe ignores eventlog.ini
- I don't need the values file if it's a simple recording. The
  values file is mainly for debugging out-of-syncs.
- The events file is basically all the inputs to the game -- state of
  every key, *prefs.ini, commandline, userprefs/pilots file, elapsed
  time for each frame, etc
- The values file is a lot of notes on what happened as a result of
  the inputs.

   For recording timing-sensitive or tricky repro cases --
i.e. anything that requires skill on my end to repro a bug -- it's
best to get a savegame with everything ready to repro the bug. Then,
launch BZ2 w/ the savegame on the commandline (i.e. shortcut) -- put
"saved\mysavegame.sav" on the commandline (no quotes). Adjust the
filename to match. Then, get a recording -- 10-20 seconds max is best;
long recordings are huge and waste time playing back each time here.
Exit BZ2 (i.e. alt-x, enter) a few seconds after the bug happens to
keep the recording short. It should be good enough to upload the
events file and your savegame.

   Other notes

- I don't need the values file if it's a simple recording. The
  values file is mainly for debugging out-of-syncs.
- The events file is basically all the inputs to the game -- state of
  every key, *prefs.ini, commandline, userprefs/pilots file, elapsed
  time for each frame, etc
- The values file is a lot of notes on what happened as a result of
  the inputs.

[NM]

-- b87b released ===================================

- Updated eventlog system to properly log console (which might fix
some ingame issues), windows messages, bink playback speed/timings,
and random # setups. Also logs out version info at startup  [NM]

-- b87b2 released ===================================

- More minor refactors of MissionHandler code. Mainly moved some
variables out of function statics, and into class-statics. They can
now be reset to defaults when starting up, quitting to the shell, etc.
[NM]

- Implemented a framework for dumping a particular craft's diffs
between visual, lockstep worlds to a .csv file for examination in
Excel.  Debug tool only, not exposed to end users. [NM]

- Lots of work on the mantis #1088 savegame. Root cause of MW warp for
that rig - the path it created has 'tunnels' on it. (Any transition
into/out of tunnels, bridges, etc can set that flag.) But, the tunnel
data was *NOT* multiworld safe, so it was never properly saved/loaded
into the visual worlds. Rewrote the PathPoint data structure so that
this information can be saved/loaded into the visual worlds. Also fixed
up at least one silly bug caused by copy/paste and < > mismatches.

   The odd route that rig takes in that savegame might be due to the
SkipPoints() function (which really does path shortening over short
distances) having a similar, but not identical problem. I tried
enabling that function in a local debug build, still seems to take the
same route. Not going to try and rewrite that function too right now.
In that savegame, it does take a similar route when I load w/ MW
off. [NM]

-- b87b3 released ===================================

- Fix for mantis #2483. Histogram should be available in all views.
Previously, it was only available in cockpit (shift-F1) view only.
[NM]

- Work on mantis #2481. Found code in RemoteDetonator launcher code
that could keep accumulating time even if there wasn't enough ammo to
launch. When it did launch, that accumulated time fast-forwarded the
simulation so that the ordnance seemed to lurch way forward or
disappear.  Added code to keep accumulated time near 0 if out of ammo.

   Note - similar code may be present in Launcher, MachineGun and
MultiLauncher; please check to see if they have problems w/ ordnance
popping when the fire button is held down while out of ammo. I did put
place a general solution that prevents any ordnance's accumulated time
from going over 1 turn (default: 0.1 second). So, ordnance shouldn't
pop.  Where there might still be an issue is weapons that are tracking
minimum time between shots, and if out of ammo, they allow shots to be
released faster than min time if ammo is restored, especially
quickly. (Think: drop health powerup on unit after it's been holding
down fire for a while when out of ammo.) Do test. [NM]

- Fix for mantis #304. CRigs do an extra build extents check before
charging their owner scrap. This should avoid the places where the
crig is pointing at green terrain, then the reticle snaps to red
terrain before hitting space. Now, it should fail the request. Also,
the extents check was being done in lockstep world only, so that it'd
visually appear to start the build, then stop when the lockstep world
said no.

  Note: if it's green when you order the crig to build, and it
wouldn't be green when it arrives, the build will still be
canceled. Construction rigs have always charged
[GameObjectClass]::scrapCost when the build order is given, but refunded
[GameObjectClass]::scrapReturn (which defaults to
[GameObjectClass]::scrapValue) if the build/upgrade is canceled or
fails. [NM]

- Fix for mantis #2384. Integrated latest GH variant updates. [NM]

-- b87c released ===================================

- Fix for mantis #2490. Fixed inconsistent button styles on the IA
screen.  [NM]

- Fix for AV in mantis #2491. Validates parameters while loading, and
early-exits if not found. [NM]

- Changed file extension on event log files to .bin, rather than .log.
By default, Notepad will try and open a .log, which it really can't do
with BZ2's event logs. [NM]

- Fix(?) for mantis #2429. Added, to ODFs:

[CraftClass]
SkipSitIfCanHit = true

   If this is true, it nerfs the DoSit() code when it thinks it's able
to hit its target. Note - by doing this, it skips updating its
avoid/wait plans, and also the 'stop' request when a service truck
wants to service a unit. This change might make BZ2 AI a bit better in
general, or it might cause a lot of side effects. Do test. [NM]

- Work on mantis #2013. On reload, if a local/remote pilot, force a
resim so that the weapon & camera aim don't pop. However, trying to
switch to sniper doesn't work -- sniper scope doesn't open in visual
worlds.  This problem is due to object hierarchies being different
between save in lockstep world and load in visual world. Still need to
dig into that. [NM]

-- b87c2 released ===================================

- Tweak for mantis #2429 fix above. The SkipSitIfCanHit flag takes
place only when the DoSit() caller says they're attacking. Savegame
from #2429 still works. [NM]

- More work on mantis #2013. Found the root cause of this -- the
apsnip weapon crate powerup gives two different weapons, both of which
attach to the same hardpoint. It was giving them to the pilot with
weapon #1 first, then weapon #0. But, when weapons are saved, they're
saved 0 -> 5, loaded 0 -> 5. The hierarchy is different if weapons are
added 1,0 vs 0,1, and the mantis #1102 fix would skip over things if
the hierarchy is different. Proper fix is in the weapon powerup code
to give things in sorted carrier order if hardpoints are
identical. [NM]

-- b87c3 released ===================================

- Fix for AV noted in mantis #2495, and also AV in
GroupPanel::BroadcastCommand noted on boards. Also, for 2495, made the
pathdisplay debounce the mode_select items so that keys should be a
little more reliable. [NM]

- More work on mantis #2013. Found the cause of scion weapons going
bad -- when they were edited to be fg*.odf, the altName was left as
sg*.odf.  When first picked up, they used fg*, but after
entering/leaving, they were in the sg*, which confused
everything. Edited the odfs so that fgsnip_c.odf::altname points to
fgsnip_a.odf, and fgsnip_a.odf::altname points to fgsnip_c.odf.
Modders should check that weapon altnames, if present, are two ODFs,
both of which point to the other. [NM]

- Possible fix for mantis #2489. When creating initial BZ2 window, it
should use what's set from userprefs file (if fullscreen) or window
width/height if windowed. [NM]

- Fix for pop when loading mantis #2491's RD_Scrap_Snapback2.zip.  If
the camera is in satellite view when loading a savegame, it makes sure
to put the main camera's location there, so that the 'cull far objects
for visual worlds' code now has a valid starting position. [NM]

-- b87c4 released ===================================

- Fix for mantis #2496. Synchronized physics parameters between
isuser*.odf and ispilo.odf. [NM]

- Fix for arcing shot convergence (mantis #2475). Weapon convergence
code now reads that weapon's ordnance's OrdnanceClass::IsArcing to
determine if it's a straight or arcing shot. This seems to make shots
in the savegame differ very little left-to-right. There is still
front/back variation, though that is due to the mass of service trucks
in the save. Shots still come in a bit off the center of the object
for my taste, but that's much improved when the artillery is moved
further away from the target. 

   As a further tweak, defaulted OrdnanceClass::IsArcing to true for
classLabel = "spraybomb" or classLabel = "grenade". Note that this is
only the default for when the odf does not have that entry; if the odf
does have that entry, it overrides it. Not sure if there are any more
classLabels that should have that default. Edited ChangeLog_pb4.txt to
note the new defaults. Not sure if the other items mentioned in that
ChangeLog_pb4.txt entry ([CraftClass]::AITargetLocation) should be
defaulted differently, or if it should try and autodetermine
[CraftClass]::AITargetLocation based on weapon's ordnance, like this
convergence change. [NM]

-- b87c5 released ==========================================

- Work on mantis #2499. Found that UnitTask wasn't synchronizing 10(!)
member variables between lockstep and visual worlds. Fixed. Eyeballed
other data structures in UnitTask that are saved to make sure they
seem to be doing the right thing. This seems to fix some AI
popping. Have not codereviewed all derived classes from UnitTask yet,
though -- there's 47 immediate (1-level) derived classes, probably
closer to 65-70 total derived. [NM]

- Found possible very small memory leak of waitplans. Fixed [NM]

- Fixed some duplicate files in private sub-build installers. To fix,
you might want to install BZ2 to a new folder, then install b87 (full
installer) then b87d. [NM]

-- b87d released ==========================================

- Fix for D3dx9*.dll inadvertantly in full build installer. [NM]

- Tweaks to asset checks. [NM]

- Codereview of all UnitTask-derived classes. Did find a variable not
being saved in some classes; updated. Still need to do codereviews on
all AiProcess-derived classes. [NM]

- Updated message if helper DLLs can't be loaded -- prints out error
code returned from Windows. Still not sure why miniupnp couldn't be
loaded on Win2000, per a message on forums. [NM]

- AttackGroup sorts its member items when they're added. This should
give more consistent results between lockstep & visual worlds, without
a lot more work to try and save/load this datastructure. [NM]

- Work on mantis #2505. Added gblink.odf, xblinkin.odf from the
attached assets. [NM]

-- b87d2 released ==========================================

- Codereview of AiProcess-derived classes. Nothing egregious found,
just moved some {}s around, and put member variables/functions in my
preferred places in the classes. [NM]

- Put localprefs_bzone.ini in private sub-build files to give a lot
more logging. [NM]

- Fix for mantis #2508. Formatted messages differently. [NM]

- Fix for mantis #2493. Added to ODFs

[TripMineClass]
TeamFilter = 0 // 0 = all teams, 1 = same team only, 2 = allies, 3 = enemies, 4 = not same team
fireSound = "" // Plays when triggered

   Compiles, but is untested. [NM]

- Found that all the mission DLLs .vcproj files had
redundant/contradictory <FileConfiguration> ... </FileConfiguration>
blocks in them. Removed. Also made mpinstant.dll's stratinstant.cpp
set the m_DidInit flag in all builds. This should help make saves more
compatible between bz2edit.exe and debug builds here. (In the short
term, you can try hand-editing ascii .sav files -- look for the
mpinstant.dll entry, then b_array [37]. Set the first item under
b_array [37] to true. [NM]

- Fix for mantis #2510. Found that PersonProcess::PostLoad() wasn't
properly calling parent class's PostLoad() as expected. So, things
differed in MW. Fixed. Time for another codereview of the same 150+
classes I just eyeballed to ensure they chain to parent for
Save/Load/PostLoad. :( [NM]
   [Done thru ArtlAttack]

-- b87d3 released ==========================================

- Tweaked formatting for the session list screen. Made rows 1 pixel
taller so that descenders like 'g' and 'y' fully appear. Also bumped
width on MOTD so that URL to new forums fully appears. Take a look thru
assets, please, and if there are any other listboxes w/ cellsize height
of 10, let me know. They should be height 11 minimum. [NM]

- Tweaks to asset checks. [NM]

- Fix for bugzilla #9. Don't flip lighting direction in reflected
world. [NM]

- Tweak for bugzilla #14. If firewall stalls out BZ2 on first scan for
gamespy games, watchdog thread shouldn't fire. I am *really* close to
auto-going to windowed mode until searching has succeeded on that
machine. Firewall apps that have a window in the background while
stalling out the foreground app is NOT friendly. [NM]

- Updated blink assets from bugzilla #3. [NM]

-- b87e released ==========================================

- Possible fix for bugzilla #19. Digs in deeper to see if other entity
data changed. This might help w/ the 'takes a long time after ship
blown up to be in the air' reports. [NM]

-- b87e2 released ==========================================

- Lots more logging for bugzilla #11. Will need to do another test,
upload client & server chatlogs again. [NM]

-- b87e3 released (bzone.exe updated only) =================

- Refactored code for teleporting craft around; called from several
places.  [NM]

- Possible fix for bugzilla #19. DLL-done actions that affect the
local player (e.g. what to do on snipe/ship death, SetVectorPos() and
similar) now trigger a visual world update asap. Trying to get more
fluidity for the local player. [NM]

- Lots more logging for bugzilla #11. Will need to do another test,
upload client & server battlezone.log & chatlogs again. [NM]

-- b87e4 released (bzone.exe updated only) =================

- Fix for bugzilla #21, AV in Carrier::TriggerSpecial. [NM]

- Switched GamespyTransport from critical sections to boost's
mutices. GamespyThread's been using boost for a long time now.  More
of a code cleanup issue than anything else. [NM]

- Lots more logging for bugzilla #11. Will need to do another test,
upload client & server battlezone.log & chatlogs again. [NM]

-- b87e5 released ==========================================

- Fix for lots of spam in battlezone.log about long updates. Bogus
logs. Fixed now. [NM]

- Work on bugzilla #13, savegame #2. Found that the AI was consuming
random #s in a way that wasn't fully synchronized across multiworld.
Fixed this random # call, but there's 3-4 more calls that I've not dug
into yet. Doing this, logging 8 of the tanks in the level (picked
randomly) don't seem to have any differences in position between
lockstep & visual world over about a 10-15 second span of
logging. [NM]

-- b87e6 released ==========================================

- Restoring some code originally added "9/7/02 tweak random # seed to
be consistent across multiworlds", and later "Disabled NM 1/14/05 as
people could turn off MW in MP, and this cure seems to be worse than
the disease." Back to setting the random # seed on a per-craft basis
before calling their AI process. That way, it shouldn't matter which
craft exist in visual worlds, or the order of executing AIs (though
that should be consistent); the AI proceses should be able to get the
same random #s in lockstep & visual worlds. This should make all of
the random calls synchronized, not just the one I fixed for 87e6. [NM]

- Fix for bugzilla #31. Added to ODFs:

[PersonClass]
DyingTimer = 3.0

   This is the number of seconds it takes for a dead pilot/soldier to
be fully removed from the world. Any explosion takes place in the last
0.2 seconds. [NM]

- Made it request a MW update soon after the AIP code runs. This'll
effectively cut the max MWF down to 10 in IA/MPI games, but hopefully
reduce AI warp by updating the visual worlds right after the AIP runs,
which is once per second. People playing other modes (DM/Strat) are
free to drop MWF down as desired. [NM]

- Fix for bugzilla #27. Moved AI bots to teams 11-15 (was 9-14). This
should keep them away from teamgroup B. [NM]

- Fix for bugzilla #20. All .cfgs with cellsize 10 vertically should
now be bumped to size 11. Heights adjusted to be integer multiple of
11. This touched a lot of files; do test, mainly for a mistyping of
entries. [NM]

- Fix for bugzilla #32. (Dupe of recent bug for torpedos). Made
pilots/soldiers read:

[GameObjectClass]
canDropScrap = false
scrapClass1 = ""
scrapClass2 = ""
scrapClass3 = ""

   Basically, anything that doesn't call Craft::Explode or
Building::Explode just needs a quick bit inserted to generate scrap
fields on death. [NM]

-- b87f released ==========================================

- Fix for bugzilla #28. Check for null pointer before dereferencing.
[NM]

- Removed *Prefs.ini::SmoothCodePath, hardwiring it to -2 (new pb6.1
option and current default). Removed other related variables, and
console commands related to them. The other values for SmoothCodePath
are just too buggy. Might resurrect things later under a new name, new
code that does things more the way I want them done. This might help
w/ making FE on pb6+ work better with axe's reported flickering
between start position and current; at least it should get rid of code
that I think isn't working well. [NM]

- Fix for bugzilla #35. Weaponmines needed updating after owner owns
simulation of weapons. Fix should be done at a general enough level to
apply to any other non-craft that has weapons. [NM]

-- b87f2 released ==========================================

- Tweaks to asset checks. This might cover bugzilla #45. [NM]

- Fix for bugzilla #41. Archers and other flying craft (APCs, SAVs)
should not drift off map while moving to their targets. [NM]

- Updates querying CPU info from Windows for battlezone.log
file. Opens keys in readonly mode, which might mean more data can be
acquired. [NM]

- Reduced network traffic somewhat on move packet retransmits. Leans
more heavily on Gamespy Transport (GT) to get the data thru, and less
on just spamming GT with packets. [NM]

- Tweak for bugzilla #11. All 'person's (pilots, soldiers, etc) are
not rendered until they've simulated at least once. On visual world
load, tries to update animations asap. [NM]

- Fix for bugzilla #52. Need to [re]start up things after at least
both visual worlds have swapped in. Only tested the pool smoke issue
-- finally got this to happen on my LAN. [NM]

-- b87g released ==========================================

- Fix for crash in bugzilla #57. Don't derefence NULL pointer. Just
not safe. [NM]

- Partial fix for bugzilla #53. For arccannons, cannons, machine guns,
and mortars/remote detonators, if resimulating remote players w/
trustworthy data, it'll skip sound efx and muzzle flash visual efx.
Weapons are now simulated twice -- once on first guess for a timestep,
and once when all moves for that player are trustworthy to that point.
Ordnance generated from the first simulation are swapped out for the
ordnance generated from the trustworthy sim. This fix should make the
non-ordnance efx only appear once. If this fix works, I'll apply it to
the rest of the weapon types. [NM]

-- b87g2 released ==========================================

- Fix for bugzilla #59. Animation structs had data that should have
been per-instance, but weren't. Moved variables around to the correct
place in object hierarchy. Did a 5 minute test run on
mpibridges.bzn. [NM]

-- b87g3 released ==========================================

- Work on bugzilla #11. Split the logging of long updates into more
frequent checks, so that if one section is the slow link, I'll have
more data. When in doubt, add logging... [NM]

- More work on bugzilla #59. Fix for Type I errors on built items. [NM]

- More work on bugzilla #53. For weapons that are known to be firing
on the initial guesstimated move, and also firing when the trustworthy
move has come in, it just squelches the second sim. This means
ordnance can be fired with guesstimated position/orientation, and
appear to hit/not hit in visual worlds. Real fix might be to do the
deep copy of all weapon member variables the way craft are simulated,
and intelligently simulate things multiple times in visual
worlds. That's far more work than I feel like doing right now. [NM]

-- b87g4 released ==========================================

- More work for bugzilla #11. Slightly reduced caching of current
system time clock for gamespy thread use. Not sure if it was ever
busywaiting with a timeout, but this should help ensure it has more
accurate times at the expense of a few more system calls. [NM]

- Fix for bugzilla #66. Recy/Factory panel tweaks. [NM]

-- b87g5 released ==========================================

- 'none' can be selected at recy/factorypanel once again. [NM]

-- b87g6 released ==========================================

- Work on bugzilla 17, 44, 55 & 67 - changed in-memory format of info
on moves that have been sent. Also tweaked which cached packet(s) are
resent over time to consider both the first send and also any resends.
Changed logging as well; if getting lagouts or faking moves messages
(that don't result in a lagout), please resubmit logs from client &
server.  Tested by pulling ethernet cables on my LAN. [NM]

-- b87h released ==========================================

- Probable fix for bugzilla #24, maybe also #48. Changes to terrain
made in lockstep world should force a terrain quadtree rebuild in the
visual world the next time that visual world's switched into. [NM]

- Even more work on bugzilla 17, 44, 55 & 67. Tweaked number of bits
of data for lost packet requests going over the wire. Should hopefully
improve reliability of requests. If things are out of range, will give
a fixme spam message. [NM]

- Fix for bugzilla 64. Haven't seen that family of issue in a
while. Tried to fix all possible instances. Again. [NM]

- Fix for bugzilla 54, comment #1. If teamplay is on it *ALWAYS* now
reserves (Player limit - 1) clamped to [0..4] as the count of F# keys
to reserve for allies. This fixes a case of using ctrl-F7 to try
to send turrets to ally in F7 not arriving on Strat::Bridge too far w/
a playerlimit of 6, but all 5 players ingame were on teamgroup A (left
column). If teams are on, it has to assume that the players will do
the worst possible stacking. Consider this use case:

Game: Strat High & Low (hilo.bzn), teams on, max # players 4
Players: (A & B) vs (C & D)
- At this point, only F10 would need to be reserved, as A's F10 = B,
  B's F10 = A, C's F10 = D, D's F10 = C.
- Players A-D distribute units on F1..F9
- Players C & D leave/lagout/etc
- Players E, F join game. And they join A & B. BZ2 doesn't enforce
  2v2. Just a max of 5 players/team
- At this point, F8-F10 must be reserved. But, as above, players A & B
  already put units on F8 & F9. Not fun.

   So, hope for the best, plan for the worst.

-- b87h2 released ==========================================

- Tweaked # of reserved slots when teamplay is on to (Max # players - 1)
clamped to [0..4]. [NM]

- Error message on loading DLLs now shows full path correctly. Slices
down from a unicode string before printing. [NM]

- Possible fix for bugzilla #63. Put clamp on # of tries it does to
keep unit path destinations on map. Spams to battlezone.log if the
timeout's hit. [NM]

- Possible fix for bugzilla #54 (main bug). In teamplay, if players
want to be on a teamgroup, but aren't in the range, the server should
try and move them to the team range. Do test. Start up lots of copies
of BZ2 as needed. [NM]

-- b87h3 released ==========================================

- Fix for bugzilla #68, and probably also bugzilla #72. On bad ping
kick, server shouldn't spam the kick. If client gets it while loading,
waits for load to complete, then bails to shell. Also some code
cleanups tracking current state. [NM]

-- b87h4 released ==========================================

- Fix for bugzilla #87, #88, AV when trying to use a limit I expanded
a while back. [NM]

- Possible fix for part of bugzilla 70. If a hovercraft (or derived)
blinks, it takes HC's setAltitude into account and tries to keep the
dest position far enough off the ground to stay about the setAltitude
up. Do test. [NM]

- Fix for bugzilla #93, 84. Late joins are stabler once again. [NM]

-- b87i released ==========================================

- Updated code near what caused problems for bugzilla #84, 93. Do
test.  [NM]

- Fix for abort from Load_Sky when tiled sky index buffer size is
zero. Should handle gracefully, but don't have a solid repro
case. Noted on private forums, no bugzilla. [NM]

- Possible fix for bugzilla 92. If in editor, doesn't archive up 
some commands for local user. [NM]

- Fix bugzilla 75 -- oddities in bzshell_multi_client_mpi2.cfg.
Probably harmless, but good to clean up. Also fix for bugzilla
76, so that harmless warning message doesn't appear. [NM]

-- b87i2 released ==========================================

- Possible fix for collisions involving the player craft causing
camera warping in MW. Was on the right track a while back in sorting
the objectList by effective seqNo, but hopout/get in craft meant that
the lockstep world and visual worlds had different sorting
orders. (Visual worlds sorted on create, lockstep was never updating.)
Now, setting something as user/not user/remote user causes a resort of
that world, for more consistent results across worlds. Noticed that in
addition to lousy results, the collision code is O(n^2) -- both stupid
*AND* slow. Basically, it burns CPU needlessly, especially when there
are a lot of collidable objects on the map. [NM]

- Possible griefer workaround. For MPI sessions w/ friendly fire off,
then anything generated by a local or remote user pilot/craft won't
hurt friendly units. Do test, preferably Strat & MPI sessions w/ FF
(ivar32) on and off. [NM]

-- b87i3 released ==========================================

- Possible fix for resyncs when local/remote players hop out/get in
craft. Reported on irc, not bugzilla. Now, on hop out/get in, it notes
that, but doesn't do any action until finished processing that
frame. [NM]

- Adjustment to griefer workaround above. In MPI, the human player on
that team is allowed to damage anything they want, but allied human
players can't do damage to other team's units. Strat/DM should be
identical to pre-87i2 code. [NM]

-- b87i4 released ==========================================

- Fix startup crash introduced in 87i4. Forgot to account for
gameobjects that disappeared before they could be sorted. [NM]

-- b87i5 released ==========================================

- Proper fix for resyncs when local/remote players hop out/get in
craft. (Bugzilla 98, 100). Improved consistency of operations done when
things are set as controlled by a local user and when something is set
as controlled by a remote user. [NM]

-- b87i6 released ==========================================

- Possible better fix for bugzilla #52. On switching visual worlds,
ensures that the particle effects are on. Old code would check
currently shown visual world before actually switching the visual
world. [NM]

- Fix for bugzilla #101, related to mantis #2377. For torpedos,
defaulted

[GameObjectClass]
UseVehicleCrashOnDeath = 0
NumChunks1 .. NumChunks5 = 0

   This defaults torpedos to not having seconday explosions on impact.
Modders are free to set up odfs that specify these, however. [NM]

-- b87j released ==========================================

- Fix for item mentioned on bugzilla #86's video. Armory should now
correctly track destination object across multiworld swaps, so that
powerups fired should reach them more accurately. [NM]

- Giblet updates. libpng updated to version 1.5.2. JPEG lib to version
8c.  libtiff to version 3.9.5. PCRE to version 8.12, littlecms to
2.1. libogg to version 1.2.2, libvorbis to version 1.3.2, speex to
1.2rc1 (and now built speex as DLLs). Rebased DLLs to load slightly
faster. Next full build for 1.3, and next full build of BZ2DXTGen
should include these. Speex (voice comm compression libs) will be in
next sub-build. [NM]

- Jumped default voice chat capture volume to 100%. This might help
with remote players not being able to hear others as well. Note that
if you already have a pb6+ userprefs/pilots file, this changed default
won't change your existing userprefs/pilots file. [NM]

- Tweak to collision code. Made it track a separate list of collidable
objects, and only collidable objects. This should reduce the amount of
memory it trolls thru when trying to collide things. The collision
code is (still) utterly braindead and does an O(n^2) search testing
every possible collidable object against every other collidable object
each turn. But, with a shorter list, this should go slightly
faster. Games programmed with an ounce of sanity in them (i.e. not
this one) use a quadtree/octree or some other spatial database to cull
out all collisions that just couldn't ever happen and only test the
probable ones. Seems to work in limited testing here. Might look thru
other cases of trolling thru the objectList and see if there's similar
cases where a constantly-searched list could be prefiltered. [NM]

-- b87j2 released ==========================================

- Fix for bugzilla 108, possibly also parts of 116. Tweaked code to
add/remove from collision lists to be safer when adding/removing. [NM]

-- b87j3 released =================================================

- Work on bugzilla #117, 116. Lowered optimizations on libspeex and
the gamespy voice libraries to try and get more info on these crashes.
[NM]

- Work on bugzilla #110. Does extra work to force-set local user
correctly on MP join loads. Just a guess; might be done correctly
already. [NM]

-- b87j4 released =================================================

- Full build installer now creates Start Menu shortcuts for bzone &
bz2edit, in regular and safe mode versions each. [NM]

- Fix(?) for bugzilla 104. When loading a .bzn/.sav, reapplies gfx
preferences a few seconds after loading is done to try and keep
reflections working when set to on in gfx options. Total bandaid fix,
didn't dig into real reason why. [NM]

- Fix for bugzilla #120, 117, 116. Fixed stupid copy/paste error made
with recent voice changes. I'll ramp up optimization levels in a bit
once I'm more confident in the fix. [NM]

- Fix for bugzilla #119. Added in ban buttons, paralleling kick
button, in some pregame and ingame screens. Did codeside work
(untested) to hide the ban button on clients. [NM]

-- b87k released =================================================

- Work on bugzilla #111. Moved archiving of player races to a
different place in the update loop. Also, when players move teams
around, it [re]archives their selections. Might work better. [NM]

- Tweaked security code a little again. Seems to work fine
here. Sorry, keeping details quiet. [NM]

- Fix for bugzilla #89. For first second of a unit's life, all normal
and special weapons are disabled. [NM]

- Fix for bugzilla #131. mpvehicles*.txt updates to exclude ODFs that
end in a digit. Do have to note that there's some variants (*12, *121,
_m30, _m35, _m40) that have similar digits at the end. I'm this close
to a giant search-and-replace on filenames. Renaming files requires me
to do that via Subversion (SVN), so this isn't something that could as
easily be done via modders. Unless we don't want file change history,
in which a set of renamed files could be sent on, and the old
filenames aren't referenced by anyone/anything. Not sure. [NM]

- Reduced strategy02/stratctf respawn height to be a bit closer to
base.  The maximum respawn height is higher if dying very far away
from base, and with a lot of allies. [NM]

- Tweak to MPI friendly fire griefing. Now (i.e. pb6.1), if MPI FF is
set to 'on' in the pregame options, it behaves like pb6's 'off' --
craft occupied by humans can hurt anything. In pb6.1, if MPI FF is set
to off (default), then craft occupied by humans can hurt enemies and
items on the same team (green on radar), but not items on allied teams
(blue on radar). For FF on or off on pb6.1, AI units on human teams
will only hurt enemies. The old option of pb6's FF on (AI kills
anything and everything, especially friendly units), nobody liked. [NM]

- Back to full optimizations on gamespy, speex libs. Bug has been
fixed. [NM]

- Fix for bugzilla #82. Latest GH version added. [NM]

-- 1.3.6.1 PublicBeta Release Candidate 2 (1.3.61.88) released ================

- Reduced volume on icomm01.wav by 8db. Was a little loud. [NM]

- Tweaked optimizations for speex libs. Eliminates more data. But does
do more sanity checks. [NM]

- Fix for bugzilla #132. Changed version text shown in login
screen. Made box bigger. [NM]

- Fix for bugzilla #133. Delay on weapons only applies to human pilots
who were ejected from their ships. Also reduced time to 0.6 seconds of
no-weapons. [NM]

- Fix for bugzilla #143. Consistent unit limit across all strat maps
shipped with 1.3. Will be in next full build; paths too long to easily
copy over. [NM]

- Fix for bugzilla #146. Removed mpvehicles.txt reference to files
that don't exist here. [NM]

- Fix for 'Sync join waiting on' message spamming out. Now builds the
string and then sends once, rather than sending per player waiting to
join. Had the braces in the wrong place. [NM]

- Fix for bugzilla #140. Made starting units start a little higher off
the ground, which should avoid some of the stiction seen. Not a truly
generic fix -- modded assets might have bigger things that cause this
bug to reappear. Might need to readdress later. [NM]

- Fix for bugzilla #107 - MPI Jungle changes. [NM]

- Work on bugzilla #130. Updates colors for allies (and foes) far more
often. See if this helps. [NM]

-- b88a released =================================================

- Possible fix for item mentioned on boards. supplydepot was saving
off items owned by parent class, which the parent also did. Now, only
one class saves this variable, the own owning it. [NM]

- Tweak to FF code. New FF off (pb6.1 default) doesn't apply to
true-neutral (team 0) objects. Falls back to the FF off (pb6 default)
behavior when team 0 objects are hit. [NM]

- Tweak to way cloned factory classes are stored in memory. Found some
code that was incorrectly determining cloned classes, refactored all
such code to use one common utility function. Might make things
better, might make things worse. Do test. [NM]

-- b88a2 released =================================================

- Event logging back on for editor builds. Will probably ship pb6.1
without it. [NM]

- Found some possibly uninitialized member variables in
missle.cpp. Should be more consistent now. [NM]

- Fix for bugzilla #153. For thermalmissiles that are NOT inherited
from a parent thermalmissile (i.e. the inheritance is the abstract
base class for thermalmissiles), if [ThermalMissileClass]::lockRange
is not specified, it defaults to 125% of that weapon's shotSpeed *
lifeSpan. The abstract base class for thermalmissiles had
shotSpeed=200, lifeSpan=5, so thermalmissiles would (by default, if
[ThermalMissileClass]::lockRange is not specified) default to a
lockRange of 1000. That would find items on the other side of the map
if no local targets could be found. Multiworld defaults to culling a
lot of items that are more than 400m away, so this gave warps. If
modders don't like this default of 125% of the effective range, then
they're free to have the ODF have an entry for

[ThermalMissileClass]::lockRange

   In general, range-based searches over large distances (1000m is
HUGE in BZ2 terms for a search) are CPU-expensive. And, any search
over the default 400m can have odd effects if MW is on. [NM]

- Fix for bugzilla #151. Handles duplicate items to preload better.
Tested on my LAN here with repro steps that seemed to break earlier --
did 6+ re-entries of the map listed on that bug.  [NM]

-- b88b released =================================================

- Fix for bugzilla #159. MayHitFriends function now ignores friends
that are invulnerable (maxHealth == 0.0). [NM]

- Fix for bugzilla #150. Tweaked some installer text. [NM]

-- b88b2 released =================================================

- Better fix for bugzilla #151. Need to make sure some lists get reset
at the proper time. [NM]

-- b88b3 released =================================================

- Tweak for bugzilla #148. If damager has team # of 0, or hit object
has team # of 0, it goes thru the old code. Savegames would be
helpful, but not provided. [NM]

-- b88b4 released =================================================

- Possible fix for AV in CommandPanel::MenuPredicate(), reported on
boards. Had to do some guessing, as the callstack offsets have changed
somewhat since pb6. [NM]

- Possible fix for aircraft class units not being detected as air
units. Code is similar to bomber/APC code that checks their
flags. Compiles, but is untested. Given that aircraft class was added
in the 1.2 patch and I never saw complaines about this until now, I
suspect things were very rarely tested anyhow. As noted on the boards:

   As has been previously noted, planes are second class (or third
   class or worse) citizens in BZ2. BZ2 is NOT a full-3D game under
   the hood. Blame the Mechwarrior 2, Interstate '76, BZ1 codebases
   for that, as they're all fundamentally a ground + elevation
   game. They're built with the fundamental assumption that all units
   are near the ground. The pathing code is 2D. All vehicle paths are
   2D. Searching for objects is 2D. Not 3D. Same with a bunch of other
   fundamental systems. The rude hacks to make units not consider air
   units are merely compounding the mess. Sure, they may be trying to
   make the best of an already bad situation, but I don't like adding
   more rude hacks on top of more rude hacks. I'm definitely not
   willing to do the massive re-engineering to make things 3D under
   the hood just to satisfy the small numbers of modders who want some
   pet feature. I try and focus my efforts on things that benefit
   stock first -- DirectX 9, netcode, etc. Mods may benefit as a side
   effect of those changes, but I want to improve stock first.

[NM]

-- 1.3.6.1 PublicBeta Release Candidate 3 (1.3.61.89) released ================

- Possible fix for bugzilla #162 (lagouts). Based on first logfile
provided, noticed this pattern:

 ST_JOIN calling ClearMovesForTimestep(7983)
Uhoh: couldn't find moves to resend for ts7976 of 1(id1) for 0. Tail = 7972, head = 8013, local tail 7972 head 8013

   It was zapping the entire cache of sent packets in the above, not
just the listed timestep. Fixed, so that it applies a scalpel, not a
nuke, to the cache. Do test, see if this helps. [NM]

- Also made some move cache uhohs show up in a public build. Were only
enabled in private builds before. [NM]

-- b89a released =================================================

- Fixed bug where lost move packet retransmits would go out only on
unguaranteed path. Now, multiple re-requests should have a copy of the
retransmit out on the guaranteed pipe, so there's a higher chance
it'll arrive in time. Also reduced time before retransmit requests. [NM]

- Fix for bugzilla #165. MWF is clamped to AIP run frequency
(once/second) only when there are AIPs running. [NM]

- Tweak to timeskew code. If verbose logging is on, spams out more
information as to how it got to that value. Reduced amount of timeskew
applied by 50%, back to pb6 levels. Do test, get me logs, like those
done for b89a. [NM]

-- b89b released =================================================

- More tweaks to timeskew code. When considering sampled data, it
sorts, and then excludes the highest/lowest samples. This might make
it a little more resistant to random spikes. Also made sure to work
around any possible signed/unsigned value problems. [NM]

-- b89c released =================================================

- Fix for bugzilla #179. Mismatch in tweaked logging. [NM]

-- b89d released =================================================

- Fix for AV in MirrorClass::AboveMirror, reported on boards. Needed
to do a NULL pointer check. Don't believe this function has changed
since 1.2, according to SVN history. [NM]

- Work on bugzilla #181, logs noting things on the 6/20/2011 games.
Noted that server got a client's goodbye message, but did not
propagate it to clients. Tweaked lots of logging in the function that
handles quit messages, so that it prints out far more info. Took some
steps to try and make sure that this won't happen again, but can't
tell.  Do try more tests w/ clients doing late joins and quits
(including alt-F4 quits) with lots of players ingame. [NM]

-- b89e released =================================================