[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. Compiles, but is untested. 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. Compiles, but is untested. [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. Compiles, but is untested. [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. Compiles, but is untested. [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 '
' [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. Compiles, but is untested. [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. Compiles but is untested. [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. Compiles but is untested. [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. Compiles, but is untested. [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). Compiles but is untested. [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. Compiles, but is untested. [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 Compiles, but is untested. [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. Compiles, but is untested. [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.5.86) released==========================================