[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. ] - Upgraded source control management to Subversion v1.5.1. [NM] - Updated all .sln/.vcproj files to Visual Studio 2008 + SP1. Note: this should kill support for Win 95/98/ME, as MS has deliberately dropped support for those OSs with the new compiler. Also, turned on various new compiler/linker flags, such as the "compatible with base address randomization and DEP." [NM] - Also upgraded to DirectX 9.0c, via the March 2009 DirectX SDK, another Win95/98/ME killing move. (DirectX hasn't supported those OSs for quite some time; I deliberately kept 1.3pb4/pb4a on the last Win95/98/ME-supporting DirectX.) If the 1.3TechAlpha5 full build installer doesn't install the associated libraries correctly, you'll need to run either the "web" (i.e. with an active internet connection) DirectX installer from http://www.microsoft.com/downloads/details.aspx?FamilyID=2da43d38-db71-4c1b-bc6a-9b6652cd92a3&DisplayLang=en or the full (i.e. offline, but an 93MB download) installer from http://www.microsoft.com/downloads/details.aspx?FamilyID=0cf368e5-5ce1-4032-a207-c693d210f616&displaylang=en The first link for the "web" installer is preferable if you've got an active internet connection, because it's smart enough to scan your system for what you've got, and then download only what it needs to, which'll almost always be well under 93MB. The 93MB download includes, for example, dlls built for both 32 & 64-bit OSs & apps, and one of those combinations won't be applicable to your system. [NM] - Updated full build installer to include VS2005SP1 redist files -- because 1.3pb4/4a installed this, as well as VS2008SP1 redist files. (I'm shipping VS2005SP1 w/ TechAlpha5 in case there were mods made that used that compiler, and users never installed pb4/4a. I'd like these BZ2 patches to be cumulative.) Along with the DirectX redist, this means that 25MB of the install footprint (and easily 25MB of the 1.3TechAlpha5 patch download size) is due to Microsoft updates. Sorry. I hope I don't have to add anything else from the DirectX installer, as the full DirectX redistributable installer is 86MB, far larger than *any* BZ2 patch from 1.01/1.2 to 1.3pb4a. The bulk of the BZ2 patches is addon maps and other assets; the DX installer is all code. Someone's full of bloat, and it ain't me. [NM] - Duplicate file detector ignores svn file droppings. [NM] - Deleted a lot of assembly to query the CPU's info in favor of just reading some keys from HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\CentralProcessor\0 . I don't think that key was available in Win95/98/ME, but Win2000 and up should support that. [NM] - Moved most (hopefully all) file operations from char* pathname to wchar_t*. (I.e. unicode should be supported). Note: game assets filenames should still be 7-bit ascii clean, but the base directories (i.e. {$MyDocs} or the BZ2 install folder) should support accented characters, Klingon, or the like. [NM] - Also upgraded installer to allow a unicode root path to install BZ2 to. Do test installing BZ2 to a folder with accented characters in its path. Also, do test with {$MyDocs} set to a folder with accented characters in its path -- you can move that folder on WinXP by following the info at http://support.microsoft.com/kb/310147 [NM] - If BZ2 runs into a problem, reports more info on memory use by bzone.exe/bz2edit.exe. Nice utility function wasn't available in Win95/98/ME. [NM] - Work on using DirectX 9 for items, mainly focusing on using vertex buffers for all static geometry (terrain, unskinned objects). This should allow offloading of a lot of work to the graphics card. A lot of stuff got disabled in the process, such as reflections, stencil shadows, etc. Please file individual bug reports for problems, rather than making one mega bug report with 17 separate issues. Also, just to be clear about this: a *LOT* of source code was changed by the simple paragraph above. Basically, assume that anything graphical-related had to be changed for it. Testers - assume that everything graphics-related is broken by this change until it's proven working by testing. [NM] - .dxtbz2 reader can read .dxtbz2, or unpack, if render.cfg or "/nodxt" is on the commandline. (I don't think pb4a had support for "/nodxt"). Please use bz2dxtgen to convert textures. Note - this includes all shell/loading screen backdrop textures -- previously, these were 640x480 textures. Now, they must be converted to .dxtbz2 textures, and therefore resized to power-of-2 sizes. The latest rev of DXTGen properly upsizes those textures to 1024x1024, with two mips, 512x512 and 256x256. If your videocard can't support 1024x1024 textures, the backdrops might look a little more fuzzy. If you've got a 3dfx Voodoo 1 or other card that only does 256x256, please consider a new card. I mean it. [NM] - Made mipmaps work. Needed to call SetSamplerState(0, D3DSAMP_MIPFILTER, ...) [NM] - Added "/mipcolortest" to editor build (ONLY). This will turn off dxt textures, and force mips past the top level to be recolored. Useful for debugging mips for me. Not sure if anyone else will find a use. [NM] - Pulled in the 'DXUT' source code from the DX SDK to manage windows, switching to fullscreen, enumerating graphics modes, etc. [NM] - Added support for static vertex/index buffers for meshes & terrain patches. [NM] - Added, to .trn files [NormalView] AmbientColor = "25 25 25 255" This helps get lighting on the terrain to mostly match when lighting is turned on/off. [NM] - Lighting is in and seems to work for the ambient light. Still not really sure that the spotlights on vehicles work well. Going to punt on that for now. [NM] - Testing to make sure I have write permission to SVN... [Ken] - Library upgrades: Bink 1.8.2 -> 1.8.23, now w/ .pdb file. (I'd like a time machine so I can go back and slap whomever thought non-power-of-2 sizes for movies was a GREAT idea ... wasted several hours making the Bink DX9 renderer able to handle such textures, especially with a max texture size of 256x256.) Also updated PCRE to version 7.8 and libpng to version 1.2.32. PCRE is still only used by DXTGen. [NM] - Skinned verts -- e.g. most scion units -- seem work now. Not sure yet if the normals are correct to make lighting work as expected. Still some parts of buildings (kiln, gunspire, but also ISDF recy) seem transparent -- might be the teamcolored chunks. Disabled MRM'ing of skinned objects, as the current memory structure involves a ton of work done on the CPU with copying things out of compressed lists to a more DX9-friendly structure. This is a somewhat expensive setup process that would have to be redone every time MRM'ing added or removed verts. So, I'm going to assume for now that it'll be better to do less of that setup, and just throw a lot of verts at DX9 and make the video card do all the work. [NM] - Cockpitradar (the 3D one) has polygonal mesh backdrop disabled for now. Said mesh was being rendered at the center of the screen, not placed correctly. Not important for first release. [NM] - Note - turning vsync on/off with the vid.waitretrace console command will take effect at the next mode switch (usually shell/game transition, or toggling windowed/fullscreen via alt-enter), not immediately. You can set the initial setting for vsync via render*.cfg, look for the VSyncWait line. [NM] - Hooked up a lot of DirectX 9 video mode options. The graphics config screen got a lot more crowded, sorry. The options should be applied at the next mode switch. If a multisampling mode other than 'none' is picked, D3D is told that it can multisample during the 3D phase of the screen drawing, but during the 'interfaces' phase, multisampling is disabled. [NM] - Rewrote fps measurement code to use higher precision timers (doubles, not ms as an integer) for framerate timers. This helps measure things far more accurately as framerates go over about 125. Also changed the in-game framerate display to update twice as often. It now shows framerate (rolling average of the last 8 frames), and recent/overall best/worst framerate numbers. [NM] - Rewrote 'medium' sky code, the flat plane of a tiled cloud texture. It was using some very odd things. I now throw a lot more polygons at the card, and trust that the clipper will do the right thing. My replacement code is simpler and easier to understand, at least. [NM] - In LocalPrefs_bzone.ini, drastically reduced LagSpamTimeout, others, in an attempt to get more info on the 4+ player lagouts seen in pb4a. Testers -- please play some 4+ player games (and/or use mortars or other things believed to cause the bug) and submit the chat logfiles from as many players in the game as possible. [NM] ---- 1.3 beta 77 released======= - AV fixes (I think) in IControl::GetTextString(), Graphic_Circle() and LoadUserProfile(). Not mantis'd, but posted on the b77 thread. [NM] - Edited names shown of graphics modes, like 24 vs 32 bit textures, stencil on/off, etc. [NM] - Fixed some transparency issues (mantis 1355). If objects are drawn with some alpha-blending modes requested, they're put into the transparent phase. Fixes the trees; does not yet fix nav beacons or recy dropoff points. Nav beacons look like they're being drawn in a mode w/o alpha requested, not sure where it was picking things up. [NM] -- b77a released======= - In render*.cfg, deleted SIS630Compatability and xmm lines. (The latter should have been removed for pb4a.) Added MaxHWLights, working on mantis #1367, because according to the caps I'm dumping, a tester's Intel(R) 82845G/GL/GE/PE/GV Graphics Controller, VendorId 0x8086, DeviceId 0x2562, driver version 0x0006000E000A10F6, says it can do 4 billion active lights. I call shenanigans on that. Especially on a 32-bit OS. There will probably be a lot of cases in this changelog where I call out broken HW & driver combinations. Get used to it. [NM] -- b77b released======= - Fixed positioning of sprites (e.g. pool smoke, headlight flares, etc), and probably also the 'squished' look as well. BZ2's calculation for aspect ratio used height/width; DX9 wants width/height. [NM] - Updates to transparency -- was reading wrong flag for bitmap transparency. Seems to behave a little better. [NM] - Fix for mantis #1367, finishing up some behavior I wanted to do. Wrappered the C abort() function (puts up the "this application has requested the Runtime to terminate it in an unusual way" dialog) to write out what file & line # that was triggered on, and also ensure that all writes to the battlezone.log file are flushed from memory buffers to disk. Then it can call abort(). [NM] -- b77c released======= - Fixed bug where savegames couldn't be loaded. Had some residual char* vs wchar_t* mixups for unicode paths. Mentioned in mantis 1319, boards. [NM] -- b77c2 released======= - Fix for mantis #1319 - AV in AudioMessageMgr::Simulate(), commonly seen during the mission 'Transformation'. Needed to check list size before accessing the first element. [NM] - Fix for interface elements drawing differently once 3D models were shown in the shell. (Mantis 1359, possibly others) Now backs up render state before drawing, and restores it afterwards. This should fix the blank bink movies after a 3D element appeared onscreen in the shell. Also noted that mipbias is a deprecated DX9 console command. [NM] - Added in a bunch of sanity checks to debug builds for index/vertex buffer overrun checks. Not catching anything, which is good. This is turned on in the editor build. If you notice some odd crashes, please try the editor build -- this might generate more logfile info. [NM] - Fix for mantis #1378. game.histogram displays correctly now. Made font use my RenderQueueItems to draw w/ right blending modes. (Font drawing was one of the first items moved to DX9, and RenderQueueItems came around later.) Also made a few more strings for histogram and the like create them w/ wchar_t; should help avoid calls to convert them. [NM] -- b77d released======= - Fix for sanity checks in editor build. Had a line of code backwards, and it wasn't in my debug builds. [NM] - Even more strings moved to wchar_t, added const to a bunch of them. The ones modified seem to be used mainly in the overhead 2D AI display. Check for any strings that are garbage or are truncated compared to pb4a. [NM] - Fix for mantis #1381 - truncated map name in .log file. Caused by incompletely moving things to wchar_t, just like the above entry. [NM] -- b77d2 released======= - Attempted to get texture blending code like DX6 working again. In SetTexBlendState(), attempted to rewrite SetRenderState( D3DRENDERSTATE_TEXTUREMAPBLEND, ...) the way the DX6 SDK docs said, in the section "Legacy Blending Modes and Texture Stages." Btw, if an ODF calls for "decalmask" or "modulatemask", please rewrite this asap. This isn't supported in DX6. Let alone higher. Supported modes are "decal", "modulate", "decalalpha", "modulatealpha" and "add". [NM] - Added a bunch of new RenderQueueItem modes -- items w/ an identity Matrix (saves pointless copying/setting), triangle strips, fans, point lists. Moved most items using identity matrices to the new items. This might slightly help performance. Like fix for mantis #1378 above, moved all remaining 'raw' render calls to RenderQueueItems, including the bink player. This also might fix mantis #1358 & 1383, but please check. [NM] - Turned off fogging for a whole lot of render items that I think shouldn't be fogged, mainly interface, some editor functions. Also reduced calls to turn DX9 fogging on and off -- should be completely controlled by RenderQueueItems. [NM] - Fix for mantis #1380. Texture blending modes specified in ODFs should work again. [NM] -- b77e released======= - More logging if an illegal blending mode is used in an ODF, with file, block & line listed in battlezone.log. Technically, the 'add' mode runs out out of a bitfield used, so it'll warn, too. No stock assets seem to use that, though. [NM] - Fix for false positive message that appeared in battlezone.log, "unsupported TexBlendState(0) specified. Ignoring request". It may still be possible to get this message, but it doesn't happen here after the fix. [NM] - As these functions were showing up in the CodeAnalyst profile runs, optimized VertexBuffer/IndexBuffer::GetDynamic to cache the last result, and check that first next time. That should save a bit of pointer chasing in the default case. This moves these two functions off the top 2 slots in the CodeAnalyst list, and to at least #7 (only 1.32%). - Camera::ProjectZ0 is now the #1 (by far -- 41.31% vs #2 Matrix::Transform_Vectors at 12.22%) function in the profiler. Transform_Vectors got a lot of SSE attention for pb4a, and is a real workhorse function. I don't mind it being this high. But, ProjectZ0 is used by just StatusDisplay and CockpitRadar at present. Slightly optimized it by providing an alternate function that assumes that input & output buffers are identical, and that the projection matrix has frontw == 1.0f, and positw == 0.0f, so that it can skip a multiply and an add, respectively. Doing just this made ProjectZ0 at 21% & CockpitRadar::Render (#3) at 13%. Further combined operations to make ProjectZ0CockpitRadar 24.5% and CockpitRadar::Render 4%. TransformVectors is now up to 20%, hopefully because it's doing more frames per second and therefore has more work to do. My stresstest level (probably 100 crigs standing around in a small space) lowers ProjectZ0CockpitRadar to about 6%, mainly because it's got so much more to do. That's still rather high for me. At some point, I may want to put a clamp on the # of times per second the cockpit radar is updated, or something. [NM] - Fix for mantis 1372, 1384, possibly others. Should exit a bit cleaner now. [NM] -- b77e2 released======= - Bit of a source code cleanup. Only one header is allowed to #include , and it controls which version of Windows we target (0x0500, i.e. Win2000 and up). [NM] - Proper fix for mantis 1358 - 2D map radar should appear correctly, whether at same resolution as shellwidth/height, or not. [NM] - Possible fix for mantis 1397. Not able to fully repro it here, but I did get a case where pressing escape on the intro movie (while the Activision logo is breaking thru) would lead to what looked like a freeze until BZ2 was alt-tabbed away and then back. Now handles WM_ACTIVATE with lowword(wParam) == WA_ACTIVE or == WA_CLICKACTIVE as a "should be running" flag. [NM] - Fix for mantis 1396 - AV when launching isdf20.bzn ("A Traitor's Fate"). Was trying to draw over 10922 sky points. With indices limited to a max of 65536, and each point consuming 6 indices, that's where the limit of 10922 comes from. It'll now whine to the logfile that it's clamping the # of sky points, but should recover from that. [NM] - Consolidated some duplicated structs referring to FVF types. This is a bit of a sweeping change, and might cause some bugs. [NM] - Made skypoints draw as D3D pointlists now. Might make them actually draw. Not sure. [NM] - Added, to .trn files [NormalView] SkyPointsArePoints = true If true, it tries to draw sky stars as D3D point sprites, which actually seems to make them show up here. (I remember Cary Chico complaining about this to me years ago.) If false, tries to use the old code w/ textured quads that don't seem to work half as well. Btw, if this value is true, then the # of sky points can go up to 65530, as it doesn't need the 6 indices per point. [NM] - Fix for mantis #1398. Zooming should work on 2D radar view. [NM] - Fix for mantis #1395. Removed that message from the battlezone.log, made it complain on debug builds only. (Which you guys don't get.) [NM] -- b77f released======= - Fix for shell models appearing outside of their bounding boxes, probably also the windows on targeting vehicles/buildings. Didn't set D3D viewport on switching cameras. [NM] - Fixed up cockpit radar (3D radar) background, though it's a little oversized right now. Not sure if this is something best fixed thru code or thru xsi tweaks. If other mods have the same issue, it might be better to do the fix in code. [NM] - Restored iface.screenshot capability, except when in MP games (MP Shell should allow screenshots, but while playing, this could cause lag). It should work when the backbuffer (see the graphics options pages) is set to A1R5G5B5, A2B10G10R10, A2R10G10B10, A4R4G4B4, A8B8G8R8, A8R8G8B8, R5G6B5, R8G8B8, X1R5G5B5, X8B8G8R8, or X8R8G8B8. This is all the modes my cards support, w/ though not all RGB vs BGR codepaths have been tested. Output bmp is saved in 24-bit format; some precision is either faked or lost in 12, 15, 16, and 30 bit formats. [NM] Other formats might be supported later; this should cover the majority of formats. This covers all the formats used by my card. If it's not working for you, it'll log to battlezone.log what format your backbuffer is in. Using Windows's 'printscreen' key functionality and pasting into paint should still work. I'm not 100% sure the codepaths work when /vista or /usemydocs is set (or auto-determined), and the path to that contains unicode (accented) characters. [NM] - Partial fix for mantis #1373. Sniper rifle seems to mainly work here. ISDF rifle doesn't seem be fully opaque; might be a nearplane clipping issue. [NM] -- b77g released======= - Moved shell map texture saving to OpenIL libs. iface.screenshot code used it too, so might as well harness this ability. [NM] - Possible fix for crash in SetGamma when starting (mantis #1405). This feels much more like a bandaid fix, and it'll crash elsewhere -- the D3D device isn't present, and lots of code assumes it's there. Not sure what caused this to happen, only the screenshot code seems relevant. Did add a little more logging, and added the render*.cfg item mentioned below. If this doesn't help, please try backing up your userprefs file (same directory as bzone.exe) as well as your pilots folder, and try with the -safemode commandline switch. If it starts up w/ -safemode, please mantis those backed-up files. [NM] - Added, to render*.cfg. See comments above it. AllowScreenshots = 1 - Added to commandline, -safemode. If present, will reset graphics options when the userprefs/pilots files are loaded to the defaults. Might help w/ odd crashes on startup (mantis 1405 again). [NM] -- b77g2 released======= - Library updates: libpng to version 1.2.34. Upgraded OpenIL libs to 1.7.3, which includes JasPer version 1.900.1. as part of OpenIL.dll. DXTGen v17 released with these libs, and support for Jpeg2000 (.jp2) file format. Optimization settings for 3rd party DLLs (OpenIL+dependent and PCRE) unified somewhat. OpenILChanges.7z should be updated to all the needed changes. Fixes self-assigned bug #1404. [NM] - More updates - in installer, upgraded from v3.23 of 7zxa.dll to version 4.62, the latest. Quick-tested here installing to a temp directory, all seems fine. [NM] - Fix for some water rendering bugs (Mantis 1386, maybe others), where water could seem to appear in front of items it was behind. Fixed by only drawing known-opaque items after all entities, but allowing the transparent item bucket to keep accumulating. This allows the water to be sorted more correctly with the items. This should fix some of the issues on dunesi.bzn where the 'mobush02' scrubfields near the north pool appear to have water in front of them. Note - the mobush02 object will, from certain angles, appear to have some of the plants rendering in the wrong order. This is not something that can be easily fixed at all -- all of its polygons are drawn in one batch. If it were a bunch of separate pieces -- e.g. the ibpgen, which has *11* (!) different pieces to render at its highest LOD -- then they could be depth-sorted correctly before submission. Frankly, I think there's a happy medium between these two extremes -- more than just 1 chunk, if it has independent transparent sections, but less than 11. [NM] - Fix for mantis #1352, possible also 1400. Changed the way certain sprites (submitted by TwirlRenderClass, TwirlTrailRenderClass, SpriteRenderClass) are submitted to DX9. Rather than having BZ2 try and transform & project them, handle clipping and such, I now send them as 2D billboards to DX9 and let it figure out the rest. This should ensure that z-positions are accurate, as DX9 is doing the same work as rendering objects & terrain. The light flare code (used to draw the shiny headlights, not the cone of light emanating from them) in vidrend.cpp should also be changed over to this better path, but when I converted it over, I got totally blown-out lights, far larger than they should be. So, light flare sprites in vidrend.cpp are still using the old code. Also tweaked WaveRenderClass -- it seems to be working with untransformed verts, but b77-77g2 was treating it as submitting transformed verts. Check that effects using all four of these changed render types draw correctly. [NM] - Some work on mantis #1412. If vertex/index buffers can't be created, it'll log more info to battlezone.log. Also made it so that any DX errors should cause spammage to console/messagebox. This should make it slightly more obvious as to when DirectX errors occur. The console/messagebox message will be shorter than what's in the battlezone.log; it's there mainly to help you notice when those errors are generated. [NM] -- b77h released======= - Better fix for mantis #1412 - ibmega has render chunk w/ 0 verts & indices. Made it silently skip that, rather than generating a DX error over it. [NM] - Possible fix for mantis #1390 -- can't say I ever saw this when I started up bridges2i.bzn, turned on 3rd person view, and strafed around. Flames seemed fine in that case. If there's a more reliable way to repro this, let me know. Basically, there was a copy/paste bug w/ flames that referred to the wrong set of indices for the flame 'tube', now fixed. [NM] - Fix for crash seen starting up BZ2 w/ multisampling enabled. (Mantis 1405) Two parts: (1) don't start enumerating D3D devices until window is created, as DX9 seems unhappy. (2) If multisampling is on, act line render*.cfg::AllowScreenshots is off. Otherwise, Direct3D's ValidatePresentParameters() call throws an error, saying that lockable back buffers (i.e. ability to read pixels off screen) aren't supported w/ multisampling turned on. Added a console message to iface.screenshot code to notify people why their screenshots aren't being taken. [NM] - Fix for mantis #1403 (self-assigned bug). Range based fog is now enabled by default, if your card supports it. (To see what it is, and why it's a good thing, there's some pictures in the D3D docs at http://msdn.microsoft.com/en-us/library/bb206336(VS.85).aspx Edit render*.cfg to turn it off, if you really want to turn if off. [NM] - Screenshots, /shellmap # code now properly switches to the output path (which may include unicode chars) before writing their files. shellmap code will also write to {$MyDocs}/My Games/Battlezone II if /vista or /usemydocs is on, making it far more vista-happy. [NM] - Fix for mantis #1415 - y-flip on minigun ground impacts. Changed code in spriterenderclass (minigun impacts), twirlrenderclass, twirltrailrenderclass to negate use of viewUpVect, which seems to produce desired results. Please check that I got the sizes of these effects right compared to pb4a. [NM] -- b77i released======= - Fix for mantis #1406 - dlfree AV after hitting 'abort' back to main menu from scion01.bzn ('Transformation'). In AlternateAnimalProcess, was doing an unsafe cast from the animal to 'Person' class. Added a derivation check, and it still did that. Found that LandCreature.h and Boid.cpp were claiming that their objects were 'Persons', even though they're clearly not derived from that. Fixed that, and the AV went away. Did a scan for casts to (Person*), and fixed up Barracks::BuildPilot() and TurretCraft::TerminalSwitchOff() to be far more paranoid about typecasts w/o checking. [NM] - In case issues like mantis 1406 (see immediately above) happen again, added GamePrefs.ini::CheckMemoryEachFrame. (See comments above it) That'll cause crashes to happen sooner, hopefully giving some idea when things go off the rails. Works ONLY in editor build. [NM] - Fix for mantis #1425. Same fix as mantis 1352 above - sprites at wrong Z position. Went to DX9 based code, though the sprites may not be scaled 100% identically -- I had to scale down to 25% of the size passed in to get what looks about the same to my untrained eye. Also eliminated an unused (always true) 'scaleSize' param to Vid::SubmitSprite(). [NM] - Checked pb4a code, computed the color correctly for the cone of light that comes out spotlights (e.g. headlights on recycler). [NM] - Fix for mantis #1426 - think I fixed the wireframe previews of buildings about to be deployed/constructed. Copy/paste error, like #1390. [NM] - Work on mantis #1427. Might be a dupe of 1425, as I wasn't seeing the behavior described in the bug reports w/ my fix for 1425 already done. But for BoltRenderClass, GeomRenderClass, PlanarRenderClass, SphereRenderClass and StaticRenderClass, did change the calculations of estimated Z-distance for the particles being submitted. These calculations are more in line w/ the rest of my RenderItemQueue code, so it ought to work. [NM] - Possible fix for mantis #1402 - multisample quality choice was being compared against the # of options in the refresh rate dialog. This may fix some (lack of) stickiness with that setting. Note, however, that the console variables, e.g. options.graphics.multisamplequality, are the *index* of the entry in the list. Thus, 0 = first item shown, 1 = second item shown. For MSQuality, that tends to line up with the entry text, but for the rest, it'll correspond less. Also, these console variables tend to be 0 until the user enters the shell or the escape menu (if you launch into a mission via the commandline). Only after you satisfy that will the variables have meaningful values. [NM] - Some work on mantis #1423. Needed to see the full logfile to see that it happened on quit-to-shell. The D3D device had been lost, but BZ2 thought it didn't need to (re)create the device as the settings hadn't changed from the game. Now, it'll always call DXUTCreateDeviceFromSettings() if it's had OnLostDevice without a OnCreateDevice/OnResetDevice since then. Seems to work ok with this change in limited testing. [NM] - Possible fix for mantis #1362 - when no longer underwater, it uses the map's default fog start/end ranges, as specified in the sky info. [NM] - Removed some code for depth-based fog tables. Seems to be part of the old DX6 codepath. Should be a slight optimization. [NM] - Some more changes to multisample code -- anything in the 'interface' renderqueue item list will be drawn with multisampling off. This seems to fix some artifacts seen when running the shell w/ multisampling on. (I think the 3D model viewer might have turned it on and left MSAA on.) [NM] -- b77j released======= - Work on mantis #1428 - overcreation of index buffers. Basically, if index buffers can be created once and shared, it's more efficient to DX9 than creating lots, or copying into dynamic indexbuffers. Changes made to the following. (Quickly) tested parts are: Terrain render chunks, EngineFlame, StatusDisplay (player's hull, ammo guages), LightRend (headlight cones), iface_util (2D interface graphics), LaserSight, font. I'm now seeing framerates over 200fps at the start of bridges2i.bzn, in a *debug* build. I remember times during BZ2's development when debug ran at 4-5 fps. Items that weren't really tested (mainly particles): TrailRenderClass, TwirlTrailRenderClass, ShieldEffect, BoltRenderClass, SphereRenderClass, StaticRenderClass, WaveRenderClass. [NM] -- b77j2 released======= - Fix for mantis #1430 - sprites in the sky are rendered now. If there's other sky items not (yet) appearing like pb4a, bug them. [NM] - Possible fix for mantis #1391, though I've not seen it locally. icviewer.cpp now sets a flag asking for no fogging on any submitted 3D verts. [NM] - Partial fix for mantis #1429. If a (non-skinned) mesh is being rendered, and it has colors set (via XSI, possibly also team colors(?)), those are passed along to DX9. Pools still don't quite blend in w/ the surrounding terrain, but it's an improvement. [NM] -- b77j3 released======= - Fix for AV in Bitmap::UnLock(), noted by Axeminister on the boards. Does more checks to ensure it has valid pointers. Doesn't fix the root cause that non-dxtbz2 textures aren't (yet) read. [NM] - Fix for mantis #1434. Was submitting incorrect starting index into sphererenderclass's LOD tables. Broken in work on mantis 1428 above. [NM] - Fix for mantis #1387. Multiple instances of a single type (e.g. pilot, mauler, etc) of skinned object were being drawn into the same vertex/index buffers. Therefore, only one would appear onscreen. Now passes more context into the drawing code so that it can differentiate the instances. Seems a little hacky, but seems to work here. Do test; if logfile reports "Uhoh. Hack for mantis #1387 not set up properly by caller" then let me know. It'll complain about that only once per run of BZ2 to avoid logfile spammage. [NM] -- b77j4 released======= - Better fix for #1387, hopefully also #1441. Wasn't setting things up correctly for my hack above. Also found a few uninitialized varbs in MeshRoot's constructor; set them to safe values. The message might still occur in some places; do test. Savegames demonstrating it would be helpful. Thanks. [NM] -- b77j5 released======= - Replaced Utils::findext() with strrchr(pPath, '.'). Simpler, faster. Might have some side effects; replaced code is mainly in xsi/msh/bitmap loading code. [NM] - Fix for mantis #1431, probably also #1356. Now reads non-.dxtbz2 texture formats. And probably nowhere near as fast as .dxtbz2 files can be read in. Note - 640x480 backdrops will be converted to 512x512, which'll probably make them look a little fuzzy. (battlezone.log entries will be generated noting the complaint.) Once again, please just run everything thru the latest dxtgen. [NM] - Possible fix for mantis #1363 (don't have a good repro case, just a logfile). If device is known lost on modeswitch, then try to reacquire it. Can't test, but seems like it might work. [NM] - Tweak to the way 'shell' and 'game' modes are switched. As the loadscreen backdrops are now upscaled (assuming conversion to .dxtbz2 w/ latest converter), BZ2 now switches to the 'game' resolution (i.e. whatever's picked in the graphics options pages) at the start of the mission load process, not the very last step. This means there's a much more seamless transition from the loadscreen to the game. [NM] - Fix for mantis #1360. Items weren't being drawn as 2-sided, and clipped out. Found a few other instances where similar things were done (mainly sprites), and set the 2-sided flag on them as well. [NM] -- b77k released======= - Fix for mantis #1354. The transparent box around selected items now renders, as do the box corners. Main thing was that 3D cockpit radar changed the Direct3D viewmatrix before the box could be pushed to D3D. Now, changing the D3D viewmatrix will force a flush of queued items, just like changing the camera does. [NM] - More work on mantis #1363. Now tries up to 3x to reacquire the device if it's lost after a modeswitch. Not sure if I should just exit on persistent failure, or something. [NM] - While working on mantis #1354, made setting the D3D world matrix owned by the renderqueueitems being submitted. Terrain, water, construction display, collapse/extrude/morphingmesh, and some other parts were setting this outside of the renderqueueitems, which might lead to either slowdowns or misplaced items. This change might break things, do test. [NM] - Tweak to work on mantis #1431. For a non-.dxtbz2 texture, now asks Direct3D to generate all the mipmaps. Might be faster than using OpenIL to resize; almost certainly lower quality than OpenIL. Once again, if you don't like the quality, then use .dxtbz2 textures. dxtgen allows full control over the formats. [NM] - More work on items like mantis #1428. Skydome, tiled 2D sky, sky clouds, water, sprites, 2D mapradar, reticle, collision mesh render now use static indexbuffers. 2D sky now does a quick trivial visibility test vs the camera, which should reduce # of items submitted. Should provide a slight speed boost. [NM] -- b77k2 released======= - More work on mantis #1363. More patient on the modeswitches, sleeping some time and processing any queued Windows messages. And, more logging while it does so. [NM] - SpriteRenderClass, TwirlRenderClass, lightning have some mantis 1428-like work on them, where they use static indexbuffers for their quads, instead of allocating and copying. Lightning is definitely untested. Also fixed mantis #1432, 'light' (a sprite, actually) on sp-stabbers is positioned correctly. [NM] -- b77k3 released======= - Even more work on mantis #1363 - much more logging. Also pauses DXUT on repeated attempts to acquire a device. [NM] - Fix for mantis 1453. Morphing MRM'd meshes should appear correctly during the morph. [NM] -- b77k4 released======= - Even more work on mantis #1363 - makes DXUT code ignore paused/unpaused state on repeated tried. [NM] -- b77k5 released======= - Even more work on mantis #1363 - attempts to periodically restore windows [NM] - Work on mantis 1435 - made the World_CLine function pass in 3D positions to Direct3D, instead of doing the work on the CPU. [NM] -- b77k6 released============== - Fix for mantis #1473, 1422. Added [CraftClass] UserCockpitSound = "" AIOnly = false GetInRaceMask = -1 The first is a sound effect that is played when the craft is occupied by the local user, effectively an ambient cockpit sound efx. The second is a counterpart to [GameObjectClass]::playerOnly, which allows modders to filter whether a pilot (person) can enter a craft. Finally, GetInRaceMask is a way to 'lock the doors' on craft, like [GameObjectClass]::PowerupAcceptMask, which allows craft to filter out which races of pilots (persons) can enter. Like that one, a == 1, b == 2, c == 4, d == 8, and so forth, where a value of 1 means "allow" and 0 means "deny." [NM] - Fix for mantis #1477. Non-skinned collapsemeshes (e.g. building destructions) should appear where the building was. [NM] - Fix for mantis #1492. 2-sided flag was needed on ground sprites. [NM] - Fix for mantis #1488. Cockpit radar was leaving camera view in bad state if nothing to draw. [NM] - Fix for mantis #1472. If skydome has no indices, then just silently exit. Modders should learn to properly toggle the skydome off. Cunningly, the console command to do just that is "sky.toggle dome". [NM] -- b77L released============== - Proper fix for mantis #1482. Increased some limits, also added range checking to a second array in the file. While playing w/ savegame, noticed another array in another place that needed range-checking. Added guard code, and a once-per-run logfile error message about it if the limits are exceeded. For both cases, upped buffer sizes by a lot. This may have been the causes of some really random crashes, especially some at shutdown. Note - I'm keeping details under wraps in the changelog, because I don't like talking about potential ways to crash older builds. [NM] -- b77L2 released============== - Fix for mantis #1348, 1332, and some things I thought might be useful to modders. Added in some DLL callbacks: DLLEXPORT bool DLLAPI TerrainIsWater(const Vector &pos); DLLEXPORT bool DLLAPI TerrainIsWater(float x, float z); DLLEXPORT bool DLLAPI TerrainGetHeightAndNormal(const Vector& pos, float& outHeight, Vector& outNormal, bool useWater); DLLEXPORT bool DLLAPI GetOutputPath(size_t& bufSize, wchar_t* pData); DLLEXPORT bool DLLAPI GetPathPoints(Name path, size_t& bufSize, float* pData); DLLEXPORT Handle DLLAPI GetOwner(Handle h); DLLEXPORT void DLLAPI SetTarget(Handle obj, Handle target); DLLEXPORT void DLLAPI SetOwner(Handle obj, Handle target); See comments above them in scriptutils.h. Bug me if I forgot to upload a latest DLL source distribution w/ scriptutils.h. Note: can't guarantee that mines/torpedos/etc have the owner set as expected. [NM] - Fix for mantis #1351. Exposed a few more constants, and added some new items: [HoverCraftClass] OverLandVelocFrontMult = 1.0f; OverLandVelocSideMult = 1.0f; OverLandThrottleMult = 1.0f; OverWaterVelocFrontMult = 0.75f; OverWaterVelocSideMult = 0.75f; OverWaterThrottleMult = 0.8f; AirborneVelocFrontMult = 1.0f; AirborneVelocSideMult = 1.0f; AirborneThrottleMult = 1.0f; AirborneMinHeightRatio = 2.0f; AirborneMaxHeightRatio = 5.0f; DeployedOverLandVelocFrontMult = 1.0f; DeployedOverLandVelocSideMult = 1.0f; DeployedOverLandThrottleMult = 1.0f; DeployedOverWaterVelocFrontMult = 0.75f; DeployedOverWaterVelocSideMult = 0.75f; DeployedOverWaterThrottleMult = 0.8f; DeployedAirborneVelocFrontMult = 1.0f; DeployedAirborneVelocSideMult = 1.0f; DeployedAirborneThrottleMult = 1.0f; DeployedAirborneMinHeightRatio = 2.0f; DeployedAirborneMaxHeightRatio = 5.0f; UseWaterHeight = true DeployedUseWaterHeight = true Lots of options. This allows users to specify how hovercraft handle over water, and airborne. The 'FrontMult' values are a multiplier on velocForward/velocReverse, and SideMult is a multiplier on velocStrafe. The Airborne min/max heightratio is used to blend between land/water and the airborne values. A craft's heightratio is the current altitude (above land/water) divided by [HoverCraftClass]::setAltitude, so that if it's at setAltitude, heightRatio is 1.0. If it's twice setAltitude, heightRatio is 2.0. Heightratio values less than the MinHeightRatio will use the land/water setting. Values over MaxHeightRatio will use the airborne setting. If it's between min & max, it linearly interpolates between the settings. UseWaterHeight is a way to use the water when calculating heights to be at. [NM] - Fix for mantis #1501. Betty voiceovers are surpressed during building upgrades. [NM] - Possible fix for mantis #1503. Updated draw_geom code to (1) submit verts even if it might be slightly clipped, (2) submit it in the opaque phase, as long as the object's color is set to opaque, (3) use a static indexbuffer for better performance (like mantis 1428). Note: the odf in the bug's assets uses a fade-in in alpha, so it will temporarily be submitted as transparent. [NM] -- b77L3 released============== - Further draw_geom code changes. Calculates bounding radius of the geom as it's loading, and uses that in the camera clipping code. Should provide a good balance of performance vs popping. [NM] - Fix for damage caused by draw_geom changes last build. Added, to odf chunks with renderBase = "draw_geom", this entry: [Section] renderBase = "draw_geom" ForceDrawTransparent = true If ForceDrawTransparent is true (default), then the old behavior (pre 77L3) is used -- always drawing the item in the transparent phase. If false, then it'll draw it in the opaque phase if the color is opaque and the texture used is opaque. To fix the assets in the original mantis 1503 report, this line should be added, but set to false to get the 77L3 behavior. [NM] - Updated comments above some of the scriptutils.h calls added last build. [NM] - Fix for mantis #1497. Made ExtrudeMesh (isdf build effect) batch up calls to draw lines. It was submitting hundreds, if not close to a thousand lines per frame, as individual draw calls. That sort of inefficiency hurts performance. Now batches up to 512 at a time -- though it still may submit more than one batch per extrudemesh per frame. Shouldn't produce any graphical anomalies, but please test to ensure that this effect still works. [NM] - Fix for mantis #1494 & 1496 - non-skinned objects draw correctly while being built. Yet another change to ExtrudeMesh, but a pretty trivial one, just needed to pass in a matrix. Skinned objects (tested fvscout) seem to draw fine thru ibrecy, but do test for anomalies. [NM] - Decent amount of work on lighting. Moved calculation of which lights affect an object from before submitting it to the renderqueues. Now calculates it as the renderqueue item is submitted to Direct3D. This seems to reduce lighting popping by a bit. It's still not quite as bright & noticeable as it was in pb4a. Terrain lighting is sometimes on a larger area than one might expect, mainly because terrain is submitted as large triangles; it's harder to get even lighting w/ vertex colors on large triangles. Also reduced number of calls to change DirectX light state; this might have a slight performance benefit. But, making the light-finding code on a per renderqueueitem may now make things run a bit slower. Do check if this build has better or worse performance, especially at lights > 1. [NM] - Possible fix for mantis #1479. Turned on specular lighting if # of lights is set to anything other than 'none'. Not sure if there should be turned off at other points, e.g. obj detail not high, or something. [NM] - Fix for mantis #1450. Submits constructiondisplay in transparent phase when showing the 'solid' preview, and the alpha set on the vertices isn't opaque. [NM] - Fix for mantis #1509. When attempting to place a building, colors terrain appropriately. Not as well-optimized as it could be (uses lots of shareddynamic verts, instead of the static ones for normal terrain), but it seems to work fast enough here. [NM] - Fix for mantis #1487. Editor terrain wireframe modes/site camera should now work. Not as well-optimized as it could be (uses lots of shareddynamic verts, instead of the static ones for normal terrain), but it seems to work fast enough here. In this case, I don't care so much, as people don't expect the editor view modes to be as speedy as the main game. [NM] - Fix for mantis #1504. Changed LaserMissile to use the target's center of mass, if it's a gameobject -- basically copying & pasting code from Missile. Seems to work ok. [NM] - Fix for mantis #1489 - allowed water height retrieval to work when on a water terrain tile, or a building terrain tile. Previously, it was water only. If you want to restore the old behavior, try setting this in the .trn file to false: [NormalView] CheckUnderwaterBuildings = true // true == buildings underwater can fog view Note: this exposes a further bug, in that hovercraft sink underwater in said buildings. Not feeling like trying to fix that now. [NM] - Fix for mantis #1407, probably also 1463. Fixed the 'target' view when in 3rd person. Needed to draw the same way as the 1st person view -- after all normal objects are submitted, not before. [NM] -- b77m released============== - Fix for mantis #1510 - doesn't aggressively cache list of lights 'known' to DX9 as aggressively. It now forces that list to be redone every frame, which is probably a little overkill (as DX9 is being told redundant info), but should be far safer. [NM] - Fix for mantis #1218. Added [ServiceTruckH] or [ServiceTruck] ServiceAllies = false [SupplyDepotClass] ServiceAllies = true If this value is true, then it'll service non-enemies, as long as the other flags, like ServiceCraft, ServiceBuildings, etc also pass their checks. If false, it'll only consider items on the same team. [NM] - Fix for mantis 1437. Arrows on scrollbars on graphics options page should now be clickable and move the visible range -- NOT the selected item -- up/down, if there's more contents than fit onscreen. This change affects all scrollbars; do check to ensure something didn't get broken. [NM] -- b77m2 released============== - Fix for mantis #1513. Added [ServiceTruckH] or [ServiceTruck] AllyRangeScan = [CraftClass]::engageRange This takes effect only if ServiceAllies == true. This value defaults to the value of [CraftClass]::engageRange, which defaults to 200.0. Values less than [CraftClass]::engageRange will make it ignore allied units that are above AllyRangeScan distance away. Setting AllyRangeScan to a value above [CraftClass]::engageRange is pointless, as the search function only considers things within [CraftClass]::engageRange. [NM] - Fix for mantis #1508. Added [GameObjectClass] CondAddHealthMinRatio1 .. CondAddHealthMinRatio8 = -1 // < 0 : disable this CondAddHealthMaxRatio1 .. CondAddHealthMaxRatio8 = -1 CondAddHealthValue1 .. CondAddHealthValue8 = 0 // value, like AddHealth CondAddHealthFlags1 .. CondAddHealthFlags8 = 2147483647 This is a way to conditionally add health to an object, when one of the conditions is met. Up to 8 triggers are allowed. Of the above params, the 'Value' is the easiest to understand -- it's like the 'AddHealth' value, and is applied if the following conditions are met. MinRatio/MaxRatio are values that should be in the 0.0 .. 1.0 ratio for a valid condition, and are min/max for the health ratio (1.0 == 100%, 0.5 = 50%, 0.25 = 25%). If the MinRatio value is < 0, then the condition is considered 'off'. The 'Flags' param is the most complicated, and is a bitfield consisting of the following bits. The default value of 2147483647 means that the low 31 bits default to 1. Please set all unused bits to 1, for future expansion. Bit 0 (value = 1) Val=1: condition done when craft is empty. Val=0: skip if craft is empty Bit 1 (value = 2) Val=1: condition done when craft is occupied by AI. Val=0: skip if craft is not occupied by AI Bit 2 (value = 4) Val=1: condition done when craft is occupied by human (local/remote player). Val=0: skip if craft is not occupied by human (local/remote player) Bit 3 (value = 8) Val=1: condition done when craft is undeployed. Val=0: skip if craft is deployed - bit flag is skipped if not a craft Bit 4 (value = 16) Val=1: condition done when craft is deployed. Val=0: skip if craft is undeployed - bit flag is skipped if not a craft Bit 5 (value = 32) Val=1: condition done when object is unpowered. Val=0: skip if object is powered Bit 6 (value = 64) Val=1: condition done when object is powered. Val=0: skip if object is unpowered Bit 7 (value = 128) Val=1: condition done when object is not locked down. Val=0: skip if object is locked down Bit 8 (value = 256) Val=1: condition done when object is locked down. Val=0: skip if object is not locked down Note - all conditions must pass for the value to be applied. More bits will be considered, if they're an easy check to make. And, just to pre-empt the logical followup 'bug', added [CraftClass] CondAddAmmoMinRatio1 .. CondAddAmmoMinRatio8 = -1 // < 0 : disable this CondAddAmmoMaxRatio1 .. CondAddAmmoMaxRatio8 = -1 CondAddAmmoValue1 .. CondAddAmmoValue8 = 0 // value, like AddAmmo CondAddAmmoFlags1 .. CondAddAmmoFlags8 = 2147483647 Same thing, but for ammo. Copy & paste job; applies to craft's overall ammo, not localammo. [NM] - Fix (I hope -- this change sure took a while) for 1363, 1474, possibly some others. Removed render*.cfg's ShellWidth/ShellHeight params. Instead, it now uses whatever resolution you've picked for the game resolution for the shell. (Note: fonts aren't scaled up, as they look pretty ugly when blown way up). Instead, to render*.cfg, added AllowModeChanges = 0 If this is 0 (default), any changes to video resolution, format, etc (basically anything on the right column of the graphics options page) will take effect the next time BZ2 is started, and the user is prompted to do that. If 1, then mode changes like have been seen in 77-77m are allowed. Also added two console variables, 'iface.shellresx' and 'iface.shellresy'. These are the values that tell BZ2 what resolution the shell is built for, and default to 640 & 480, respectively. Higher-res replacement shell cfgs can set these values higher, and not be subject to the on-the-fly scaling. [NM] -- b77n released============== - Tweaks to work just above. Added, to render*.cfg: WindowedWidth = 640 WindowedHeight = 480 Allows you to configure the non-fullscreen resolution. The shell is still scaled up to match as needed. [NM] - Fix for part of mantis #1522 - after switching to game mode, but when resolution changes are disabled (default), then the interface is told of the new, "true" size to work with. Also made movieplayer scale more accurately to non-640x480 resolutions. [NM] -- b77n2 released============== - Further changes after shell expansion. Added 'iface.shellexpandfont' console variable, defaulting to 1. Values that matter are 0 (don't expand font) and anything else (expand font). I think the fonts are a little blurry when scaled up from 640x480 to 1920x1200, but it seems reasonable to me. Try setting that to 0 if you don't like the results. Also made the 'viewer' interface (3D models) not move its position if it's in game mode. [NM] - Turned down callstack optimizations on VarSys::VarItem::TriggerCallBack() to try and get more info on mantis #1528. I'm going to need repro steps to fully get this bug fixed. [NM] - Fix for mantis #1527 - DLL taunts code wasn't safely handling cases when it wasn't set up correctly. Hopefully made the code far more bulletproof. Taunts code is used by DM, IA, MPI DLLs. [NM] - EditObject::ApplyPlace() will refuse to place an object if it's not a GameObjectClass, e.g. 'gblink' (a weaponclass object). Fixes a crash I saw in the editor in debug here. [NM] -- b77n3 released============== - Upgraded to version 6.10.3.233 - November 18, 2008 - of the Debugging Tools for Windows, from http://www.microsoft.com/whdc/devtools/debugging/default.mspx This is the dbghelp.dll included with BZ2, and handles turning crashes into callstacks. [NM] - Upgraded to version 1.7.5 of the OpenIL libs, used by bzone.exe, bz2edit.exe & dxtgen.exe. Verified that all is working by reconverting all textures to .dxtbz2 format; none of the 1085 files changed. [NM] - Slight lighting optimization - now recomputes list of active lights on an object only when the vertex buffer being submitted has normals bundled in it. [NM] - Possible fix for mantis #1526. Calls utility function to ensure that tracked vehicles are repositioned. Savegame called for fvservgh.odf, which doesn't exist locally. [NM] - Asset updates. Added tweaks from mantis 1317 (v2), 1516, 1531 (b2). [NM] - Fix for mantis #1529. Added, to all DM/Strat/StratCTF/MPI map .trn files: [DLL] RespawnAtLowAltitude = false This is a tuning value read by those DLLs, and allows the mapmaker to disable the extra altitude given to pilots as they respawn. People modifying DLLs can use this code as an example of reading params out of the .trn file -- basically a way of putting map-specific params in a place w/o using ivar/svars. [NM] - Fix for mantis #1461. Multilayer terrain is submitted as (up to) 3 additional draw calls. Seems to work. [NM] - Fix for mantis #1517. Remnants of the old 'terrain reduce' code was causing terrain vertex buffers to be recreated each frame. Removed that. Also, made terrain & shadow detail options to be low/high only, not low/med/high. High shadow detail has never really worked correctly, so I'd rather make it obvious that people shouldn't expect it to work. [NM] -- b77o released============== - Copyright date on bzone.exe/bz2edit.exe is 2009. Forgot to bump this. [NM] - Fix for mantis #1377, probably others. Items w/ diffuse vertex colors that have alpha are submitted in the transparent phase now. This also seems to fix the lack of transparency in navbeacons & recy/factory dropoff points. [NM] - Proper fix for mantis #1526. Savegame loads now after doing asset updates above. [NM] - Possible fix for mantis #1506. Wasn't passing in vertex colors to extrudemesh (recy building effects) or collapsemesh. Still not convinced that normals are being set correctly. [NM] - Fix for mantis #1470. Switching away from targetcam wasn't setting D3D View Matrix correctly. [NM] - Possible fix for mantis #1485. Noticed pb4a source had the 'do not light' flag set on engine flames, but that was missing in latest. Should submit w/ same flags as pb4a now. [NM] - Fix for mantis #1471 - lightning bolts should appear correctly. Were being submitted to DX9 as transformed verts, but the data wasn't transformed at all. [NM] -- b77o2 released============== - Possible fix for mantis 1448 - zpositions of popups in shell. Seems to work better now. Not sure why this bug got reported so many times. It's not *that* important. It is a polish item, yes. Showstopper, no. [NM] -- b77o3 released============== - Work on mantis #1439, 1519 - found some places in dummy.cpp that hadn't been rewritten for DX9. Affected Shield_Control class, Nozzle_Beam class. cbscom00.odf can now be placed via the editor w/o crashing. However, please test that it renders in a matter somewhat similar to pb4a. Shield code compiles, but is not tested. [NM] - More 1448-like fixes -- dupe files warning should now appear in front of shell items. [NM] -- b77o4 released============== - Fix for mantis #1458 - plant fall, burn, grow code was disabled as part of the DX9 rewrite. Now seems to work. (Well, I only tested fall & burn. Not sure offhand how to trigger grow.) [NM] - Work on mantis #1538 - if not in windowed mode when opening up the Windows save/load file dialogs, then in toggles to that for the duration of the dialog. If you think the BZ2 window is 'too small', then go edit render*.cfg to set these values to a value that's more to your liking. WindowedWidth = 640 WindowedHeight = 480 [NM] - Asset updates from mantis 1539. [NM] -- b77o5 released============== - Taunt is correct in mpinstant.dll when the humans or the CPU wins. Thanks to Red_Devil for noticing the anomaly in the code. Also made stratinstant.cpp & strategy02.cpp use m_GameTPS more accurately. [NM] - Re-enabled 'medium' setting for terrain. Basically, the rules are now as follows. Low terrain: 1 texture layer, only. Medium terrain: multilayer terrain if within 150m of camera; if further away, uses 1 texture layer only. High terrain: always uses multple texture layers. If the mapmaker never set up multiple texture layers, then it'll just drop back to the 1 texture layer path. This should provide a somewhat graceful degradation of graphical detail on machines that can't push quite as many polygons. People with uber machines should probably leave terrain on high, and low-end boxes should have terrain on low. [NM] - Fix for mantis 1534 - texture size changes require quitting & restarting to take effect. [NM] -- b77o6 released============== - Fix for something probably mantis'd a long time back, and re-requested by Commando. Added varfloats control.team.health1 .. control.team.health5 and control.team.ammo1 .. control.team.ammo5. These are filled each 1/10 of a second with the floating-point health/ammo ratios (i.e. 0..1) of the allies. Note - slot #1 is the F10 ally, slot #2 is the F9 ally, etc. [NM] - Added, to .trn files [NormalView] MediumMultilayerDistance = 150.0f This allows the mapmaker to control the distance at which multilayer terrain will be enabled in 'medium' terrain detail level. Distances greater than this will be singlelayer; distances less than this will be multilayer. Blending in the layers over a range would be ideal, but I'd have to build up dynamic vertex buffers on the fly to multiply in an alpha, which I think would defeat the whole point of medium being less expensive than high detail levels. As I said above, most people should end up using high or low terrain, depending on what their system can handle. [NM] - Fix for mantis #1452. Did the following: (1) turn off D3D clipping of verts while the terrain's submitted. (2) switched BZ2's 'is terrain patch visible?' test to sphere test, with a larger radius. This seems to create more accurate tests. Do test. [NM] - Fix for mantis #1542. Fixed sniper rifle view when low terrain layer is set. [NM] - Fix for mantis #1537- raindrop splats should be rendered now. Was submitting to D3D as transformed verts, but the data wasn't transformed. [NM] - Fix for mantis #1535 - a layer of multilayer terrain isn't rendered if it has no texture set. [NM] - Proper fix for mantis #1439. Shield effects were being submitted properly, but with alpha set to 0 (100% transparent), so they didn't show onscreen. The bad alpha was due to a DX6 helper macro that went missing, and I used a replacement incorrectly. [NM] - .msh file saver now saves to the MyDocs/My Games/Battlezone II/data/binData folder when /vista or /usemydocs folder is set. This means that it might be harder for BZ2 to find those .msh files, and therefore force the .msh files to be rebuilt early and often. But, this should make BZ2 far more compliant with the way Vista wants to do stuff. Modders running on Vista or newer should look for their mesh files there, and copy from there into their mod distributions. [NM] - Camera code pushes view matrix to D3D more often if it changes. Do test for anomalies. [NM] - Fix for mantis #1443. Added GamePrefs.ini::Play_CockpitRadarXSIScale, and also console value gameprefs.Play_CockpitRadarXSIScale. This value is only used when reading the .xsi and converting to .msh, so mods may need to rebuild any ihrad00.msh values they have. [NM] - Fix for mantis #1541. Ground sprites are now fogged, so this should reduce cases where object shadows are visible and the object isn't. [NM] -- b77p released============== - Partial fix for mantis #1533. Glowmaps should be working. Bumpmaps (specifically the EMBMs used by BZ2 1.0-1.3pb4a) will be done later. If ever. Unless someone has some handy source code that shows this running w/ DX9 fixed function buffers. [NM] - Fix for mantis #1547. Added varIntegers control.team.healthRatio1 .. control.team.healthRatio5 and control.team.ammoRatio1 .. control.team.ammoRatio5. These are filled each 1/10 of a second with the integer health/ammo ratios (i.e. 0..100) of the allies. Also added varStrings control.team.name1 .. control.team.name5 . Note - slot #1 is the F10 ally, slot #2 is the F9 ally, etc. [NM] - Fix for mantis #1315, 1310. Added LaserPopper and LaserRocket Weapons. Also added a jammer w/ baseplate -- fbjamm_bp.odf. All of these should be new items, not affecting stock. [NM] - Fix for mantis #1546. Was submitting to D3D as transformed verts, but the data wasn't transformed. [NM] - Fix for mantis #1343. AddLung will show up more often now. Now scans all objects on team of crig for objects that might need power. [NM] -- b77p2 released============== - Fix for mantis #1550 - render flags for falling raindrops weren't the same as what pb4a passed. See if this makes it happier. [NM] - Possible fix for mantis #1552. Normals & colors on treads should be passed to DX9 the same way it was in pb4a. There may be some slight differences in colors in TechAlpha5 because the graphic card is handling the lighting calculations. [NM] - Fix for mantis #1549. Team # on aiplog filenames is correct once again. [NM] - Possible fix for mantis #1553. Does more range checking to ensure it's got a sane # of verts & indices to submit for engine flames. [NM] - Possible fix for mantis #1544. More work to ensure that normals & colors on falling/burning plants should be passed to DX9. Also did the same to collapsemesh.cpp & extrudemesh. [NM] - Asset updates: fvartl_skel.{xsi|msh} from mantis #1551. [NM] - Possible fix for mantis #1342. Back to 77p-behavior if an object has no team color and no replacement texturemap. [NM] - 3 seconds is now minimum MW lag time for reports. Was 2 seconds, but that creates false positives. [NM] - Fix for mantis #1554. When printing IFCondition messages, uses the specified object's cfg, not label. This is purely a cosmetic change; doesn't affect obj class matches. [NM] - Fix for mantis #1543. Lines to 3D cockpit radar were being clipped to the 'viewport' around the 3D cockpit radar. Now draws the radar, and its lines before switching back to the fullscreen viewport and drawing lines. Also did some more fixes like mantis 1482 to this file. [NM] - Fix for issue not reported as far as I can tell, but annoying nonetheless. If # of lights was set to 1, it would tend to use a point light from the skydome, rather than the overall sun directional vector. This made the world rather dark. [NM] - DR2 Interface .cfg code now accepts 'hcenter' as meaning the same as 'hcentre', as well as 'vcenter'/'vcentre' (case insensitive). DR2 code was written by the Aussies at our studio, so the 're' format was the default and only form accepted. However, the 're' form bugs the heck out of me. If you're writing .cfg files to be compatible w/ pre-TechAlpha5, then you should use the 're' strings. [NM] - Fix for mantis #1521 and #509. Added [DepositClass] DepositClassMask = 0 DepositClassMatch = 0 DepositClassProvides = 0 [ScrapClass] ScrapClassMask = 0 ScrapClassMatch = 0 ScrapClassProvides = 0 [ScavengerHClass] or [ScavengerClass] ScavClassMask = 0 ScavClassMatch = 0 ScavClassProvides = 0 These are bitmasks. A pool (deposit) can be selected if, for a given scav+deposit pair, (ScavClassProvides & [i.e. bitwise and] DepositClassMask) == DepositClassMatch, and (DepositClassProvides & ScavClassMask) == ScavClassMatch. Scrap is the same type of match. The defaults are 0 for mask & match, making existing items all work. But, if you start setting bits to 1, you can restrict what they match. As scav masks are used for both deposits & scrap, then you may want to use bits 0..15 (1..32768) for deposits, and 16..31 (65536 and up) for scrap matches. -- Extra expanation #1: For example, if a pool wants to restrict access, it could do something like DepositClassMask = 1, DepositClassMatch = 1. That will remove access from all scavs, by default, until the scav adds ScavClassProvides = 1 (or any provides with bit 1 set). Alternatively, you could do the matching on the scav. You could do ScavClassMask = 1, ScavClassMatch = 1. That'd restrict all pools until the pool puts in DepositClassProvides = 1 (or any provides with bit 1 set). Basically, the (SourceProvides & DestMask) must == DestMatch. Note, if both sides do matching, then it must work symmetrically. -- Extra explanation #2 Note: this has *nothing* to do with any race mask/typemasks used elsewhere. This is a completely new system. If you're not familiar with binary math, you should probably use Windows's calculator, and put it into View -> Scientific mode to enable the option to show binary mode, ANDing, etc. For example, if you have binary value 10110, you should convert that to decimal mode and get 22, the value to enter in the ODF. You can also test out ANDing by entering 10110, then press the 'And' button, and and with 11111, and you'll end up with 10110. (Anding simply means that for each bit, if both bits are 1 in the inputs, it'll be 1 in the output. If either (or both) bits are 0 in the inputs, the result is 0. If you're working on restricting access, then you should start off with the Match param, and work backwards. The default match is 0, and so you want a combination of Provides AND Mask that equal zero. Note that the default mask is also 0, so by the rules of binary math, anything in provides ANDed with Mask 0 equals 0. So, access is granted. If, for example, you decided to set Match to 1, but left Mask at 0, then it will *always fail*. Why? Because, as above, anything anded with Mask 0 results in 0, but you're matching 0 against 1. Won't work. Unless you're aiming for permanent "never match" state, then any bit set in match must also be set in the mask. Bit #1 is decimal value 1. So, if you want to restrict pools, as above, you could set DepositClassMask = 1, DepositClassMatch = 1. That will remove access from all scavs, by default, until the scav adds ScavClassProvides = 1. Or, ScavClassProvides = 3 (binary 11), ScavClassProvides = 5 (binary 101). Another pool could set bit 2 (decimal value 2) DepositClassMask = 2, DepositClassMatch = 2. That'd prevent default scavs (ScavClassProvides = 0) from deploying. And, it'll prevent ScavClassProvides = 1 from working. But, ScavClassProvides = 2 and = 3 will work, because both have bit 2 set. Another pool could set bit 3 (decimal value 4) DepositClassMask = 4, DepositClassMatch = 4. That'd prevent default scavs (ScavClassProvides = 0) from deploying. And, it'll prevent ScavClassProvides = 1 from working. But, ScavClassProvides = 4 and = 5 will work, because both have bit 3 set. The three examples above restrict based on a single bit being set. You could also combine bits the same way. -- Compiles, but only minimal testing done. [NM] - Fixes for mantis #1524, 1523. Added [ExplosionClass] ChunkExplodeHeight = 0.0 ChunkScrapValue = 0 ChunkScrapClass1 .. ChunkScrapClass3 = "" ChunkExplodeHeight is a way to force vehicle chunks to explode whenever the chunk-- the replacement for whatever vehicle has been destroyed; it looks like the vehicle, but is just a dummy object w/ the same mesh-- is within # meters of the ground. ChunkExplodeHeight must be >= 0.0. ChunkScrapValue and ChunkScrapClass1..3 allow modders to create a scrap field when the chunk explodes, which used to be when the chunk hit the ground, but can now be at a higher altitude. Putting these things in the explosion odf may seem odd, but it minimizes code changes and savefile version upgrades on my part. This explosion odf is whatever's referenced by the dead object's odf, in [GameObjectClass]]::xplChunk . [NM] -- b77q released============== - Tweaks to #1521 and #509 behavior above. Should now respect masks when (1) AIP is controlling objects, (2) user is driving a scav/hoverscav. I think that's all the cases. Do test to see if masks are respected in all cases. [NM] - Fix for mantis #1475. Added, to .trn files [NormalView] LocalFogTexturename = "localfog_volumetexture.dds" LocalFogSlices = 64 LocalFogDensityMult = 0.025 This re-enables local fog volumes when the graphical option is enabled. Note, for these textures, the texture must be a .dds (direct draw surface) *volume* texture. Those are a little harder to create; http://developer.nvidia.com/object/photoshop_dds_plugins.html is an Adobe Photoshop plugin that can create .dds files, but I didn't manage to push the right options to save volume textures correctly. Instead, I whipped up a really quick commandline app using OpenIL to make a sphere. The # of slices is the # of planes that are drawn; reducing the # of slices will make it more granular, but will go easier on people's graphics card. Increasing the # of slices will improve quality, but tax the graphics card's fill rate. The DensityMult is a way to make it appear thicker -- note that if you reduce # of slices, you'll probably have to increase DensityMult to get the same effect. [NM] I don't think I can easily do ground or height based fog the same way -- with Direct3D volume textures. This feature may never return for TechAlpha5. Sorry. [NM] -- b77q2 released============== - Fix for mantis #1563. Was caused by bad fix to mantis #1452. Apparently, nVidia and ATI cards are happy with turning off D3D clipping, and just throwing polygons at the card. Intel graphics chipsets are really unhappy, and produce a polygon soup. Re-enabled D3D clipping, in all cases, and put a comment in the code to be paranoid about it. I did adjust the tolerance for partially-clipped terrain patches based on the user's terrain setting -- at higher terrain settings, it'll try and draw more stuff that might just be onscreen. You can see this by hitting escape during the scion01.bzn intro cinematic, and adjusting the terrain setting. At certain places, you'll see more or less of the background mountains at graphical levels. Basically, it tries to scale things better with user choices. pb4a doesn't show much of the mountains, at all, which might be a bug-for-bug compatability issue. Not sure. [NM] - Tweaked local fog code. Now should handle non-spherical sizes better. [NM] - Optimized MapClusterClass::Render() to be able to do a quick bounding sphere test on un-instantitated clusters if they've ever been instantiated. Caches their sphere radius & height, so it doesn't have to instantiate them to get that info. [NM] - Fix for mantis #1382. Changed the way MapClusterMesh items are instantiated, deleted. Instead of a hard max # that can be alive in memory, they're now kept in a memory pool that grows as needed. They're not released until the map quits. This might increase memory usage, but simplifies the code. Also, this should fix a mostly unreported bug where setting the terrain visibility to a very large number could cause flickering, as mapcluster vertex buffers were reused multiple times over the course of one frame. That's bad. Obviously, doing this removes GamePrefs::MapClusterCacheCount and attendant code. [NM] - Optimization (I think) to MapClusterMesh code. Instead of allocating a static vertex buffer per MapClusterMesh, now has a large static buffer that it carves chunks off as needed. This should allow for some D3D optimizations, as it doesn't have to switch vertexbuffers as often. [NM] -- b77q3 released============== - AV fix in mapcluster code, caused by tweaks above. [NM] -- b77q4 released============== - Really drastic fix for mantis #1562 - amb_wind.wav stuck for hovercraft. Now, when the sfx is not supposed to be on, it'll kill all sfx for your craft w/ amb_wind.wav as their name. This shouldn't match anything, but I can't see how this bug is happening. [NM] - Possible fix for mantis #1557 - assumed in the lighting code, that objects being lit have a minimum radius of 32.0 when determining the "does this light touch this object?" (Previously, assumed a size of 0). That's an assumption that's going to be hard to change, except globally, as I don't want to try and put in a bounding box into every RenderQueueItem. [NM] - Work on mantis #1565 - should get more of a callstack if it happens again. Please do try to get it to happen, and submit a callstack if so. [NM] - Fix for mantis 1561. Added, to weapon ODFs: [WeaponClass] CouldHit = true // default = true, except for ShieldUpgrade weapons which default false This is used by all weapons, and is checked when the AI is doing the scan thru its weapons when trying to attack a target. If this is false, the AI won't ever consider using this weapon. If it's true, then it'll do all of the other checks, such as range, aiming, etc. This defaults to true, except for ShieldUpgrade weapons, which are a trivial case of "no, you couldn't attack X with this." I wasn't sure if specials or jetpacks (or even blink(?)) should have the same setting, so I made it an option. If modders find the AI trying to use weapons they shouldn't, then consider setting this to false. Also added [CraftClass] SitTaskEnemySearchDist = 0.0 This was a constant in the code, restricting how far the craft's radar can scan for targets while in SitTask. (It takes the minimum of this value and (the craft's scanner's range, or 200.0, if the craft has no scanner). [NM] -- b77q5 released============== - Fix for mantis #1514 . Added [PowerUpClass] ExplodeOnBadHit = false DestroyOnBadHit = false HitMask = 2147483647 The first two should be fairly self-explanatory -- they enable destroying and/or exploding powerups when hit by something that they're not applicable to. [Not applicable due to any condition, such as race mask, not needing a health powerup, etc.] The last is a mask that allows modders to control whether a type of object can be hit by a powerup. It defaults to -1, or all bits set to 1. The bits in it that have meaning are, with the bit's value in the left column: 1 : Craft 2 : Person 4 : Building 8 : PoweredBuilding 16 : Deployable 32 : Morphtank 64 : TurretCraft 128 : ServiceTruck 256 : TrackedVehicle 512 : Walker A hit object will usually have 1 or more bits set above, for example, an ibfact (factory) should have a value of 12 (4 + 8) as it's both a building and a powered building. All bits that apply to the hit object must be set in HitMask for the powerup to apply, so a hitmask of 8 would NOT allow the ibfact to accept a powerup. The same principle makes it easier to remove all buildings from accepting a powerup -- just remove (subtract) 4 to get 2147483643, and no buildings (powered or not) will accept it. Please set all unused bits to 1, for future expansion, just like the default does. [NM] - Fix for mantis #1573 - apwrck.odf sets [GameObjectClass]::ClearBuildZone = 0, so that if it's falling into a building being constructed, it won't be pushed around. All bomber payloads should probably have this flag set, but I can't think of a good way to do this automatically. Modders will need to do this on their end. [NM] - Work on mantis #1575. Upgraded the info logged when the construction rig has an invalid buildmatrix. This message has been in the source code for a LONG time (p4, or earlier), not sure why it just decided to show up. More logging might help me track down the why. [NM] - Work on mantis #1576, 1574. Added some calls to D3DXCheckVolumeTextureRequirements() before loading a volume texture. If this fails, will spam to battlezone.log file with some more info, but not bother the user with a dxerror message onscreen during/after load. It'll also turn off volume textures (local fog) for the duration of the run of BZ2. [NM] - Switched to a DXT5-saved volume texture, which has softer edges (DXT5 supports alpha much better than DXT1; my test app to write volume .dds via OpenIL didn't know that I have to explicitly hint to OpenIL to make it DXT5 when passing in alpha channels.) Also reduced size to 64x64x64 as it looks good enough with that. [NM] - Fix for mantis #1571 - was calculating # of slices to submit to DX9 correctly, but # of points & polygons was off. By a lot. So, some slices weren't actually drawn. Should make local fog look better. [NM] - Fix for mantis #1570. If local fog is turned on, then sky is drawn in sniper & targeting camera view. (If you have local fog on, you've obviously got framerate to burn, so I'll help reduce it further.) Also made both views use DX9's rectangle clearing code to ensure they've got a pristine area (including zbuffer) to draw into. [NM] - Terrain code won't try to load .opt files anymore. Been deprecated for a bit now. [NM] - Fix for mantis #1543 - lines submitted by cockpit, mapradar to other places onscreen are now done at minimum z, so they shouldn't be clipped by terrain. [NM] - Fix for mantis #1449. Chrome effect should work on pools now, also touched ExtrudeMesh, if animated chrome is turned on. Do see if I missed any places. [NM] - Possible fix for mantis #1141. When scavs choose pools/scrap, they check the flag as to whether that pool/scrap is locked to that team, and skip it if so. Note: this does not fully fix the savegame for that bug, because it appears that all of the scavs placed in that savegame were placed via the editor, and therefore timeout at the same time. Try scavs built at recy (even insanely fast, w/ buildtime = 0.5 and at cost 0) to stagger them, like they'll be built in the real world. This should set the locked flags correctly. Further, in this save, several of the scavs placed so that they're more than 200 meters (via ScavengerCollectPoolRange) from any pools, so they'll fall back on scrap instead. So, going for scrap is the correct behavior for them. (Note, also-- there needs to be multiple pools within 200m for this to work.) [NM] -- b77r released============== - Added logging to try and get some more info on mantis #1505, the lag out bug. There's multiple things going on here. In some of them, there's a spike in lag soon after a resync, as if one of the visual worlds ran FAR ahead of lockstep, and is producing a spurious lag. In another log, soon after a player 'left,' they were noted as lagged, but their state wasn't updated. Pulled out the player state info dump to a separate function, fixed some bugs in what it logs, and called that (a) when MW lag is noted, (b) right after a resync, (c) and on receiving a player leave packet. Also added GamePrefs.ini::VerboseLagInfo, which controls whether this is spammed or not. localprefs_bzone.ini turns this on for now, but that should be turned off before TechAlpha5 is released to the public. [NM] - Lines submitted by ExtrudeMesh (e.g. isdf build effect) should now be fogged in the distance. [NM] - Possible fix for mantis #1592's freeze. Found case where TerrainClass::GetIntersection() could run off the map, when the target position for a cannon's shot seemed to be way off the map. It now takes extra checks to ensure that positions are on the map. Note - the assets w/ this map also demonstrate a 100% resync at timestep 111, where the ivrecycpu object's positions differ between my CPU and laptop. Doesn't turn into an ibrecycpu until somewhere between timestep 272 & 285. Most curious. Need to investigate this further. [NM] -- b77r2 released============== - More work on the mantis #1592 freeze. Added, to weapon & ordnance ODFs, [WeaponClass] or [OrdnanceClass] LeadPositionMinTime = 0.0 LeadPositionMaxTime = 60.0 The WeaponClass params are used by Weapon.cpp, TargetingGun.cpp, and Cannon.cpp. They take effect, for cannons, on both the 1.2 and 1.3 aim codepaths. The OrdnanceClass params are used by popper & radarpopper. In all cases, they are used in clamping how far ahead (in seconds) of a craft a weapon/ordnance will be aimed at. For example, if MinTime=MaxTime=0.0, then it'll always aim at where the target is right now, whether it's moving or not. If MinTime=MaxTime=1.0, then a weapon will always aim a at a position 1.0 seconds ahead of where the target is now, based on its linear velocity. With the default settings, it's allowed to aim anywhere between 0.0 and 60.0 seconds ahead; values less than 0.0 are treated as 0.0, and values greater than 60.0 are treated as 60.0. Note- minTime has a minimum value of 0.0 (corrected via code), and maxTime will be corrected so that it's always at least slightly (0.0000001) more than mintime. [NM] - More work on the mantis #1592 freeze. Seems like there's a potential infinite loop in the A_Star() function-- the function that does all the heavy lifting when calculating pathing from point A to B. Put in a clamp of 262144 tries thru its loop before it gives up w/ a warning. This limit is definitely adjustable, and I'm just guessing as to whether this is a reasonable number of tries. [NM] -- b77r3 released============== - Possible fix for mantis #1593, 1589 -- objects within 64m of a light will consider using that light. Previously, was 32m (see fix for #1557 above). [NM] - Fix for mantis #1591. Added GamePrefs.ini::SkyInTargetSniperView param. See comments above it. Added to GamePrefs mainly because the graphical options page is way out of space. [NM] - Removed GamePrefs.ini::VsyncOn, render.cfg::VSyncWait, and any action from the vid.waitretrace console command. Instead, added it to the graphics options page, replacing (for now? ever?) the EMBM setting. [NM] - ChargeGun items should use [CannonClass]::shotPitch. They're derived from Cannons anyway, and it was a 1-line change to copy the code over. MachineGuns (also derived from Cannon) already had this support. [NM] - Slight bump (to 500K iterations) before giving up on pathing. Also, added info as to the path's start/end to logs if it gives up. [NM] - More work on assets in mantis 1592. Traced the 100% resync at 11.1 seconds into the game to the AI team's building orientation (calculated by AIP code) not being saved and restored properly. Unfortunately, this means that I had to change savegame file format slightly, and saves from b77s can NOT be loaded by pb4a anymore. Saves from pb4a should work in b77s, however. [NM] -- b77s released============== - Fix for mantis #1600. Added, to ScriptUtils.h: // Sets the pilot class for a craft. Note - if you do this on a // non-craft, it'll silently refuse to do anything. DLLEXPORT bool DLLAPI SetPilotClass(Handle obj, const char* odf); Compiles, but is not tested. [NM] - Fix for mantis #1585. Forces a reset away from the volume texture after rendering local fog. [NM] - Fix for mantis #1599, possibly also 1577. Optimized the code that figures out what light(s) apply to an object. However, the root problem of throwing TONS of lights at a small area (e.g. 1599's save) will cause the "figure out the lights" code to shoot to the #1 function in terms of time. And, I don't see that getting much faster w/o major rewrites. Maybe if you guys would tone down the # of lights, things would go better. [NM] -- b77s2 released============== - In DLL source, Shared\MPVehicles.cpp, upped max odf length to 64 chars. Caught by Red_Devil. I think this is used only by the MP DLL(s), so the file format changes as a result of this shouldn't affect any savegames. [NM] - Fix (I think) for mantis #1584. fvtanks seem to chrome up while morphing. [NM] - Possible fix for mantis #1505 (lag out), after recent logging expansions have helped point out some possible clues. Now, it won't expire old moves across a join/resync timestep, but keep them around until the join/resync is completed. [NM] -- b77s3 released============== - More work on mantis #1505 (lag out). Yesterday's change ought to have worked, but I'm still seeing behavior that looks like yesterday's change didn't happen. Added (1) more logging, and (2) the chatlog file should now have the build version as the first line, so I can tell what build everyone's running. [NM] - Work on mantis #1618 - should get more detailed callstacks if it dies in that file. [NM] -- b77s4 released============== - More work on mantis #1505 (lag out). Still can't figure out how timesteps got so far ahead, so I added even more logging. Thanks for putting up with this. [NM] - Battlezone.log, irc & char log files should all now have the BZ2 build identified at the top of the file. [NM] -- b77s5 released============== - Updated to 7-zip 4.65 decompression .dll in full build installer. [NM] - Fix for mantis 1611 - autoreg folder moved from addon to maps13 folder. The maps13 folder is just a figment of the installer's imagination, so this change will be done by the next full build installer. [NM] - Installer now uses a windows progressbar control to show % complete, rather than drawing rects. The b77 installer's progress bar looked pretty ugly and klunky under the Windows 7 beta, so it's time to get with the things Windows added a long time ago. [NM] - Work on mantis #1610. Did an extra null pointer check before executing code. [NM] - Added, temporarily, some debug-helping code I've got to the builds compiled for testers. Added 'network.unsync' and 'network.addlag' console commands. The first will force an out-of-sync condition, even in 1-machine MP. The second will freeze BZ2 for 5 seconds, causing lag. These MUST be removed before final release. [NM] - More work on mantis #1505 (lag out). Still can't figure out how timesteps got so far ahead, so I added even more logging. Thanks for putting up with this. [NM] -- b77s6 released============== - Initial work on getting mirror (reflection) code in. It'll produce pretty broken results, so you may want to turn off reflections in the graphics options for now. [NM] - More work on mantis #1505 (lag out). Pulled out the nuclear option and rewrote all code that touches the tail timestep for a player. Refactored it into get/set accessors, and the set accessor will log to the chatlog the caller file & line -- that should help me figure out who the heck is changing it. Reduced amount of info to the chat window, but it should still go to the chatlog file. network.unsync should work with > 1 player now. [NM] -- b77s7 released============== - More work on mantis #1505 (lag out). Made network.unsync work -- had to enable another function in the FINAL build configuration. Slightly more logging to chatlog. I was able to regularly (50-75% of the time) get the MW lagout to happen by doing network.unsync, then network.addlag before the resync happened. As the client box appeared to allow time to proceed past the resync time, changed a > to >=. That appears to make things much happier here, and the net result of a week of work. Do test things like 3+ player games, as I didn't have time to try that. [NM] -- b77s8 released============== - More work on mantis #1505 (lag out). Noticed that in all of the useful logs from s8 (the 'chatlog 2009-02-15 1155.txt', 'chatlog 2009-02-15 1255.txt', and 'Chatlog 2009-02-15 0921.txt' files) had a joining player's state set to playing before the resync timestep for their join came around. This caused the 'fixme active team 2 couldn't find user' message in the first file. Did the same thing as before -- added a wrapper function around all changes to player state that logs where in the code that was triggered from. So, more logs will be needed. Reminder: I want the chatlog files from these sessions (battlezone.log is a bonus, but not needed). Also, if the chatlog doesn't have "mw lag" in it, I'm going to skip it for now. You can do a quick case-insensitive search for that. [NM] -- b77s9 released============== - Possible fix for a second bug causing mantis #1505 (lag out). This is for the fairly common case where there's a server + 1 client, and a 2nd client joins. The 1st client would switch client #2's state to playing before they were added to the world, which would get the "fixme - can't find team X active user" message. And a lagout. Made a change so that MoveCmdHandlers.cpp line 1348 won't switch a client's state from 'inshell' to 'playing' when moves arrive for them. It'll wait for the scheduled resync for that join to switch their state. Do test. [NM] - Possible fix for second issue seen in mantis #1505 (lag out) logs, the 2009-02-17 17:48 upload to mantis. This is one that happened where there was a server + 3 clients. Client C chose to leave, and on client B's machine, they never got move packets for client A at a particular timestep (about 10 after the leave). Because time couldn't advance, client C couldn't complete its leave on client B's machine. And, client B lagged out, because it never got the moves it needed to keep up w/ the server. Solution: more logging. (You knew I couldn't resist). Added a line to the server (ONLY)'s chatlog, if it can't supply a lost packet request from a client. Note - this may produce some false positive messages, especially when (say) client B has just joined, and client A is really pushy about asking for B's moves. If the same timestamps are repeatedly requested and never satisfied, that's a problem. Note - these messages won't go onscren, but only to the chatlog file. Also slightly toned down sending movepackets around when on broadband. This may slightly delay packets, but by coalescing more into packets, this should improve the chances of a lost packet being cached for resending. [NM] -- b77s10 released============== - Work on mantis #1558 - the reflection (mirror) code. It's not *quite* right yet -- almost a little *too* glassy. And things under water don't appear as they should. Reflections now require a depthbuffer format w/ stencil to be selected, e.g. the 24-bit w/ stencil D24S8, i.e. default. If the depthbuffer format doesn't do stencil, then the reflection option is disabled. [NM] - Fix for infinite loop added in s10 when searching for moves from a player. My bad. 2-machine MP games on my lan work once again. Also upped the count of cached movepackets ready for immediate resending. [NM] -- b77s11 released============== - Redid cached move code. Now far more object-oriented. Also, tracks the full min/max timesteps of the moves within cached packets, so that it can trivially reject cached items faster. This should slightly help performance, as the count of cached packets is now far larger. [NM] - Fix for 3rd player (i.e. 2nd client) causing problems for 1st client when it joined a game, introduced as part of work on mantis #1505 (lag out). Now allows client #1 to proceed over client #2's join timestep, and do the join operations. This ought to scale to client #3 and up. [NM] -- b77s12 released============== - Did some work in preparation for mantis #1625 & 1414. (No promises on doing those, but this was a sticking point.) Split up AIP code from one massive file to about a dozen, with 1-3 classes per file. (Very similar work to the work I've done to the DLL source code over the years, if you compare the 1.2 DLL source to latest). Shouldn't cause any issues, but I've made a ton of changes. [NM] - Fix for mantis #1625. Added to AIP plan chunks, for conditions PathExists NotPathExists These are just like PathBuildingExists/NotPathBuildingExists, except that they merely check for the existance of the pathpoint. (Building ones check if there's a building at that pathpoint.) [NM] - Fix for item mentioned on irc, not mantis'd (yet?). Added these items to extra options page items. Note - if I mention a number here, then lower #s (2 .. X) should also be supported. Also, note that for most of these, the first match (lower #) will win, if something's on multiple pages. extraoptions3.weenietitle extraoptions3.weenieoff extraoptions3.weenieon extraoptions4.weenietitle extraoptions4.weenieoff extraoptions4.weenieon extraoptions3.multtitle extraoptions3.multslider extraoptions3.multvalue extraoptions4.multtitle extraoptions4.multslider extraoptions4.multvalue ExtraOptions3.OnlyInFFA ExtraOptions3.OnlyInTeamplay ExtraOptions4.OnlyInFFA ExtraOptions4.OnlyInTeamplay ExtraOptions5.RecyListWindow.RecyList ExtraOptions6.RecyListWindow.RecyList ExtraOptions7.RecyListWindow.RecyList ExtraOptions8.RecyListWindow.RecyList ExtraOptions5.AIPListWindow.AIPList ExtraOptions6.AIPListWindow.AIPList ExtraOptions7.AIPListWindow.AIPList ExtraOptions8.AIPListWindow.AIPList ExtraOptions5.STCTFListWindow.STCTFList ExtraOptions6.STCTFListWindow.STCTFList ExtraOptions7.STCTFListWindow.STCTFList ExtraOptions8.STCTFListWindow.STCTFList ExtraOptions5.AnimalListWindow.AnimalList ExtraOptions6.AnimalListWindow.AnimalList ExtraOptions7.AnimalListWindow.AnimalList ExtraOptions8.AnimalListWindow.AnimalList ExtraOptions3.VehicleList ExtraOptions4.VehicleList ExtraOptions5.VehicleList ExtraOptions6.VehicleList ExtraOptions7.VehicleList ExtraOptions8.VehicleList [NM] - Possible fix for mantis #1338. If [MachineGunClass]::soundPerShot = 2, then it will not force-kill the sfx generated when the trigger is released. If soundPerShot == 0 or == 1, then the traditional behavior of killing the sfx when the trigger is released is still done. [NM] - Tweaked MW Lag logging code a bit. Reduces logging when someone's joining. When MW lag is noticed, will log out to the chatlog file (only) the stats on multiworld switching, and more detailed info on what moves are available at what timesteps. [NM] -- b77t released============== - Possible fix for mantis #1636 - AV after creating a shareddynamic indexbuffer failed. Not sure yet why it failed to create an indexbuffer. (Alt-tab w/o being noticed?) [NM] - Fix for mantis #1635, AV in Targeting::FindTarget. Forgot to check if user's scanner is null before using it. [NM] - Updates to mantis #1558. If user's choice of depthbuffer does not include stencil, then the mirror code is disabled better. (And, the user's preference is set to off, for them. The ability to adjust that setting is hidden when the user chooses a depthbuffer that doesn't have stencil. [NM] - Some reflection code tweaks. Still not happy with it. [NM] - Tweaked logging for MW lags again. Doesn't mega-spam moves when a client's in the shell. Also calculates max timestep to log to correctly. Also added code that'll consider faking a move for a player at a timestep if they've submitted many moves after that. This should only be done when there's more than 10 seconds of lag, and only a small number of moves is missing. Basically, this could definitely cause resyncs, but a resync is less drastic than a lagout. [NM] - Screenshots can now be taken w/o having to disable multisample code. Reading from the frontbuffer now. Disadvantage to this change is that if you're running windowed, it'll save your whole desktop, too. I figure it's easier to crop pixels than to disable multisampling. [NM] - Better fix for mantis #1625. It was not creating the conditional when the path didn't exist. Fixed. [NM] - Work on mantis #155. Added, to ODFs: [PlantClass] TransparentGrow = false TransparentFall = true TransparentBurn = true This allows pieces to be forced to the transparent phase, even if the material/texture say "I'm opaque." If you don't like death anims, try turning the fall/burn flags to false and see if that helps. [NM] - Work on mantis #1621, 1615. Added to ODFs: [GameObjectClass] effectMinVelocity1 .. effectMinVelocity16 = -1.0 effectMaxVelocity1 .. effectMaxVelocity16 = -1.0 effectMinHealth1 .. effectMinHealth16 = -1.0 effectMaxHealth1 .. effectMaxHealth16 = -1.0 effectMinAmmo1 .. effectMinAmmo16 = -1.0 effectMaxAmmo1 .. effectMaxAmmo16 = -1.0 effectFlags1 .. effectFlags16 = -1 These parallel effectMinAltitude1 .. effectMinAltitude16. For Velocity/Health/Ammo, if the min or max value is < 0.0, then the condition is ignored. Health & ammo are on the 0.0 .. 1.0 (ratio) scale. Flags are much like the CondAddHealthFlags above (see below) If the flags are set to -1 (default), then the flags are not checked. Bit 0 (value = 1) Val=1: effect enabled when craft is empty. Val=0: effect disabled if craft is empty Bit 1 (value = 2) Val=1: effect enabled when craft is occupied by AI. Val=0: effect disabled if craft is not occupied by AI Bit 2 (value = 4) Val=1: effect enabled when craft is occupied by human (local/remote player). Val=0: effect disabled if craft is not occupied by human (local/remote player) Bit 3 (value = 8) Val=1: effect enabled when craft is undeployed. Val=0: effect disabled if craft is deployed - bit flag is effect disabledped if not a craft Bit 4 (value = 16) Val=1: effect enabled when craft is deployed. Val=0: effect disabled if craft is undeployed - bit flag is effect disabledped if not a craft Bit 5 (value = 32) Val=1: effect enabled when object is unpowered. Val=0: effect disabled if object is powered Bit 6 (value = 64) Val=1: effect enabled when object is powered. Val=0: effect disabled if object is unpowered Bit 7 (value = 128) Val=1: effect enabled when object is not locked down. Val=0: effect disabled if object is locked down Bit 8 (value = 256) Val=1: effect enabled when object is locked down. Val=0: effect disabled if object is not locked down Note: all applicable conditions must be passed for an effect to work. (At the default values for these conditions, they're not applicable, i.e. ignored.) If any applicable condition fails, then the effect is disabled. [NM] - Possible fix for mantis #1567. If dome.type == 0 (or 2, or any even #), it will draw the skydome unfogged. I'm still not sure what the heck I'm supposed to be looking for in the screenshots/etc. If this still happens, then make a savegame on a stock map (e.g. dunesi.bzn) in pb4a, run console commands, and get screenshots. Then load the save in latest and do the same console commands and get screenshots. [NM] -- b77t2 released============== - Tweaks to logging code, again, for 1505. Sunday's game had a machine refuse to cough up a move for a timestep, but it never executed the code to log what moves it had in its cache. Should be fixed. [NM] - Tweaked cached movepacket code also. Now requests a little more often, and requests alternate via the UDP & TCP paths. Still not sure how it didn't archive moves for sending in the case above. [NM] - Onscreen (in the scores display) lag column is calculated better now. Should track who's missing moves. [NM] - Fix for mantis #1639 - localprefs*.ini's ShowAIPInfo is read now. Also, the console game.aipdebugteam was set to 0, instead of -1 (any/all) by the recent code cleanups to the AIP code. [NM] -- b77t3 released============== - Tightened up code that sends moves twice. Now will try to send out 'fresh' (i.e. never sent) moves more aggressively, while also bundling the second-sending of moves to not consume too much bandwidth. This might reduce latency of clients moves to the server. Also upped max # of resends on packet data to three sends, and prevented it from expiring moves until that's happened. This might explain some of the oddities seen in recent tests where a machine never sent a local move. Do test. [NM] - Fix for mantis #1651. Added [WeaponPowerupClass] RefreshWeaponOnly = false If this is true, a weapon powerup will give this weapon only to units that already have that weapon. [NM] - Fix for mantis #1649. Added [GameObjectClass] AllowFactoryCustomizations = true If false, this unit can't be customized at the factory. Note that units don't get powerups at the factory; they get weapons directly. [NM] - Fixes for mantis #1650, 1648, 1647 . Added [CraftClass] CraftClassPilotMask = 0 CraftClassPilotMatch = 0 CraftClassPilotProvides = 0 [PersonClass] PersonClassPilotMask = 0 PersonClassPilotMatch = 0 PersonClassPilotProvides = 0 -- [PowerUpClass] PowerupClassMask = 0 PowerupClassMatch = 0 PowerupClassProvides = 0 [GameObjectClass] GameObjectClassPowerUpMask = 0 GameObjectClassPowerUpMatch = 0 GameObjectClassPowerUpProvides = 0 -- [SupplyDepotClass] SupplyDepotClassServiceMask = 0 SupplyDepotClassServiceMatch = 0 SupplyDepotClassServiceProvides = 0 [GameObjectClass] GameObjectClassServiceMask = 0 GameObjectClassServiceMatch = 0 GameObjectClassServiceProvides = 0; Does the same as the scav/scrap/deposit mask/match/provides as above. The first check is done when a person is trying to get into an empty craft. The second is done when a powerup's hitting an object. This is about it for what I want to do with these things. It's a LOT of copy/paste stuff that's pretty boring to do. [NM] -- b77t4 released============== - Fix for mantis #1655. TurretTank.cpp needed to do more null pointer checks. [NM] - Fix for mantis #1618, 1643. Allowing terrain vertex buffers to simply grow is not a good idea. Memory is finite. Now, it coalesces 16x16 groups of map clusters, and uses one vertex buffer for the whole group. If any cluster changes, it rebuilds the whole vertex buffer. This should hopefully provide a balance of large vertex buffers. I could shrink the coalescing to 8x8 if there's a noticeable speed hit on rebuilding these. [NM] - Fix for mantis #1662. Was getting hung up w/ "unsent" moves in SP/IA. Handles that properly now. [NM] - Tweaked logging for mantis 1663 to include a little more info. Still need a good repro case that shows the problem on my box. [NM] - Updated logging for mantis #1505. For short lags, it was dumping the wrong set of info. A very large wrong set of info. This change should make the chatlogs smaller, unless the 'really lagged' message appears, at which point it should generate the megadump. [NM] -- b77t5 released============== - More work on mantis #1625. Added to AIP plan chunks of the BaseBuildMinimums type: [Plan#] pathpointsCanBeMissing = false If this is true, and buildLoc# is missing, it'll only whine to the aiplog file about that. It won't throw up an error on the console. This new entry should be paired w/ a 'PathExists' condition to squelch the whole plan chunk when the path doesn't exist. [NM] - Fix (I think) for mantis #1665. Map editing on the edges of the map could get in a case where it wouldn't update the coalesced vertex buffers. If this doesn't fix it, then please provide a LOT more info. I've managed to edit up bridges2i.bzn successfully. [NM] - Possible fix for mantis #1657. Clears the zbuffer in the bounding box of the cockpit rader before drawing it. [NM] - Fix for mantis #1660. Got rid of some "can't change during MP" messages on the escape graphic screens. The "changing this requires a restart of BZ2" popup seems like a more intuitive setup, anyhow. [NM] - Possible fix for mantis #1664. Added [GameObjectClass] FactoryCustomizationMask = 2147483647 PowerupSlotAcceptMask = 2147483647 The factory mask is a bitfield of which of the 4 factory weapon slots are editable. This is NOT on a per-hardpoint basis, because the factorypanel code works in terms of the 4 slots. (The mappings of hardpoints <-> weapons <-> slots is needlessly complex in code, and something I've never really liked. So, I make this a modder problem.) So, the first bit (value = 1) is the first slot, second bit (value = 2) is the second slot, third bit (value 4) is the third slot, and fourth bit (value 8) is the fourth slot. The powerup slot accept mask like it, but in the weapon carrier for the object, which has 5 slots. So, bits need to mask against that. As I said above, when this is too much 'fun' for me, I drop the problem in modder's laps. Experiment w/ this mask. [NM] - Fix for mantis #1632. Added in ability (via menus) to kill the 3rd person red laser sight. Note - this option is not adjustable live from the console (or console-like commands) -- it takes effect the next time the view type changes. Had to squeeze this option into the menus; might want to go thru those 3 .cfgs and space things a consistently tighter vertically so that more space is available if new options are added. [NM] - Fix for mantis #1667 - if a powerup is rejected due to race or other masks, it'll play its reject sound. This bug happened because the masking is done at the root powerup class, while the sound effect was played by derived classes (e.g. weaponpowerup) when masks passed, but the weapon was rejected. [NM] - Fix for mantis #1668. Added [GameObjectClass] FactoryWeaponConfig = "" // or needs to be something like "iweapon.odf" This allows units to override what lists of weapons are available for them at a factory/recycler panel. Compiles but is untested. [NM] - Asset updates - mantis #1661 (pbetun fix), 1612 (mainly xsi|mesh, some GH-specific assets), 1666 (some AIP changes, a lot of new ODFs for the GH pack, some GH odf changes) 1597 (more GH odf changes), 1564 (sub0i.bzn|.sky). Added MPIGHZoneVBeta3B.7z, the '26-Feb-2009 14:58' version. Mantis #1170 was sent back for a redo, as each ODF lost a 'VIRTUAL_CLASS_*' entry. [NM] - Fixed a bug where the 9th player in a 9-14 player session would get an infinite loop on entering the game in the shell. Still not sure if the 9th player can join w/o causing lagouts for everyone else. [NM] - Fix for mantis #1659. Reduced the line onscreen caused by the medium sky tiled sky polys. [NM] - Fix for 1566, possibly also 1634 - after many hours of digging, found it's due to a stupid copy & paste error on my part. [NM] - Fix for mantis #1590. Added [GameObjectClass] UseVehicleCrashOnDeath = true If false, will not generate a copy of the vehicle geometry that's flying to the ground after death. [NM] - Possible fix for mantis #1642. Emphasized the size and z-order of lightflare.tga when drawing lights & engine flame lens flares. [NM] - Possible fix for mantis #1586. Seems to work a bit better now. Not 100% sure if it's the same as pb4a. [NM] - Fix for mantis #1669. TrailRenderClass items had texture clamping turned on, which wasn't the case in pb4a. Checked the other particle effects vs pb4a source code, and they all seem to be doing texture clamping the same as pb4a. [NM] - Upgrade libpng to 1.2.35. Someone's going thru a bunch of security patches... Also upgraded to OpenIL 1.7.7. Compiles, but is untested. [NM] ---- 1.3 beta 78 released======= - Based on discussion on mantis #1583, added the highlights of that discussion into comments above the DLL_TEAM_SLOT_* list in ScriptUtils.h. I don't feel it's good to give everyone access to mantis, but I have no problem copying out tidbits from the discussion. [NM] - Switched (via a #define, so I can undo this easily later) to using D3DXSaveSurfaceToFile() to save screenshots. This does seem to produce 32-bit .bmp files, but may be faster than the OpenIL pathway. Not sure. If this doesn't work well, I'll undo it. [NM] - Tweaked fps display code. Eliminated overall worst/best fps, and replaced it w/ stats noting how many bitmaps, texture size, draw calls, and triangles were drawn the frame before. Removed some old, unused other stats. Also moved the calculation of these values to the render code, so that it's constantly recalculated. This allows it to be calculated & drawn when the game is paused, in editor view, etc. [NM] - Work on mantis #1505 (lag out). Made servers more aggressive at kicking players who've not submitted any moves for 10 seconds. Made servers less aggressive at kicking players who've submitted all their moves. Moved move faking into a more consistent place in the code, and should happen a little more aggressively. Tweaked logging to skip the mega dump of the movecaches, as that code seems to be working properly now. Squelched false-positive "MW Lag" messages when the lockstep world is held back by a join or resync. Tweaked logging of lagged players to only print players who haven't delivered moves. These changes should decrease the chances of all clients lagging out when there's a problem w/ one player, and increase the chances of kicking that offending player. [NM] - For on mantis #1680, 1598, 1476, I think. For 1598 & 1476, sky.ambientcolor seems to work once again. Still had to hack around the terrain's ambient color -- had to make the default .trn::[NormalView]::AmbientColor = "25 25 25 255" (was 64 64 64 255), otherwise the terrain looks badly overlit. For #1680, made domeType = 0 turn on the "please light me" flag to DX9. (Was NOT that way in pb4a... there seems to be some oddities as to what that flag really means.) This seems to have made mantis #1429 (pool colors) worse again. Ugh. [NM] - Fix for mantis #1678. Should be able to load savegames and let them play for over 51.2 seconds more. [NM] - Fix for mantis #1607. Ordnance class loader should be able take "NULL" or NULL in the odf. [NM] -- b78a released============== - Fix for mantis #1670. AI pilots should respect empty craft's race and mask/match/provides when searching for an empty craft to enter. [NM] - Fix for mantis #1673 & 1633. Editor's list of textures should show visual previews once again. [NM] - Fix for mantis #1678. Should really be able to load savegames and let them play for over 51.2 seconds more. [NM] - Fix for mantis #1616. Added, to ODFs [CraftClass] modeText0 .. modeText32 = "" Where the numbers are as follow: MODE_NONE = 0, MODE_GO = 1, MODE_FOLLOW = 2, MODE_PICKUP = 3, MODE_DROPOFF = 4, MODE_DEPLOY = 5, MODE_UNDEPLOY = 6, MODE_RESCUE = 7, MODE_RECYCLE = 8, MODE_GO_TO_NAV = 9, MODE_SCAVENGE = 10, MODE_HUNT = 11, MODE_ATTACK = 12, MODE_HOLD = 13, MODE_LAY_MINES = 14, MODE_DEFEND_BASE = 15, MODE_SERVICE = 16, MODE_UPGRADE = 17, MODE_DEMOLISH = 18, MODE_POWER = 19, MODE_BUILD = 20, MODE_LAUNCHBOMB = 21, MODE_CANCELBOMB = 22, MODE_SPLIT_GROUP = 23, MODE_SELECT_NAV = 24, MODE_PLACE_NAV = 25, MODE_SELECT_SINGLE = 26, MODE_VIEW_UNITS = 27, MODE_MORPH_SETDEPLOYED = 28, MODE_MORPH_SETUNDEPLOYED = 29, MODE_MORPH_UNLOCK = 30, MODE_BAILOUT = 31, MODE_BUILD_ROTATE = 32, If a string is empty/blank, the default string is used. Otherwise, it'll use the text specified here. These strings may not be asset-checked, in case people want to try localizing things. BZ2's localization system is such a complete example of how NOT to do things. Sorry. [NM] -- b78a2 released============== - Fix for AV in GameObject::LoadAll calling ConsoleHelper::Message that was noted on the forums, no mantis entry. [NM] - Fix for mantis #1671, 1672. Blink destination marker should appear on the ground. [NM] - Fix for mantis #1679 - should restore fullscreen resolution when toggling back to fullscreen view. [NM] -- b78a3 released============== - Played around a bit w/ lighting. The thing that seemed to make the biggest difference was the 'attenuateLinear' param in the ODFs. Tweaked all the stock light ODFs to make attenuateLinear = 0.08, instead of the old = 1.0. I do find that point lights seem to draw MUCH better in DX9, but maybe someone can poke at the stock ODF params and find something good. Take a look at http://msdn.microsoft.com/en-us/library/bb174697(VS.85).aspx -- the spotlight params have 'Theta' (DX9) == 'coneAngInner' (BZ2 light ODF), 'Phi' == 'coneAngOuter', and Falloff == 'coneFalloff'. (If you're looking for things to change, Spotblue2.odf used by ivtank.odf). I think the spotblue2.odf's coneAngOuter=2.0 seems high to me, as that's 2.0 radians (~115 degrees). Also made 'coneFalloff' actually *read* by bz2. Before, it could be present in an odf, but would be ignored. Play around w/ lighting odfs. As I said above, pointlights seem to work better on terrain. Spotlights seem to work sporadically, and mainly when the spotlight is in the right place relative to the terrain's triangles. (Turn on wireframe view to see them). [NM] -- b78a4 released============== - Work on mantis #1558 (reflections). Now, only clears zbuffer in region of onscreen water, and re-draws water after the reflection phase is over. Also flips lighting normals in the reflection phase. This seems to improve the look of the reflection, and allow transparent items above the water to still be rendered correctly. Items below the waterline are effectively not drawn at all, but doing some tests in pb4a, it's the same. Still am getting some edges of the terrain showing up by the water -- I think this is the upside-down version of the terrain popping up. Still need to dig in. [NM] - Asset updates from mantis #1170 (hand-merged to have the changes I want, only), 1676 (version b8b). [NM] -- b78b released============== - Fixes for items listed on mantis #1558 (reflections) - enabled particle renders in the reflected scene. You didn't need that framerate, anyhow. :) Do test, make sure it doesn't do anything like make particles run at double-speed. Also, morphs over reflecting water don't kill the above-water copy. [NM] - Further reflection fixes. Added, to .trn files: [NormalView] DrawWaterTexture = true If this is true (default), then the surface of the water is drawn w/ the map's texture. If false, it's not drawn. inst006.bzn (aka IA Iceberg)'s .trn needs this set to false to look more like pb4a. If there are other maps that need this, let me know. (Frankly, I'd like to see a different water setup inst006 to make it look more like the water on dunesi.bzn/bridges2i.bzn. But, all three use 'water256.bzn', which is quite opaque. Probably related to which water layer(s) are set up, but I haven't dug in much..) [NM] -- b78b2 released============== - Work on mantis #1558, lighting. Quadrupled the density of terrain triangles, i.e. split each terrain triangle into 4. This may lead to smoother headlights on the terrain, as there are smaller triangles, and more vertices it can light up. DX9 sure seems to like lighting up vertices when spotlights are in use. As above, using point lights sure seems to be a whole lot smoother. When terrain is set to high, then it uses the higher density of triangles; if low/med, then it uses the reduced density of triangles. Also made it so that 'medium' terrain is the old 'high' -- all blending layers, but the traditional density of polygons. High terrain is now more of a "let's crush your system" setting. Like local fog & reflections. [NM] - Tweaks to reflections. Should have a lot fewer pieces sticking up from the reflected world. [NM] - Slight tweaks to lighting. Now considers all light sources for each item rendered, clearing the list so that stale entries aren't considered. Fixed a bug where multiple entries could be prematurely squelched. Also tweaked the DX9 light params on spotlights to be more focused cones, much like the visual appearance. This may be a little excessive, but it's a step towards being more noticeable. Still not 100% happy with the results. May want to switch to pointlights for highly mobile craft headlights, as that looks FAR better. Have some ideas for improving performance, which'll come in a future build. [NM] -- b78b3 released============== - Terrain's 4 passes (when med/high) are submitted as 4 separate phases. This should reduce the amount of D3D state swaps, but slightly increase the load on "what lights apply here?" work. [NM] - Fix for mantis #1711. 'loaded from mapname.bzn' should appear in the battlezone.log file once again. [NM] - Back to non-tesselated terrain when set to high. It should behave roughly the same as 78b2. This should fix bugs 1709, 1714, possibly others. I've kept the code to do this around, in case I want to try and resurrect it later, but it's compiled out now. [NM] - Fix for mantis #1715. Squelched message in SP. That message will go away anyhow once verbose lag info (in localprefs*.ini) is disabled for a public release. [NM] - Fixed up 'cracking' between the reflected terrain and the above-water terrain. Resurrected old pb4a code that clips the terrain verts to the water, and generated custom vertex/indexbuffers for terrain patches that need it. Note - this is not used if terrain is set to low. If you have reflections on, but terrain low, it'll use the un-clipped terrain, as that's faster. [NM] - Fix (again) for mantis #1599. Implemented a 'quadtree' for lights. This should spatially organize lights, so that it can trivially reject lights more than a certain distance away from the object being lit. Also caches what lights hit each 16x16 meter area, which should slightly faster. [NM] - Added in a graphics option for reflecting particles on/off. It's hidden when reflections in general are off. [NM] - Fix for mantis #1693 - skydome should be centered around the camera passed in, not just the 'main' camera. This should fix targeting/sniper window views. I bet 1.0-1.3pb4a had the same bug. [NM] -- b78c released============== - Moved spotblue2.odf to a pointlight. This might help some of the popping on the terrain. [NM] - Fix for mantis #1722, possibly also 1721, 1723. Missed some quadtree operations when MW was on. [NM] -- b78c2 released============== - Fix for mantis #1725 - flickery lights on terrain. Code that tries to minimize light state calls to DX9 had some bugs. [NM] -- b78c3 released============== - Reflected terrain pieces are culled to water height properly on maps that have water at non-zero heights, e.g. dmtitan01.bzn. [NM] - Terrain vertex buffer code mostly back to what it was in 78b2, except for the water clipping plane usage. Reverted: (1) dedicated red/green vertex buffer chunks (2) dedicated water vertex buffer chunks (3) submitting terrain as separate passes. Copied this all into a 'backup' source code file for now. This might help w/ 1734, where the battlezone.log file mentions out of memory errors. [NM] -- b78c4 released============== - Fix for mantis #1726 - turning graphics options lighting to 'no headlights' will kill the lights from your craft. [NM] - 'Fix' for mantis #1720. Added GamePrefs.ini::AllowReflectedParticles. You can use this 'feature', but I'm going to ignore any and all bugs about it. [NM] -- b78c5 released============== - Fix for mantis #1737. If skydome is enabled in the targetcam/sniperinterface, then the targetcam/sniperinterface windows get the exact same nearplane/farplane as the main window. This prevents parts of the skydome from being culled when they're past the farplane. In the savegame on that bug, main window had farplane = 275, and the target window had farplane = 200. [NM] - Further fix for some potential performance issues. Reduced the size of terrain patches coalesced into one vertex buffer from 16x16 -> 8x8. Any terrain-owning buildings will generally cause a VB rebuild each MW swap, so reducing the count of coalesced patches should reduce overall load. Also made it so that if the user's terrain preference is low (the real choice, not the auto-adjusted one), or if reflections are off (real choice again) it'll never generate the special clipped vertex buffers for terrain patches that are partially above and underwater. Basically, if the user's got things set on minimum, then try and run a little faster. [NM] - More work on mantis #1718. Added code to check for muzzleflash at the origin, to the editor build, ONLY. It'll spam to battlezone.log messages like this, when the weapon is fired, max of once every 5 seconds: DIAG| cannon:215 |22:47:45|8359 |Cannon muzzleflash at origin, for wpnClass 'gmbolt' owned by 'fbspir' in world 1. Squelched. This should help identify which weapons are going bad. Still doesn't explain why #1718 only happens with MW on. In the debugger, I did see that in loading that map, ivscout with faf mmissile had the same muzzleflash at the origin, even w/ MW off. As I noted, all weapons (in their base class) look for 'hp_fire' and then 'fire' when associating themselves for a muzzleflash, and possibly other things. [NM] -- b78c6 released============== - Fix for mantis #1740. Found a case where timeDeploy=0.0 could cause a divide-by-zero, which tended to make things look like a freeze. Now rounds up negative or zero timeDeploy/timeundeploy to a very small positive number. [NM] - Possible fix for mantis #1743 (only repro'd the alt-tab issue, didn't ever repro the while playing w/ others). List of lights known to DX9 are force-reset on alt-tab. [NM] -- b78c7 released============== - Fix for mantis #1739. Targetcam, sniperinterface now retain their field-of-view when setting up the near/farplane from the main camera. [NM] - Possible fix for mantis #173. Made quadtree report all lights in the current node as it's being traversed, and let the more accurate 3D position clipper make a final call. Also found that the 3D clipper was determining if a light should be active, then ignoring that. (It used to, but I think that got lost when I added the quadtree & caching code.) Restored that. [NM] -- b78c8 released============== - Upgraded 3rd party libs -- littlecms -> version 1.18, OpenIL -> version 1.7.8. Security updates on both, and a few more texture formats in the latter. BZ2 & dxtgen won't read those new texture formats, sorry. Re-ran bz2dxtgen, and it did come up with slightly different results for most of the .dxtbz2 textures. Things look generally the same to me, but it'll take a full build before I distribute all the .dxtbz2 files -- they're 54.8MB here. [NM] - Fix for the rest of #1743. Lighting quadtree was being disposed of when someone joined, which was causing lights to be forgotten. Now keeps the quadtree open & valid as long as the level's open. Should properly purge the quadtree if quit to shell. [NM] - Possible fix for mantis #1746, AV when quitting to shell. When no players can be found, then take safe path. [NM] - Works on mantis #1735 - changed optimizations on a file to hopefully get more info if it happens again. (Fix for 1740 might have already fixed this, not sure.) If you get a callstack w/ new build, post it. [NM] - Fix for mantis #1745, 1373 - ISDF sniper rifle displays correctly once again. [NM] - Possible fix for mantis #1687. Wave renders had flags telling DX9 that specular values were set on verts, but no data was ever specified for the specular values. Quite possibly using uninitialized variables and messing up. Not sure. [NM] - Work on mantis #1587, 1744, 1575, others -- if a construction rig's build matrix is invalid (non-comrpressible), it'll log (to battlezone.log) the matrix it didn't like. Still looking for a good repro case. [NM] -- b78d released============== - Fix for mantis #1429, possibly others. Added to odfs: [GameObjectClass] LightingType = 0 //(*) See below, default varies by type CustomAmbientColorR = 0.0 CustomAmbientColorG = 0.0 CustomAmbientColorB = 0.0 CustomAmbientColorA = 0.0 (*) Update for 1.3ta5.1 and up: objects with [GameObjectClass] classLabel = "terrain" or "deposit" now default LightingType to 1 If LightingType = 0, the traditional codepath is taken, and the CustomAmbientColor entries are ignored. If LightingType = 1, then the ambient color is taken from the terrain. Edited tepool01.odf to use this. If LightingType = 2, then it uses the custom colors specified -- ibnav.odf & ipdrop.odf use this. Mod assets that are similar to these three odfs will probably want to do something similar. [NM] - Fix for mantis #1749 - icviewer code was creating a new lighting quadtree, replacing the game's quadtree. (Very similar to 1743's recent bug). Should work fine w/o killing the game's lighting quadtree. [NM] - Fix for mantis #1700 - when upgrading a unit, subtracts its existing powerCost before calculating the powercost after building. Also changed the 'requirements not satisfied' popup to do the same. [NM] - Possible fix for mantis #1729, 1727, 1699, 1750. (Leaving the last one open as a tracking bug). Toned down the spotlight effects on spotblue2.odf, making them a bit more subtle. (Basically, normalized r/g/b of 1.0/1.2/1.5 to 0.65/0.8/1.0), and played w/ cone angle again. One thing that might help 1699 is that ivscout appears to have 2 headlights on the model, but only the right one has a light attached. I seem to remember that the ivrecy's 4 lights were enabled at some point during 1.3 development; having more than 1 light might allow DX9 to even out things. I think it's worth *testing* more than 1 light; not yet committed to shipping that way. Once people generally accept spotblue2.odf (used by ivscout, some others), whether it's this version or not, copying its setup to the other spotlights will probably happen. Not sure if I've stepped on some other light's toes in my search & replace thru the effects/lights folder. [NM] - Switched commandline param (i.e. shortcut properties) parsing code from homegrown code to MS's code -- CommandLineToArgvW(). This splits up the items, grouping together items inside "s, even with spaces. As typical, MS didn't provide such a useful function until Windows 2000 and up. [NM] -- b78d2 released============== - Fix for mantis #1438, 1608. Added, to explosion ODFs [ExplosionClass] FriendlyFireDamage = false If this is changed to true (and xbmbxpl.odf now has it true), then friendly fire will be applied to items it touches. I'd rather not now start an arms race of gameobject odfs having a flag saying "... but I really do ignore friendly fire..." Because I know that's the first request out of every modder's mouths when they see this. [NM] -- b78d3 released============== - Made ivar32 turn friendly fire on/off for all MP games. If it's set to on, OR [ExplosionClass]::FriendlyFireDamage is true, then an explosion will cause friendly fire damage. If both are off, then friendly fire causes no damage. Added an entry for it to bzshell_multi_st.cfg & bzshell_multi_client_st.cfg, only. Would appreciate someone editing the rest of the extra options pages. Compiles, but is untested. [NM] - Disabled the ability to unsync/addlag from the console. Getting closer to a release. [NM] - Fix for mantis #1731 - flag was incompletely moved to EntityClass when Ken moved things around. [NM] -- b78d4 released============== - Fix for crash introduced in last build -- part of mantis #1731 fix caused issues. I thought that all entities had valid entClass entries, but I guessed wrong. Apparently, the current behavior isn't quite identical to previous builds, but comparing this code against 1.2's source, it looks the same. I'm not going try and be bug-for-bug compatible with something else right now. [NM] - Made AIPaths track which world they're created in (for multiworld), and ensured that they're deleted from the right world's list of AIPaths. Some work on mantis #1734 seems to have triggered some cases where things could try and delete from the wrong world. Not sure if that's only with the 1734-specific (i.e. mod) assets, or it's something that's possible in stock. [NM] - Royal hack for mantis #1734. If this proves risky, I'm very likely to revert it and say "deal with it," as this is MOD-specific, and hardly something I see as a huge feature. Made it so that commtowers -- not just things using commtower process, they have to be actual commtowers -- when selected will actually send a CMD_INTERFACE to them instead. This appears to safely open up their satellite view, though there may be a slight lag due to MW swaps. (And, requests to reduce that lag will be denied.) There may be side effects. Please test stock commbunkers & commtowers extensively, in single and multiworld. [NM] -- b78d5 released============== - Updated light odfs once again, a hybrid of RD's work on mantis 1750, and my preferences. Hopefully they'll be a 'goldilocks' set of lights-- not too overpowering, not too soft. [NM] - ST, FFA, & MPI extra options cfgs now have the friendly fire toggle, thanks to Commando. [NM] -- b78d6 released============== - Update to Mar 2009 DirectX SDK. Updated download links in first paragraphs above. [NM] -- 1.3TechAlpha5-rc1 (1.3.5.79) released========================================== - My daughter was born. Following a BZ2 'tradition' (i.e., what two other programmers with kids have done), there's a reference to her hidden somewhere in code and/or data. [NM] - Updated comments in readme13.rtf about DirectX 9 graphics options, things that will be different between pb4a and techalpha5, etc. [NM] - Enabled the 'Join Game' button for games running on different versions, or when the server is locked down. A dialog should appear explaining why you can't join. Tested wrong version, but not lockdown message. [NM] - Rebased all helper DLLs I have source to (OpenIL, OpenILU, zlib, png, mng, jpeg, tiff, pcre, plus vorbis, vorbisfile and ogg) via their .vcproj file, and also rebased a binary-only DLL (ffc10p) to avoid fixups at runtime. These DLLs now load at the same place in debug and release. Changed full build installer maker to changed ffc10p.dll also. [NM] - Slightly increased size for version string on the login page. I want it to be able to fit 'Editor 1.3TechAlpha5' w/ some space to spare. [NM] - WaveRenderClass could double-free its index buffer on app exit. Put in a workaround. [NM] - Fix for false positive bad assets on a map distributed by this patch. Keeping details quiet, as they could be misused. [NM] - Turned off specular highlights on objects when the current (i.e. affected by autoadjust in MP) object detail setting isn't high. This should be a slight speed boost when people are trying to get higher fps. [NM] - Added GamePrefs.ini::ExtraFPSInfo . See comments above it. [NM] - Work on mantis #1599, even though all my systems don't have much of a slowdown at all w/ the latest savegame attached. Some optimizations to the opaque renderqueueitem sorter. Made specialized functions for the terrain phase, and specialized versions for 1-layer & 1-4 layer terrain, based on the current user preferences. Might have a slight speed boost. [NM] - Work on mantis #1599, even though all my systems don't have much of a slowdown at all w/ the latest savegame attached. The most CPU-intensive function in the profiler when playing the latest savegame is the 'chrome this object' code. Added [GameObjectClass] MaxChromeDistance = 0.0f // if > 0, then will turn off chroming when obj is this far away from camera Edited npscr*.odf to turn off chroming past 30m away, as they're small. Other ODFs may want to be edited, not sure. [NM] - Cached calculation as to whether a terrain cluster has multilayer or not. That line was showing up on the profiler, but it looks like it's really code from the previous line -- calculate distance to terrain cluster -- that's really taking some time. Also moved calculation of alpha masks for terrain clusters from the render code to vertex buffer rebuilding code. This might cause side effects, if the values used in calculations change between rebuild time and render time. (It's rendered a LOT more often than it's rebuilt, so this should be a slight optimization.) Do test. [NM] - Probable fix for mantis #1765, 1629. Found cases where single-layer terrain (because there was only 1 texture painted on it) that was also completely underwater could force it to use the unclipped terrain verts, which would protrude above the water. Simplified the code somewhat (to me, anyhow) by putting the logic for reflected terrain in one block, and normal terrain in a separate block. [NM] -- b79a released============== - Upgraded miniupnp source code to the 29/01/2009 22:49:47 version. As it was easy to do so with the latest miniupnp source, made it a DLL. BZ2 doesn't load enough DLLs yet :) . Because I had to make a .vcproj for Visual Studio 2008 to compile this app, I've included a copy of that .vcproj in the addon folder-- look for miniupnpchanges.7z, just like openilchanges.7z. Updated installer for that, and also made a pcrechanges.7z (just the .vcproj file, like miniupnpchanges.7z) to go out with the next dxtgen dist. BZ2 doesn't link against pcre, so neither the dlls nor the pcrechanges.7z are part of the BZ2 distribution. Also added comments to the UPNP messages noting what's serious and what's not. [NM] - More performance optimizations, I think. Quadtree nodes keep count of how many items are in their child nodes, allowing it to cut off the search when it's known pointless. Also optimized the bounding rect checks for which child node(s) to recurse into. When updating light states, it now keeps track of # of DirectX calls in a local variable, and updates stats at the end of the function. This should reduce cache misses. [NM] - Optimized lighting calls when # of lights is set to 1. Should trawl thru only the root quadtree node once per frame for the directional light (if reflections are on, this increases to 3, as it's got to flip the light normal for the reflected world, then back again after reflections). This should help optimize things when lights are set to 1. [NM] - Updated the way clipped vertex buffers are generated for terrain cells that are partly above and below water. Now, as long as reflections are enabled (even if auto-adjusted down temporarily), then the clipped vertex buffers will be generated. If the user turned off reflections, then the clipped vertex buffers won't be generated. If the user turns on reflections from the menus, then it'll force-update the terrain vertex buffers. [NM] - Tweak to the way texture size graphical option is handled. Now, shell backgrounds, loading backdrops, and things opened by IFace code (i.e. from .cfg) should ignore the user's preference of texture size med/low and use what's on disk. (Subject, of course, to reduction if DirectX says that the texture is too large for it.) [NM] - Possible fix for mantis #1776. Callstack looks iffy, though, so I'm guessing at a fix. [NM] - Fix for mantis #1775. Missed a case when rearranged reflected, clipped, and nonreflected terrain renders, with 1 or 4 layers for each case. [NM] -- b79b released============== - First pass at using a quick bounding sphere vs camera frustum bounding sphere. Doing it on the low-res sky layer for starters, as it's relatively simple code. Also, bounding sphere vs camera frustrum cone check is simple code, and faster than the bounding sphere tests. [NM] - Updated terrain rendering code to use quick-reject via camera frustum bounding sphere/cone, before using the same check as before. Also made it cache the distance between camera and terrain patch, something that's used in visibility & rendering code, so no need to calc it twice. [NM] - Fix for mantis #1778. Added warning if > 1000 AOIs (Areas of Interest) are found on a map when it's loaded. (Map included in bug had 96432 AOIs, which is *really* excessive.) Also added commandline param "-DeleteAOIsOnLoad" (bz2edit.exe only) to delete all AOIs from the first map loaded. Updated readme13.rtf to document that param. [NM] -- b79c released============== - Updated logging to battlezone.log as to what UPNP calls are being done, and with what parameters. Hopefully, this should help debug issues. Also made it try to delete an (old) mapping before creating a new one. [NM] -- b79c2 released============== - First pass at arranging terrain clusters into a quadtree, which should allow for some improved performance -- it can now cull out larger chunks at once. [NM] - Re-enabled render*.cfg::TripleBuffer parameter. If this value is uncommented, and 1, then triple buffering will be attempted. If this value is commented out, or any value less than 1, then double buffering will be used. Triple buffering will use a lot of video card memory. It is probably most useful if you have vsync wait turned on, but please experiment. [NM] - Possible fix for mantis #1633. Solo texture layer button seems to work once again. I'm not an expert in its use, so I could be wrong as to whether it works *well*. Also found some optimizations in multilayer terrain -- additional layers 1..3 were completely opaque on some areas on maps. When it notices that, it'll now squelch rendering of the lower layers, as it's pointless. [NM] - Upped chrome distance for scrap pieces from 30 -> 50. Was cutting off rendering a little close. Also, made a slight multiplier based on graphical options -- when object detail is set to small or medium, this distance is multiplied by a little, so that they're not chromed at closer distances. [NM] -- b79d released============== - Quadtree now used for reflected terrain, rather than attempting to submit an overly large number of mapclusters. Terrain uses boxtest as well to try and classify things as completely inside or out, allowing for faster culling. Still can't get it to accurately tell me when things are partially onscreen -- it prefers to tell me the instant a bounding box is partially offscreen, and uses the same clip codes as something that's 100% offscreen. [NM] - Tweak to low-detail sky (which is also used in high sky detail). Caches calculated alpha colors (i.e. the fade of the colors as it approaches the farplane) for hopefully a small speed boost. Look for any sharp lines in the low-detail skyplane. [NM] - Moved DirectX error reporting function from an inline macro to a function. May help reduce code size. Also made it force all pending writes to battlezone.log be pushed to disk on a DirectX error. This might cause slowdowns if BZ2 spams battlezone.log, but this isn't regularly happening to my knowledge. [NM] - Possible fix for mantis #1786, missing map clusters. Copy/paste error in terrain quadtree had a 'z' when it should have been an 'x'. Also, whenever world 0 is cleaned up (e.g. player join or resync), it forces a quadtree refresh. This seems to fix cases seen on my lan. [NM] - Fix for potential infinite loop in CacheManager::AttemptUnlag, caused by refactoring missing a loop increment. Ooops. [NM] -- b79e released============== - 2D tiled sky is now batched up and submits up to 32 tiles at once now. Should slightly reduce overall load on DX9 to use larger batches. Also made its fading based on the current fog min/max distances, rather than guessing based on farplane. [NM] - Box test added in last build was returning too early in some cases, leading to the wrong result. Fixed that. [NM] -- b79f released============== - Moved 3D cockpit radar to submit raw verts to DX9, and have your graphics card do all the math to get them onscreen. Seems to work. [NM] -- b79f2 released============== - Added all CD audio tracks as .ogg files to addon. These are encoded at ogg quality = 4, which ought to be good enough, without being huge. (The last track, which is silent, was trimmed before encoding.) Added an option for random tracks to the audio options pages. If this is selected, it'll scan for the files 'cdaudiotrack2.ogg' .. 'cdaudiotrack256.ogg', and use their presence to build up a random playlist. (If cdaudiotrack#.ogg isn't found, then it stops scanning, so the list must be contiguous.) Added callback from IA/MP DLLs to disable random tracks -- if AllowRandomTracks(false) isn't called, it assumes it's on. Did make the IA/MPI DLLs call that w/ true to be explicit, even though that's redundant. Bug me if there's no DLL source distribution released with the next build. [NM] - Fix for mantis #1784. Updated preview maps for mpiground0 & mpiground4. Weather was also added to one or both of those maps. [NM] - Fix for mantis #1791. FF should default to off in SP/IA maps as noted above. [NM] - Possible fix for mantis #1792 (after loading saves, I'm not in a place that I can see what's going on). Made GunTowerProcess apply this odf setting [CraftClass] AITargetLocation = # before aiming at a target. See Changelog_pb4.txt, lines 1789 & 360 if you're unclear what this means. [NM] - On the create game dialog asking for name/password/MOTD, made the text far more explicit as to what people need to do to successfully host a game. If you host a gamespy game, and no packets arrive asking for info, after 15 seconds, a message will appear onscreen reminding you that ports must be opened, and where to look for more info. Also updated nettips.rtf, and made installer distribute only that file. [NM] - Updated icon for installer, bzone/bz2edit.exe, dxtgen. Nielk1 sent along a much higher quality icon that was built with vector art, and included sizes up to 256x256. This new icon should look the same on XP, and better in Vista/Win7. Should still be compatible with Win2000 (please check this!). [NM] - Fix for mantis #1748 & 1556 - replacemap skins during extrude/collapsemesh renders should be used as appropriate. [NM] - Fix for mantis #1793 - Copy/paste error on terrain squelching. [NM] - Further optimization of box tests -- if a parent's bounding box doesn't intersect a camera plane, none of its children need to test that plane. Also optimized boxtest to test the extrema vertices, which should be slightly faster. Thanks to Ken for the help fixing up the math. Also optimized boxtest to remember which frustum plane caused an 'outside' reaction last time, and check that plane first next time -- most of the time, you view isn't changing radically enough that this is a net win. It should be no worse when that plane doesn't clip it out next time. [NM] - Changed the calculations for some of the camera projection values to make them consistent with the D3D projection matrix. Among other things, this fixes the screen-to-world projection in the editor. [Ken] - Gamespy version string appears higher-up in server info box at list of games page. [NM] - Fix for mantis #1794, probably others. Fixed the uncompressible matrix message that should appear when ordering a crig to construct things at a higher altitude than it in MW. [NM] - Moved center position of spotlights to partway along its direction vector. This should allow slightly more accurate positioning and determining which light(s) affect an object. Also added GamePrefs.ini LitObjectMinimumSize and SpotlightRangePad parameters. These are tuning values that should allow you to pick between lighting fidelity and performance. [NM] -- 1.3TechAlpha5-rc2 (1.3.5.80) released========================================== - Upgraded to PCRE v7.9, used by DXTGen only. [NM] - Fix for mantis #1798. Recent changes to projection matrix backfired on the status display, which is (expensively) using 3D math for a 2D display. Restored old code paths for statusdisplay, only. [NM] - Fix for mantis #1767. Teamcolors seem to be working once again. I *think* I got all the cases -- (skinned vs unskinned) * (normal vs extrudemesh vs collapsemesh). [6 possibilities in all.] Do test. [NM] - Fix for mantis #1800. Commented out light effect from plasma_a.odf. May help with framerates when lighting is on. [NM] -- b80a released============== - Further changes for mantis #1800. Commented out light effect from plasma_c.odf, just for consistency. [NM] - Slightly hacky fix for mantis #1799. In MW, it does an extra check to ensure that mapcluster pointers are valid before rendering a terrain quad tree. If they're not, it forces a refresh. Somehow, the dirty bits aren't being properly set for the quick checks. [NM] - Caches D3D texture stage state settings, and doesn't call DX9 if a request to 'change' a setting is pointless. [NM] - Changed approach to teamcolors. Now simply adds in a texture stage, and multiplies the normal output by the D3D texture factor. Seems to work reasonably well for the lighting none vs lighting some (1..all) approaches w/o having to rebuild vertex buffers, etc. [NM] -- b80b released============== - Fix(?) for mantis #1803, 1802. Sniper interface uses DX6 projection matrices once again, which seems to resolve the problem. Did the same work to the selection display, reticle. [NM] -- b80b2 released============== - More work on mantis #1802. CockpitRadar, commandpanel, grouppanel, infodisplay & launcherinterface all updated to use DX6 projection matrices. Camera stores a dirty flag to know when it knows it can skip updating the DX6 projection matrices, to hopefully avoid too much work. [NM] -- b80b3 released============== - Fix for mantis #1804. Editor code updated to use DX6 projection matrices. [NM] -- b80b4 released============== - Lighting optimization (for lights > 1, only). Uses proper size of terrain cells when lighting them, and GamePrefs.ini::LitObjectMinimumSize for non-terrain cells. [NM] - Utterly rude hack for mantis #1809. PlanarRenderClass biases submitted items' distances from camera over the course of a frame to ensure z-order is correct. [NM] - Possible fix for mantis #1810. Turn off teamcolors before applying glow skins. Not 100% sure it's right -- the yellow still looks a little washed out to me. But, should be better than before. [NM] -- b80b5 released============== - Glow skins should have the yellow tint, even when teamcolors are on. Also, to fix mantis #1628, turned off lighting when drawing the glow textures. [NM] - Work on mantis #1811. Allowed teamcolors values to be specified in gameprefs.ini, by rgb values, and transmitted over the network. See comments above GamePrefs.ini::TeamColorFFA0 for more info. Added in some more scriptutils.h calls for DLLs to get/set colors. Added in console commands game.setdefaultcolors, game.setgameprefscolors, game.setservercolors, game.swapteamcolors. There are also network chat commands "/setdefaultcolors", "/setgameprefscolors", "/setservercolors", and "/swapteamcolors" , which do the same thing. These are so that users can pick which of the three sets -- default (i.e. what BZ2 1.0 - 1.3pb4a defaulted to), local gameprefs, or server's teamcolors. Server's teamcolors will be their choice from the server's gameprefs file, optionally scrambled (if FFA is on and the gameprefs option to scramble them is enabled). The swapteamcolors is useful in team strat games, if you don't like the choice of colors the server picked for you -- it simply swaps the set of colors for the two teamgroups. [NM] -- b80c released============== - Minor updates to readme13.rtf, mainly related to system requirements, and features of 1.3ta5. [NM] - Updated various fatal errors while reading in .xsi files -- e.g. 'too many tris in:' to be more clear as to what the count read in was, and what the max is. [NM] - A few more comments above the teamplay colors settings in gameprefs, and added (though commented-out) Commando's set of teamplay colors that look close to the P3 optimized colors of 1.0-1.3pb4a. [NM] -- 1.3TechAlpha5-rc3 (1.3.5.81) released========================================== - Work on mantis #1533. Bumpmaps should be supported once again. Squeezed it into the graphics option page, and removed it from render.cfg. Console Bump.toggle and options.graphics.embm 0/1 should do the same thing. Made the bumpmap texture on treads get applied, too. Note: for embm to be supported, your graphics card must support at least 4 texturing stages (base, teamcolor, bumpmap, env map), and say it supports the D3DFMT_V8U8 format. [NM] - Possible fix for mantis #1832/1837. (1) Increased buffer size, (2) spammed logfiles less. [NM] - Fix for mantis #1831. If there are no indices for a clipped water chunk, it's skipped. [NM] - Fix for mantis #1835. Now, all objects implicitly provide their odf name for construction rig dependencies -- i.e. ibrecy.odf provides 'ibrecy' for the team, even if it's not listed as a provides inside ibrecy.odf. Note: this change *only* affects the construction rig, as it has some similar, but not identical, code to the aip code. Please don't take notes of behavior in the AIP code as neccessarily applying to the crig code. [NM] - Ensures that ${OutDir}\data\binData is created when BZ2 starts up. Looks like code might have been there to create it, but saw reports it wasn't working. [NM] - First pass at getting high-res stencil shadows back in. Looks like it did before. Also made it create stencil shadows for skinned objects. Note- shadows for skinned objects aren't animated with the objects. (For example, morph a fvtank, and the shadow doesn't update.) Rebuilding the shadow edge lists for skinned objects every frame could get quite expensive. I suspect this is why 1.0-1.3pb4a just did a generic groundsprite under skinned objects. [NM] -- b81a released============== - In Scriptutils.h, added TEAMCOLOR_TYPE_CURRENT as a parameter to pass to GetFFATeamColor(...). This allows DLLs to read the current value of any team's setting. Note - GetFFATeamColor(TEAMCOLOR_TYPE_CURRENT, ...) can be called even if team strat is on; it just allows reading of any team's current color. Team Strat has team group A on teams 1..5, group B on 6..10. [NM] - Fix for mantis #1819 - server's set of teamcolors are applied only once on joining; resyncs will not reset things to current. Compiles, but is untested. [NM] - Fix for mantis #1863. In Scriptutils.h, added in accessor functions for power, and also add/set max scrap/power. Code already had functions for these, just needed to do a quick wrapper. Compiles, but is untested. [NM] - Fix for mantis #1859. Some misspellings in changelog_pb2.txt, aip debugger fixed. [NM] - Updated dxtgen to version 23. (Separate release). Adds in lots of control over individual mipmaps. Also fixed a bug where black parts of opaque textures could turn transparent. After re-running the converter on all stock textures, only a few .dxtbz2 files ended up different, all of them bumpmaps interestingly: bbintf02_bump.dxtbz2, bbextf01_bump.dxtbz2, bbextw00_bump.dxtbz2, bbextf02_bump.dxtbz2, bbintc00_bump.dxtbz2, bbextw01_bump.dxtbz2, bbintf00_bump.dxtbz2, bbintc01_bump.dxtbz2, bbintf01_bump.dxtbz2, bbintw00_bump.dxtbz2. [NM] - Possible fix for crash at Close_RAD_3D+0x00000027, noted on the ta5 boards. Code is now *much* more aggressive at checking for NULL pointers in the bink (movie) player. [NM] - Possible fix for AV at Tractor_Control_Helper13::Render+0x000001E1 or Tractor_Control_Helper13::Render+0x0000010A. Now, much more aggressive at not exceeding buffer sizes when reading. Note - this might introduce graphical artifacts on treads. Do check. [NM] - Possible fix for AV with callstack that looks like this on intel chipsets: PSGPError+0x0004A164 [...] Direct3DShaderValidatorCreate9+0x000469A5 [...] Vid::FlushAllBuckets+0x00000008 Draw_Sky+0x000000C9 Made sky code release old vertex/index buffers at the start of the next frame, so that in case this crash was caused by things being released while still in use, that should be better. However, as this crash is *deep* inside the Intel driver, and only appears to happen on Intel chipsets, I'm guessing here. Wildly. [NM] - Fix for mantis #1836 - bz2abort() call after memory was stomped. Keeping details on it quiet. [NM] - Fix for mantis #1841. .pdb files written by full build installer will now be marked as hidden in Windows. Doesn't affect the view of power users who change the default setting of 'don't show hidden folders'. Does reduce the spam of files in the BZ2 install directory somewhat for people who don't touch Windows's defaults. [NM] - Work on mantis #1825 & 1826 - MapClusterClass & MapClusterMesh are now unified. Seems to work. Do test all the terrain rendering modes, from 1-layer, multilayer, water, reflections, wireframe (site cam, editor), etc. Also added in functionality to terrain quadtree so that it can determine the extents of a quadtree. These extents are used to check visibility of the entire region, and the vertex buffer isn't created until at least a small piece of the quadtree is visible. This should help reduce the expense of editor/satellite view on older/slower systems. There's still a few more optimizations for low end systems that I think should have a win. [NM] - Further work on Vista compatability. Turns out that the code to find and use ${MyDocs}\My Games\Battlezone II was run only after parsing the commandline -- if it had a commandline. (I always run w/ something here, which is why I didn't notice.) Made it always run that code. [NM] -- b81b released============== - Like dxtgen v25, upgraded bzone.exe/bz2edit.exe, and the full build installer to use XP (and newer) theming, if available. Not sure if bzone/bz2edit will display anything any differently except for possibly the 'ooops, I crashed' dialog. [NM] - "Fix" for high-res shadow issues on some models, e.g. fbspir.odf. Added to odfs: [EntityClass] AllowHQShadows = true // Allow high quality shadows if true; false='low' shadows only Added a chunk to fbspir.odf, with this set to false. Other ODFs that misbehave will need the same chunk. Please submit changed ODFs via the usual channels. [NM] - Fix for mantis #1820. Added in support for per-team colors in Team Strat/MPI -- look at TeamColorTeamA0 .. TeamColorTeamA4 and TeamColorTeamB0 .. TeamColorTeamB4. Also had to add in a scriptutils.h callback to query those values. Compiles, but is untested. [NM] - Fix for mantis #1868. AV fix for treads in last subbuild caused parts of treads to disappear. Fixed. And, lighting normals on treads should be more accurate with this fix in place, too. [NM] - Fix for mantis #1823 -- increasing max vertices/indices. BZ2 1.0-1.3ta5 had a max of 8192 triangles/vertices and 24576 indices. (24576 is 8192 * 3; there's 3 indices per triangle). Now, upped max triangles/vertices to 21800, and indices to 65400. Why these values? Because DX9 is coded w/ support for 16-bit indices on everything, which limits the indices to 65536 max. I picked a round number for indices a bit under 65536, and divided by 3 to get max triangles/verts. I'm not sure whether this limit is for models as a whole, or whether pieces on models -- e.g. the 4 pipelike pieces on the corners of the ibpgen, for example -- have the 21800/65400 limit per piece. This change will increase the memory footprint slightly for some things, but I've moved most large arrays based on triangles/verts/indices off the stack and onto the heap. Added in GuardedBuffer support to ensure there's no overruns. Compiles, but has had very minimal testing. Please test a bunch of things, especially .xsi -> .msh creation, pushing the vert/index limit, etc. [NM] -- b81c released============== - Fix for stack overflow occasionally seen in 81c. Thought some buffers were small enough to leave on stack, but they're 4.5MB, which is just a little too big. [NM] - Fix for mantis #1870, crashes importing some xsis, introduced in 81c. My bad. Thanks to bbb for the repro assets. [NM] -- b81c2 released============== - Possible fix for terrain patches disappearing in multiworld. Forced it to redo bounding box calculations a bit more often in MW. [NM] -- b81c3 released============== - EditColor/EditHeight/EditTexture (various parts of the editor functionality) now correctly estimate how many verts/indices they use, rather than saying "give me as many as possible." Did add in some sanity checks that'll make it die if it guesses wrong. Do test editing terrain color/height/texture in the editor. [NM] - Fix for misspelled 'equiptment' in pbsbay00.inf, pbscen11.inf, pbsbay.inf . Seems to have been there since 1.0. [NM] - Made plant grow/burn/fall code share the same guardedbuffer for verts, indices & colors. Previously, each section of plant rendering had its own verts guardedbuffer, its own index guardedbuffer, etc. Should be safe. [NM] - Stats on texture count & memory usage (visible if you turn on the extra framerate info) should be slightly faster and more accurate now. [NM] - Rewrote low-detail (2D sky plane), again. Now precalculates the fade against the fogplane only when sky radius or fogplane distances change. Submits a large-ish VB to DirectX and lets the card clip things. Basically, calculating the fades seemed expensive on the CPU to do per-frame, and I'm hoping that the GPU's clipper is more efficient at rejecting things. [NM] - Fix for mantis #1454 - unskinned objects will try and combine their vertex & index buffers whenever possible. This should reduce DX9 state changes. This should hopefully help performance, especially on slower systems. [NM] -- b81d released============== - Further tweaks to mantis #1823. Upped max triangles/verts to 60000 and max indices to 65400. Not sure if it's possible to make something that averages just over 1 vert per index. But, in case someone figures out something interesting, you've got some more room to work. The concept of indices being 16 bit (i.e. max of 65536) is VERY deeply embedded in the mesh reading code, unfortunately. Also, please note that if you do manage to get close to these limits, please test out the build effects on them. The ISDF and Scion build effects can (and do) introduce temporary vertices and indices when clipping the mesh to a plane. If you go over the 64K limit for verts/indices, *boom*. Reduce your mesh complexity if that happens. [NM] - Possible fix for mantis #1326. AIP DefendArea & ClearArea plans will pick different targets per plan instance, even if the targettype is the same. Compiles, but is untested. [NM] - Work on mantis #1871. Added, to .trn files: [NormalView] MaxDomeRadiusPct = 0.95 DrawSkyBeforeScene = true The first is the max dome radius as a % of the camera farplane distance (sky.visibilityrange). Some maps have had the dome radius set to exactly the visibility range. This is a way to pull it in slightly and avoid any DX9 clipping. The second one is a toggle -- what gets drawn first, (1) sky, or (2) terrain & objects. The console command sky.renderbeforeterrain should toggle this at runtime. Note - if the sky renders after terrain & objects, the dome will probably slice thru tall hills. I'm just giving people options; no guarantees any of them will be exactly what people want. [NM] - Possible fix for some of the crashes seen on loading FS missions and getting stack overflows. Restored the (kinda large) reserved stack buffer space flags in the exe. Do ensure that you're loading FS with bzone.exe, as FS doesn't have *editor.dll files. So, things aren't lined up for bz2edit.exe. [NM] -- b81e released============== - Better fix for AV with callstack that looks like this on intel chipsets: PSGPError+0x0004A164 [...] Direct3DShaderValidatorCreate9+0x000469A5 [...] Vid::FlushAllBuckets+0x00000008 Draw_Sky+0x000000C9 Found that on the first frame, the skydome's index buffer was being used with an incorrect offset. Fixed. Still not 100% sure this is the cause, but it is something that ought to be fixed. [NM] - Optimized calls to D3D device's SetSamplerState, SetRenderState. [NM] - Switched from using CreateThread() to _beginthreadex(), per reports on Win32 programming groups. Affects ogg, network receive thread, irc network receive thread, socket opening thread. _beginthreadex() is supposed to be friendlier to the C Runtime Libs than CreateThread() is. [NM] -- b81e2 released============== - Fix for garbage colors on terrain when in the 'place building' mode, when terrain's not colored red or green. [NM] - Fix for various AVs seen since fix for mantis #1454 was done. Didn't initialize count of remaining items in the buffer when using sharedstatic buffers. Oops. Thanks to bbb for a solid repro case. Also, per recommendation of debug DirectX libs, moved dynamic vertex buffers from POOL_DEFAULT to POOL_SYSTEMMEM. Not sure if this'll have any effect on performance. [NM] -- b81e3 released============== - Fix for mantis #1879. Targeting camera (and any other secondary views) were still using only the main camera to quick-determine visibility. Fixed. [NM] - Fix for mantis #1855. 'Computer' class animates UVs as it draws. If there are other things that need to use similar setups, should be easy to set flags enabling the switch from static to dynamic vertex buffers. [NM] - Made C4265 (class' : class has virtual functions, but destructor is not virtual) an error. Did catch one place in code where this could have been (mis)used. Also turned on these errors, but nothing was caught: C4905 'wide string literal cast to 'LPSTR'' C4906 'string literal cast to 'LPWSTR'' C4431 ''missing type specifier - int assumed. Note: C no longer supports default-int' [NM] - Tweaked fix to mantis #1326. Considers multiple possible targets of a given targettype. And, continues the fix made last time where multiple ClearArea/DefendArea plans will not step on each other's toes. [NM] - Possible fix for mantis #1856 - added, to all AIP plan chunks, [PlanChunk] ContinueEvenIfFail = false This is used by 'single' plans, i.e. non-grouped plans. I see various aip plans mentioning 'donextonfail', but I don't see that parameter ever read by code. In order to not suddenly change the behavior of existing aip files, I added a new parameter that's similar but not identical. If 'ContinueEvenIfFail' is true, then the plan's success code is ignored, and the next plan chunk (assuming it exists) is executed. If you don't like what happens, then don't use it. [NM] - Fix for mantis #1827. If terrain is 'simple' -- i.e. 1) terrain is set to low *AND* 2) lighting is (off or 1 light), then it'll try and coalesce draw calls to the terrain. (In other words, setting terrain to medium or high, or setting lighting to no headlights/all will disable this feature.) If it can draw multiple adjacent pieces of terrain in one draw call, it'll do so. This requires, of course, that the chunks be visible, and have the same base texture. I hope this helps w/ slower systems. [NM] -- b81f released============== - As it seems to be working now, disabled the 'GetDirtySlow' code from terrain. This was showing up as expensive on the profiler. The GetDirtySlow code was run only in multiworld, and appeared to fix some invisible terrain, especially around buildings. Hopefully my recent rewrites of things have fixed the root cause and this hack function is no longer needed. [NM] - Updated use of [GameObjectClass]::MaxChromeDistance - if an object is beyond that, it won't adjust the UVs on the object based on camera's position, etc. This should help performance. [NM] - Fix for mantis #1886, problem caused by recently expanded vertex limits. Switched to a GuardedBuffer to help identify this problem asap when it happens, and it should have enough scratch space to work in. [NM] -- b81g released============== - In preparation for mantis #1327 changes, did major overhaul of all path handling functions to make them store fully unicode throughout the pipeline. (Bink still requires non-unicode paths; those paths should be sliced to non-unicode after the full unicode path is found.) Do test that the following still work: - bzone.cfg hierarchy is read correctly, and files are loaded from right place in hierarchy - Movies, DLLs, etc that are based off AddDirRecurse() entries still work (e.g. if maps13\movies\foo.bik, maps13\missions\bar.dll exist, they're found and used - Duplicate files under an AddDirRecurse() are located, reported correctly. And any/other file operations. [NM] - Fix for mantis #1857, possibly also 1753 & 1627, and other alt-tab issues w/ the main shell's embedded movie. Attempts to restart that movie more often now. Sure seems like everyone's complaining about that movie, but its absence never really bothered me. [NM] - Fix for mantis #1327. Now, custom soundtrack ogg files do not need to be named cdaudiotrack#.ogg. BZ2 now scans each AddDirRecurse()'s 'CDAudioAsOgg' folder for .ogg files, including subfolders. If a found .ogg has the same name as something already added (e.g. already found in a higher priority AddDirRecurse), then the lower-priority entry won't be added. Requests for non-random tracks (e.g. SP missions) should still request only the cdaudiotrack#.ogg files. (Do test that for SP missions). Also bumped max # of ogg tracks for random tracks to 1024. If you need more than that, go run winamp or your favorite other media player in the background. [NM] - Fix for mantis #1845. Deploybuilding units (e.g. recycler vehicles) with an empty/invalid deployName will not get the 'deploy' command listed on the 3 key. Such units *really* ought to be using this entry to properly squelch the deploy command [DeployBuildingClass] CanDeploy = false // note - true is DEFAULT. Now, either setting CanDeploy=false or using an empty/invalid deployname will prevent the 3 key from being valid. Also, under those same conditions, the default spacebar action of deploy will be squelched. [NM] - Possible fix for mantis #1822. Noticed that the bumpmap/glowmap code was looking for another texture with the exact same extension (e.g. .pic/.tga/etc) as the input file, only. Made it search all supported extensions when seeing if a texture with a specific name exists. Compiles, but is untested. [NM] - Fix for mantis #1817. Z position should be correct for the terrain normal on the commandpanel ground sprite. [NM] - Fix for mantis #1852. Added to ODFs: [CraftClass] AllowedControlsWhenTugged = 7 Where this is a bitfield that allows specific behaviors to be turned on/off. They are: 1: Allow hop out of vehicle (subject to normal hopout rules) 2: Allow bailout of vehicle (subject to normal bailout rules) 4: Allow weapon cycling (next/prev) 8: Allow pitch/steering (i.e. controls normally on mouse) 16: Allow weapon firing & special weapon use Sum up the values you want to enable; default is 1+2+4 = 7. Note: normal engine movement (i.e. controls usually on WASD, plus jump) and deploy controls are not toggleable; they're always surpressed when tugged. [NM] -- b81h released============== - Fix for mantis #1883. In DefendArea/ClearArea plans, added to the .aip file: [Plan#] CheckEngageRange = true // default - true If this is true (default -- the behavior that's been around forever), then enemies nearby will be counted if they pass both (1) the AIP plan chunk's searchRadius parameter, *and* (2) found craft's engageRange must also be long enough to reach the potential plan target. If CheckEngageRange = false, then only (1) [searchRadius] is used. Note further that enemies must also have a maxHealth > 0 (i.e. be damageable), as this AIP code is smart enough to not waste resources on an invulnerable target. The savegame provided for this mantis entry has a custom unit with maxHealth=0, so it is not considered as an enemy. Compiles, but is untested. [NM] - "Fix" for mantis #1884. This is just to document that the AIP 'defender' plan searches for the recycler, then the factory, then an 'ivcons'. (No race-renaming of ivcons is done.) Any changes to fix this will just end up being more and more like the defendarea plan, which seems to be working decently well. Recommend that the 'defender' AIP plan not be used by modders. [NM] - Fix for mantis #1469, or as much as I'll do. To bzone.cfg (or whatever's set by the /config commandline arg), added a new directory substitution, '@mydocsdir'. This defaults to '${MyDocuments}\My Games\Battlezone II'. All the usual items in bzone.cfg should be able to use this, just like '@rootdir' is usable in those directories. Pilots and saves directories are now allowed to be in any subfolder under '@mydocsdir' or a subfolder under the bzone.exe/bz2edit.exe folder. Any folder outside of those two locations is forbidden and the default will be used. Tested bzone.cfg with these folders: SetPilotsDirectory("@mydocsdir\pilots13ta5"); (or) SetPilotsDirectory("pilots13ta5"); SetSavesDirectory("@mydocsdir\saved13ta5"); Mods are encouraged to install themselves to folders under @mydocsdir. That allows multiple BZ2 installs to find them, etc. Do test all of this, especially on Vista. [NM] - Asset updates - mantis #1805, 1702, 1770 (next full build). [NM] - Fix for mantis #109. civar2 changes are ignored if that player is not in the shell. Give/take command buttons on the escape screen still seem to function here. Do test those, though. [NM] - Fix for mantis #1872. Added to .odfs: [OrdnanceClass] or [ArcCannonClass] xplPerson = This parameter defaults to the xplVehicle entry. All the places where xplVehicle was used now checks if the target is a person, and will use xplPerson in those cases. Compiles, but is untested. [NM] - Fix for mantis #1887 - deployables & trackeddeployables will check their 'destroyed' flag each simulation step, and if it's set, it'll go boom asap. May have side effects. [NM] -- b81I released============== - Generalized mantis #1827. Terrain tries to coalesce like clusters. Now does that no matter what the lighting or terrain detail setting. Appears to reduce # of calls to Direct3D for terrain rendering, which should mitigate slowdown of terrain set on high. Do check for any rendering oddities. [NM] - Possible fix for mantis #1890. Undid fix for mantis #1887 in case it's causing problems. In debug, all works fine. [NM] -- b81I2 released============== - Possible fix for mantis #1891. ClearArea should use correct teams when searching for enemies. [NM] - Possible re-fix for mantis #1887/1890. Restored the code originally done for 1887, and added some extra sanity checks before it's allowed to be run. [NM] - Possible fix for mantis #1853. Ensures team coloring for all objects is reset on launching into a mission and quitting back to shell. Other than that, I'm not sure I see any problem(s) in the screenshots. [NM] - Full build installer also deletes BZII.isu now. MS Application Compatability Toolkit was using that file's presence as a way to turn on some compatability modes. Now that BZ2 is not a Win98 app, time to reset its hacks. You can locally delete/rename this file if you want to see what effect(s) (if any) this change will have before the next full build. [NM] - Fix for mantis #1861. Cockpit should glow in sniper view. Was sending double-transformed verts to DX9. [NM] - Fix for mantis #1897. Graphics options page split into two. First page is the options tweakable at runtime, the second is the options that require exiting and restarting BZ2. (Technically, windowed mode can still be toggled w/ alt-enter if not in MP, but most people don't know their Windows shortcuts.) Too the opportunity to add in 5 new options: windowed mode, triple buffering (moved from render*.cfg), specular on/off, target camera background (moved from gameprefs.ini, and added another level), chrome far objects on/off. Set the last three to off if you're trying to eke out the last little bits of framerate. I think setting the target camera background to low should be the same as BZ2 1.0-1.2, not 100% sure. [NM] - Fix for mantis #1896. Options pages should show user's stored vsync pref. [NM] -- b81j released============== - Possible fix for mantis #1904. Code didn't seem to agree on civar 2's meaning. Updated vars.txt to be clearer -- 0 should be commander, 1 should be thug. [NM] - Fix for mantis #1907. Added addon\config\localprefs_bzone.ini to private builds. In it, it's got all the options turned on to log -- to the chatlog files -- when lagouts are happening. Also [re]enabled most, but not all of the code in bzone.exe that logs to the chatlog. Lots of the code was disabled for ta5, restored some of it. If I think I'll need more, will add that logging. [NM] -- b81j2 released============== - More work on mantis #1876. If DrawSkyBeforeScene is true (default), sky is rendered before terrain. If false (not default), terrain is rendered then sky then all objects. Might make z-sorting better. However, in the savegame provided, you can see the skydome intersecting w/ terrain. Pick your poison. [NM] - Fix for mantis #1796. Uses a 'default' DirectX material for editor work. Also made it use the same material for font drawing. Might want to use the same material for all interface work, not sure. [NM] - Possible fix for mantis #1903. Targeted enemies should have backgrounds on them. [NM] - Changes for mantis #1854. Did find a case where materials on objects could be modified between the time they're submitted and the time they're used, which could give flickery results. Also made all objects with classLabel = "terrain" default to having [GameObjectClass]::LightingType = 1. Can still be overridden, just makes the default different from non-"terrain" objects. In the core savegame on that bug, the vertex color is definitely still passed to DX9 with and without lighting; still not sure what's going on with it. [NM] -- b81k released============== - Further updates for #1854. Items with classLabel = "deposit" now also default to having [GameObjectClass]::LightingType = 1. Should have done this from the beginning. Edited docs on LightingType above (about line 2768). If there are other classLabels beyond deposit & terrain that tend to be be embedded in the terrain and need matched lighting, let me know. Also added: [GameObjectClass] LightingFlags = 9 // see below for explanation Explanation of possible values Diffuse color 0: Use color from current material 1: Use diffuse vertex color (default) 2: Use specular vertex color Specular color 0: Use color from current material 4: Use diffuse vertex color 8: Use specular vertex color (default) Ambient color 0: Use color from current material (default) 16: Use diffuse vertex color 32: Use specular vertex color Emissive color 0: Use color from current material (default) 64: Use diffuse vertex color 128: Use specular vertex color Sum up the values from the 4 fields to get the value desired. Note that the caves in some core missions look a lot more blue with the emissive color set to copy from the diffuse color (lighting type = 73, i.e. 1 + 8 + 64). Basically, the diffuse color is modified by lighting, and the emissive color isn't, so copying the emissive color over from diffuse means it uses a color more like (diffuse*lighting + diffuse(in emissive channel)). Experiment around. [NM] - Fix for mantis #1908. Found some D3D values not being reset on alt-tab. Should work now. [NM] - Fix for mantis #1754. Targeted objects's terrain baseplates shouldn't flicker anymore. [NM] - Possible fix for mantis #1900. Added to ODFs: [ExtractorClass] or [RecyclerClass] or [ScavengerClass] or [ScavengerHClass] or [SiloClass] RunParallel = false If this is true, and the unit is anywhere in the scrap gauge except for the current section (which is executed already), then scrap is simulated for that unit. That means that the usual params for scrap delay, etc are handled. Further, things running in parallel don't need an extractor to be deployed to simulate. Compiles, but is untested. [NM] -- b81L released============== - Fix for mantis #1866. Debug.collisions should send properly transformed lines and planes to DX9. This code is definitely NOT optimized for DX9 -- it does a lot of calls to render one line and one plane at a time. DX9 definitely prefers large batches. But, I don't feel that it's really worth it to spend time optimizing this feature. [NM] - Fix for mantis #1881 - water now uses the same quadtree setup as the regular terrain. And, draw calls to DX9 are batched up as much as possible, so that up to 256 water chunks are submitted to DX9 in one draw call. Previously, it would call into DX9 for every water chunk, including some water chunks outside of what's visible. This should be a slight performance optimization, especially on slower machines running maps w/ lots of water. Do test that water in all its modes (wireframe, reflected, on terrain low/high, etc) is rendered correctly. [NM] - Updated to latest libtiff in the 3.9 branch -- grabbed via CVS from the instructions at http://www.remotesensing.org/libtiff/ . In its changelog, 2009-06-30 is the latest change noted. I've seen far too many libtiff security updates on ubuntu recently to want to keep sticking w/ the 3.8.2 libs. This change will be in the next full build, and shouldn't cause the existing libtiff/openil dlls to not load. [NM] -- b81L2 released============== - Fix for mantis #1929. Added to ODFs: [GameObjectClass] StayWithOwner = false If this is true, things that are team group aware, such as Scavenger/Scavenger/DeployBuilding/Construction Rigs, will do that operation on the actual team of the unit, not the defensive team # for the team group. For example, setting this to true on scavs sent to thugs to deploy will remain on the thug's teams. Compiles, but is untested. [NM] - Fix for mantis #1936, 1925, 1924 - AV when alt-tabbing or exiting. Water code changes weren't quite right. [NM] - Work on mantis #1932/1937 - tweaked optimizations on function to hopefully make whatever's going wrong more apparent. [NM] - Probable fix for mantis #1939. In low-res terrain, terrain chunks could use wrong texture if it coalesced too aggressively. [NM] - Fix for mantis #1928. Added, to ODFs [SupplyDepotClass] ServiceParallel = false // true == service everyone in range. false = most needy unit only If ServiceParallel is true, then any needy object in range (subject to all the filters, etc) is serviced at once. If false (default), then the traditional behavior of only the most needy unit is serviced. Compiles, but is untested. [NM] - Fix for mantis #1910 - forces clipped water chunks to be rebuilt (just once) if reflections are turned on after startup. [NM] -- b81m released============== - Vertex/index buffers set to be released in the next frame are done so on the next frame, not just on next alt-tab. (Related to 1936, 1925, 1924 above; I would have noticed those three bugs asap if if this change had been done.). [NM] - [Re]fix for mantis #1929. Previous change caused false positives on bad assets for MP games. My bad. [NM] -- b81m2 released============== - Probable fix for mantis #1940. If this happens again, a savegame would be great. Thanks. [NM] - Fix for mantis #1912. Some terrain shouldn't be cut off in sniper view. The amount of possible cutoff will vary depending on the targeted object background detail setting -- low will possibly cut off more than high. [NM] - Asset updates from mantis #1916, 1923, 1933, 1943, 1952. [NM] - Better fix for mantis #1940/1948. Savegame was helpful, thanks. [NM] - Fix for mantis #1941 - local fog. New localfog texture from mrtwosheds. Also made the local fog option have 5 gradations -- off, 25%, 50%, 75% and 100%. When the density is less than 100%, the # of slices is reduced by that factor, but the LocalFogDensityMult is adjusted the other way. In other words, at the default settings in the .trn of LocalFogSlices = 64, LocalFogDensityMult = 0.025, at 25% local fog, it'll do 16 (64 * .25) slices, at densityMult 0.1 (0.025 / 0.25). The new texture looks a lot better, and users should be able to pick what level of 'crush my system' they want. [NM] - Fix for mantis #1906 - upgraded libpng to 1.2.38, littlecms to 1.18a, upnpc to 2009/07/29 version, MS debugging tools for Windows 6.11.1.404 version. Rebased DLLs again to avoid relocation penalties on my boxes here. Re-ran DXTGen w/ changed libs on all stock textures. It produced the same results. [NM] - Fix for mantis #1633. Quadtree optimizations were calculating values, then throwing them away. Ooops. [NM] - Fix for mantis #1935/1954 - site camera should work once again. [NM] - Possible fix for mantis #1944 - if a thug's team has scrap capacity (maxscrap > 0), then the scrap gauge uses that thug's team, not the commander's team. Compiles, but is untested. [NM] ---- 1.3 beta 82 released======= - Fix for mantis #1961 (had already fixed locally), 1956. Also, fix for #1955- deleted ibintwc0.pic, ibintwc1.pic, ibgrillc1.pic, and .dxtbz2 versions of those. Need new full build to delete out of things. [NM] - Fix for something reported on the boards - "/resolution X Y" on the commandline will set the resolution used by windowed mode at startup. This overrides any value in render*.cfg; please be sure to check that your video card can push such a resolution. I'm not seeing mantis #1934 after this, going to mark that one fixed. [NM] - Possible fix for mantis #1960. More checks to ensure things are cleared out. Not 100% sure this is the cause. [NM] - Fix for mantis #1963 - added the ability to auto-ally teams in DM, IA, MPI, Strat and CTF DLLs. To do this, add in a section to the map's .trn file, with contents like this: [DefaultAllies] Entry1 = "9_10" Entry2 = "10_9" The above will ally teams 9 & 10 to each other; note that you should do the ally both ways (9 -> 10, then 10 -> 9). You can add as many entries as desired under [DefaultAllies]; they must be numbered consecutively starting at 1. If Entry# is missing, then it will stop looking for any further entries. [NM] - Fix for mantis #1965. Added GamePrefs.ini::TimestampOnscreenChat . Compiles, but untested. [NM] - Fix for mantis #1918 - list of banned IPs moved out of GamePrefs.ini, and into a new file, BanList.ini. Should be easier for people to find/edit now. Compiles, but untested. [NM] - Possible fix for mantis #1947, 1951 (if happening), etc. Moved StayWithOwner to [GameObjectClass] and adjusted comments above. [NM] -- 1.3PublicBeta5.1-rc1 (1.3.5.83) released========================================== - Updates to readme13.rtf -- news on pb5.1's top level features, and also noting that this version is pb5.1. [NM] - Fix for mantis #1975. Added, to .trn files: [Texture] InvisibleTexture = "" // texturename w/o extension, e.g. "mire" instead of "mire.tga" If this entry is specified, any terrain chunk w/ that texture set on it will not be drawn at all. Skipping a rendering call to DX9 is *FAR* more efficient that "drawing" an all-alpha'd out texture, and should help avoid some exploits. Tested w/ this set to "mire" on bridges2i.bzn; remember to omit any and all texture extension. [NM] - Fix for mantis #1867, probably others - blips on 3D cockpit minimap not lining up w/ lines. Seen more at low resolutions. This approach ought to be usable if there's any other cases where things aren't lining up between the DX6 and DX9 matrices. [NM] -- b83a released============== - Killed Race:Pluto map from next full build. I got bugged once too many times to fix race mode. Easier to just remove it, like I did with EMBM and shadows on high, until it's working. [NM] - Possible fix for mantis #1982. Sprites submitted are flagged as 'do not light', so their color should be less affected by the map ambient color. Compiles, but untested. [NM] -- b83b released============== - Possible fix for 1990, others. After a MW swap, it'll do the in-depth, but slower, check as to whether terrain chunks need to be rebuilt. For a while, the in-depth check was enabled every frame, which was too much. Then it was completely disabled, which is probably too much the other way. What it is now should be a balance of the two. [NM] -- b83c released============== - 3rd party lib upgrades: dlmalloc -> version 2.8.4, libjpeg -> version 7, libpng -> 1.2.39, libtiff -> version 3.9.1, libvorbis -> version 1.2.3, libogg -> version 1.1.4, miniupnc -> 20090807 version. Also applied these changes to dxtgen. metal1.jpg .. metal4.jpg converted to .dxtbz2 differently; do check. That texture is most noticeable on river.bzn/river4.bzn [NM] - Graphics options, page 2, is filled out in MP games now. Just like SP/IA, changes made on that page aren't applied until you quit to windows and re-run BZ2. [NM] -- 1.3PublicBeta5.1-rc2 (1.3.5.84) released==========================================