BATTLEZONE 1.5.2 CHANGELOG

1.5.2.19 (2013-11-26)
* Select bzone16q.zix with Texture16=1 and LargeAssets=2
- Eliminates the need to throw bzhw16q.zfs into addon
- Prevents the HQ texture pack from crashing software rendering
* Use SetEvent to notify the device reset worker thread that the reset is done
- Should fix the worker thread sometimes never exiting (and hanging the game)
* Person handles negative time of intersection properly
- Fixes crash when two Person objects spawn on top of each other
* Core BuildObject function validates position
* Fixed "zombie" powerups sometimes respawning every minute
* Producers only update nacelles/fins/whatever while undeployed
- Fixes CCA Recycler fins being in the wrong position
* ConstructionRig GetCommand uses SetConstructionMatrix
- Ensures that the matrix gets properly sanitized
- Reduces code redundancy
* Shell can tolerate maps with 10 character long filenames
- The map itself may act up but the shell won't crash or fail
* Remove seismic wave when it departs valid terrain
- Makes them work more like other ordnance types
- Fixes a crash in Goomba's "Mystery Tower" map
* Fixed AI controller handling of longer mission names
- Total filename can be 16 characters
* Improved raw mouse input handling
- Should mouse acceleration be an option?
* Show an error instead of crashing
- When a DM or ST map has no spawn points
- When setting an AIP that doesn't exist
* Fixed SAVs not moving
* Construction blob draws properly with multiple camera views active
- Submit was clearing the draw list so it only showed up on the first camera
* Converted ColorFade and LensFlare to GameFeature
- They now show up in no-HUD (Shift-F5) view
* BounceBomb expires if its owner goes away
- Should eliminate most cases of "ghost" tanks
- This is "backup" when other mechanisms fail
* Fixed SAV moving at double speed
- DoCollision also applies velocity
* Added ALLIE_IsLocked accessor function
- returns value set by ALLIE_Lock
* MultGMMission doesn't mess with Net::Team
- This mission type is currently unused
* Net game clients load the mission in parallel with the host
- Greatly reduces startup delay for complex missions
- Reduces chance of the client timing out if loading takes too long
* Improved team assignment in multiplayer
- Value assigned in the pre-game lobby is only tentative
- Assign permanent team number from spawn point packet
* Made player names in score system more reliable
- Should fix spurious "Team <#>" in kill messages
* Walker AI "ShouldAttack" works more like other combat units
- Should make them better able to defend themselves
* Fixed crash when restarting after saving a mission file
- Restore the current working directory after saving
* Pilots launch from the Barracks properly
* Improved Scavenger handling of "pick up scrap" command
- Skips straight to starting a ScavGotoScrap task
- Lets the Scavenger pick up "locked" scrap pieces
* Added "GoD" cheat code (Non-Internet games only) (submitted by Dx)
- for ease of development testing :P
* Fixed BounceBomb disappearing for the local player in multiplayer
- It was pointing straight down into the ground
* Disable damage and lava heat in edit mode (Ctrl+A)
* Tracer doesn't switch to colored line LOD in hardware rendering
* Fixed file system sometimes returning the wrong version of an asset
- It made LargeAssets=2 use the version of check.odf from bzone.zfs
- How did this ever work?

1.5.2.18 (2013-10-17)
* Fixed NetGameDlgProc invalidating the rect of a nonexistent mapLabel
- Why wasn't this crashing all the time?  :P
* Non-airborne PowerUps send state while moving
- Covers sliding downhill and moving with a seismic wave
- Keeps remote copies in sync
* Wait for the device reset thread to exit before continuing
- Prevents its simulation from clashing with the main thread
- Thread skips simulation if done waiting for reset
- Should fix random crashes when switching between game and shell
* Imported AiMission DeleteObject from BZ2
- Called whenever a game object gets removed
- NOTE: it isn't quite symmetrical with AddObject
* Added ObjectsInRange Lua iterator
* Added more game object class script utility functions
- GetClassSig: returns class signature string (e.g. "WING")
- GetClassLabel: returns class label (e.g. "wingman")
- GetClassId: returns class id
- IsPerson: returns true if the object is a person
* Rolled back the Simulate/PostSimulate physics split
- It caused too many problems with network code
- Collision response doesn't seem particularly different
* Fixed remote objects sometimes exploding when they shouldn't
- Particularly affected pilots and powerups
- Send and receive code didn't match up
* Added a few more Lua script utility functions
- GetLabel: returns the label of the object (e.g. avtank0_wingman)
- AllObjects: iterator returning all game objects
- AllCraft: iterator returning all craft (and pilots)
* Mission load errors out if the mission class can't be found
- It previously crashed with no explanation

1.5.2.17 (2013-10-07)
* Pilots don't get stuck when the vehicle they're going towards gets destroyed
- This time for sure!
* Fixed a dumb crash in ClearScrapAround :P
* Reorganized how the shell handles of map types
- Now driven by a couple of data tables
- Shuffled around the type list
* Fixed AiPath flavor of BuildObject not using terrain height
- Nothing seems to use this function, though
* Fixed ClearScrapAround when called from Start
- The Scrap range search structure hadn't been set up yet
* Added some script utility functions for wrangling AI units
- CanCommand: the unit can be commanded
- CanBuild: the producer is able to build
- IsBusy: the producer is currently busy
* Armory properly handles BuildAt command
- Internally works like the Construction Rig
- Builds immediately when given a "where"
- Otherwise waits for a Dropoff command
* Fixed a major buffer overrun in the map list
- Triggered when a line in netmis.txt was over 100 characters
- Overwrote global shell state causing all kinds of problems

1.5.2.16 (2013-10-05)
* Fixed an assert (and possible crash) in the net game dialog
- Trying to call Timer to update the player list before Init is bad :)
* Fixed a stupid crash in Inst03Mission
- It was creating a new pathSpawn every frame :|
* Fixed repair/reload for groups of deployed units
- Queue repair/reload request if the armory is busy
- Avoiding repeated VO message took some trickery

1.5.2.15 (2013-09-30)
* Rolled back mission save/load culling unlabeled paths
- It turns out that mission files DON'T exclude AI state...
- Fixes crash when loading maps with AI state like Capt. Chaos
* New Vector Lua functions
- DotProduct: dot product of two vectors
- CrossProduct: cross product of two vectors
- Normalize: scale vector to unit length
- Length: length of a vector
- LengthSquared: squared length of a vector
- Distance2D: 2D distance between two vectors
- Distance2DSquared: squared 2D distance between two vectors
- Distance3D: 3D distance between two vectors
- Distance3DSquared: squared 3D distance between two vectors
* New Matrix Lua functions
- BuildAxisRotationMatrix: build matrix from angle and axis
- BuildPositionRotationMatrix: build matrix from rotation angles and position
- BuildOrthogonalMatrix: build matrix from up vector and heading vector
- BuildDirectionalMatrix: build matrix from position and direction vector
* Split reliable broadcast messages into separate sends
- The reliable broadcast queue can fill up if a player is unreachable
- Subsequent reliable broadcasts would then fail
- ...and a lot of important things use reliable broadcast
* Fixed a hang when using Texture32=1 in render.cfg
- Did this ever actually work?
* Player list shows grey "?" for ping time of zero
- When ping hasn't been done yet
- When ping got 100% packet loss
* Keep Anet alive when leaving game and returning to shell
- Only destroy Anet if quitting by closing the window
- Fixes the shell blacking out
- Problem was introduced back in revision 1540
* Fixed crash in UnitTask::UpdateWeapon when the unit has no active weapon
* Updated Load/Save dialog code
- Fixed filter strings, which needed an extra zero byte at the end
- Allow directory change for both missions and savegames
* Clear and rebuild player lists on entering the screen containing them
- Should flush out any leftover player list entries
* Turned off per-polygon collisions for bullets
- Should fix AI missing some buildings from some directions
- Ideally targeting would use something besides the geometric center
* Damage no longer affects Person physics parameters
- Restores the original and expected behavior
- Person had code for it but never used it
* Detonate Torpedo when close enough to its target building
- Prevents it from riding up over its target
* Turned off DEP on Dx's recommendation
- Should allow the original Anet DLLs to work
- Newer Anet DLLs don't time out disconnected players properly
* Many ScriptUtils functions accept position vector or transform matrix
- SetPosition
- GetDistance (second argument)
- GetNearestObject
- GetNearestVehicle
- GetNearestBuilding
- GetNearestEnemy
- Goto
- Mine
- Dropoff
* Added BuildAt function for building at a specific location
- Armory and ConstructionRig use the location
- Recycler and Factory ignore the location
* Added some scrap management functions
- GetRidOfSomeScrap: reduce global scrap to a set limit (default 300)
- ClearScrapAround: remove scrap within range of location
* ConstructionRig SetConstructionMatrix cleans up input values
- Snaps position vector to the floor height
- Flattens facing vector to eliminate pitch/roll
- Cleans up a lot of code
- Should fix the satellite view "sinkhole" bug
* Added Start method to AiMission
- Can use this instead of doing one-time start in Update
* Added matrix version of Dropoff
- Only the Construction Rig can take full advantage of it
* BuildPositionRotationMatrix also accepts a position vector
* Added support for locking (and unlocking) team alliances
- Allows mission scripts to preserve pre-set alliances in multiplayer
* Added Lua functions for getting terrain/floor height and normal
- TerrainGetHeightAndNormal
- FloorGetHeightAndNormal
* Use strrchr instead of strstr to find extension
- Technically it should use splitpath...
* Remove extension from filename before opening mission save dialog
- Prevents double extension (e.g. usrmisn01.bzn.trn or usrmisn01.trn.bzn)
* Ported GetCircularPos and GetPositionNear from BZ2
* Added variants of Find that take a config string
- GameObjectClass, WeaponClass, OrdnanceClass, and ExplosionClass
- Makes them less annoying to use
* Ported more ScriptUtility functions from BZ2
- GetPilotClass: get pilot config from a game object
- SetCommand: general-purpose set command for power users
- GetMapTRNFilename: get name of TRN file for use with OpenODF
* Added Lua AiCommand table
- Convert between command names and numeric values
* SetCommand uses a default priority of 1 like other command functions
* MultDMMission AddObject skips forwarding for neutral objects
- Prevents neutral vehicles from getting an AI process
- Fixes Z Monolilth's Revenge and other maps that spawn empty vehicles

1.5.2.14 (2013-09-16)
* Player-controlled APC can deploy only within 75m of an enemy target
- It could previously deploy within 75m of a friendly target too
* Fixed Scavengers crashing on non-player teams with no strategic AI
* Scavenger AI creates an escort goal in multiplayer
- This should make AI-controlled teams work better in MPI
* Update GameObject color as part of ComputeVisibility
- Ensures that team colors are always up to date
- It's cheap enough that it's not worth being clever
* Workaround for assert when an object's team number is negative
- These are removed GameObjects that have not been deleted yet
* LuaMission properly loads string and table types now
- These never got tested properly... :P
* BuildingClass supports "portal" class label
- Prevents an error when creating a portal building (e.g. cbport)
- Doesn't actually implement portal behavior, though
* Added a Lua panic handler that shows an error dialog before exiting
* Lua error outputs a debug message in addition to showing a dialog
* Howitzer keeps Attack mode active when not deployed
- Unit deploys immediately when told to attack
- Lets mixed groups (deployed and undeployed) use the Attack menu
* Skip sending bomb to locked geysers (Dx)
- Note: Should skip sending bomb to scrap
* Fixed Day Wrecker bug (Dx)
- Skips Day Wrecker state update
* New ScriptUtils functions
- AddMaxPilot
- SetMaxPilot
- AddMaxScrap
- SetMaxScrap
* /largemap correctly handles 16-bit and 32-bit textures
* Added a cellTeamRef entry for team zero
- Fixes crash when creating a team-hazard object on team zero
* New ScriptUtils functions
- BuildObject taking a position vector
- BuildObject taking a transform matrix
- GetTransform/SetTransform
- GetPosition/SetPosition
- GetFront
- GetVelocity/SetVelocity
* LuaMission supports vector and matrix types
- All the new vector and matrix ScriptUtils functions
- SetVector for building a vector from numbers
- SetMatrix for building a matrix from numbers
- Various operators for matrices and vectors
- SaveValue and LoadValue handle vector and matrix values
* Continued scrubbing mission scripts of old-style calls (Dx)
- GameObjectHandle::GetObj
- Direct calls to GameObject methods
* In-game UI supports custom object and weapon names
- Use (localized) sprite-based names when available
- Use (currently non-localized) text-based names otherwise
* Mission files don't load or save unlabeled (AI-generated) paths
- Eliminates a bunch of useless clutter
- Mission files exclude AI state so these paths are never referenced
* Added IsCraft and IsBuilding script utility functions
* Added GetBase script utility function
- Returns the base config of the object
  (which actually represents which model it's using)
* Person starts the "standing" animation when created
- Should fix the randomly-occuring rotated first-person gun
- Applied the same change to Walker for consistency
* ASCII string read no longer stops at the first space
- It now reads to the end of the line
- Fixes nav names getting truncated in misn04
* Misn11Mission fixes (Dx)
- Fixed typo for camera
* Misn12Mission fixes (Dx)
- Show Objective after the camera scene finishes
* Misn17Mission fixes (Dx)
- Fixed 3 BuildObject typos "eggiezr1"
- Fixed missing mines [MINE {10, 54, 55, 56}]
- Fixed Damage on MINE[53]
- Fixed Tower 7 name 
- TODO: Fix in Sprite table
* Misn05Mission fixes (Dx)
- Fixed Mine 16 and 24
- Changed boltmines to team 2
* Misn06Mission and Misn07Mission fixes (Dx)
- Fixed a crash if player died during the camera scene
* Added filtering and adjusted strength of AI evasion maneuvers
- Should make it less unfair for players

1.5.2.13 (2013-05-11)
* Center mouse when switching control modes
* Fixed uninitialized variable in Producer::Load
* Skip non-commandable units when selecting
- Category (Ctrl-1, Ctrl-2, Ctrl-3)
- Group (F1 through F10)
- Avoids non-commandable units disabling commands
* Scrub non-commandable units from unit selection
* Producer and TurretTank save format compatible with 1.5.1.17

1.5.2.12 (2013-05-09)
* Changed multiplayer map filter names
- Action to Action MPI
- Mission to Mission MPI
* Compute damage-adjusted parameters on demand instead of caching them
- Removing the object-local copies significantly reduces object size
* Fixed some compile warnings in HoverCraft
* Removed object-local copies of build item lists from Producers
* Streamlined Armory UpdateModeList
* Removed bumpers array from Craft and Powerup
- Store a bounding box in the root object
- Compute bumper positions on demand
- Saves 6*3*4 = 72 bytes
* Fixed floating-point exceptions in Make_Poly and AddTerrainPoly
- Tripped when a LIGHTING struct mapped to a float NaN
- Copy LIGHTING structs instead of floats to avoid this
* Disable preload while loading the build menu
- Prevents geometry cache from overflowing
* Changed how OBJ76 node hierarchy works
- Use the more typical "parent" link instead of "back"
- Advantage: getting the parent node is now a constant-time operation
- Downside: detaching a node has to traverses the list of predecessor siblings
- Speeds traversal up the tree (a relatively common operation)
- Should allow a non-recursive implementation of tree-walk
* Streamlined obj_get_world_position and obj_rel_parent_position
- Use vector transforms instead of matrix multiplies
* Moved some sound updates to PostSimulate (where position is up to date)
- SAV inherits the HoverCraft version
- TurretTank moves it to the non-UNDEPLOYED case
* HoverCraft uses (non-recursive) tree walk to process child nodes
- Saved ~200 bytes by removing arrays of child object pointers
- Update nacelles, fins, and flame and dust emitters in PostSimulate
* ProximityMine ignores destroyed craft
* Spread out MineLayer dispersal pattern
- Spaces them 60m apart instead of 30m
- Somewhat closer to the original 1.4 pattern
- Reduces mine "fratricide"
* Recenter mouse when switching to satellite view
* Added VO when the Minelayer starts and finishes laying mines
* Fail mission if the player vehicle gets sniped
* Don't let the player switch views during a cineractive
- Prevents switching away from the post-death orbit camera
- Avoids crashes in views that require a valid player entity
* Minelayer uses selectUser1Msg message while laying mines
* Improved how deployed units handle get repair/reload
- Try to request the item without interrupting the current action
- Don't spin around while waiting for the item
* ArtilleryProcess uses direct fire whenever possible
* Tug no longer drops cargo when going to get repair
* Fixed Lua library initialization
- My homebrew version didn't work for some reason...
- Exclude io and os libraries in linit.c instead
* Reduced GameObject memory pool slot from 1400 bytes to 1024
- Enabled by size reductions committed in previous changes
- Aligns with memory pages (4096 bytes) and cache lines (64 bytes)
* Properly NULL-terminate the LuaScriptUtils array
* Fixed damping constant in SAV
- SAV rises and falls much faster (possibly too fast)
* Removed "deployed" check from DoCollision
- Fixes Tug collision since it uses deploy for carrying cargo
- TurretTank and Producer control their collision in PostSimulate
* Closing the window shuts down the network system properly
- Fixes the player hanging around with 100% loss

1.5.2.11 (2013-05-03)
* Updated UnitTask ordnance avoidance
- Skip sniper shots since they're invisible
- Take the unit's velocity into account
- Take the ordnance's radius into account
- Apply evasion properly in GotoForce
* SeismicWave sets its object radius to the wave radius
- Units avoid its area of effect if they see it coming
* NetPlayer uses netPlayerByTeam to track used teams
* Fixed potential floating-point exception in PointVelPoly
- If vd was denormalized, t could become infinity
* SelectionDisplay player name display skips negative team number
- Units briefly have a team number of -1 after being cleaned up
- This may fix the Font_Get_String_Dimensions crash seen in MPI
* ChunkEffect and Craft tolerate missing explosion classes
- This happens when using content from the 0.7 beta demo
* Treat deploying and undeploying craft as immovable
- Makes collision with them work better
* TurretTank and Producer have their own PostSimulate
- Call HoverCraft PostSimulate while undeployed
- Call Craft PostSimulate and discard collision otherwise
* PathSpawn handles save/load a bit better
- Search for existing spawned items on startup
- It still loses spawn delay timers, though
* TurretTank and TurretCraft update terrain ownership properly on team change
- MAS Grenade revealed a flaw in the previous implementation
* Added MPI to the map filter list (use M in netmis.txt) [Dx]
- Put map filter list in alphabetical order
- Added new KOTH and MPI icons
- Requires updated netmis.txt and the icons in the addon folder
* Turn off player smoke, dust, and engine effects while in edit mode
* Fixed uninitialized values in Scheduleglue buildingtype
* Pilots don't get stuck when the vehicle they're going towards gets destroyed
* Units ignore enemies carried by a Tug
* Build menu can read the name of a weapon powerup from the weapon it gives
- This is how the weapon powerup itself gets its name
* Shell update
- Renamed MPI-ST to "Mission" map type ('M')
- Added MPI-DM as "Action" map type ('A')
* Updated project file with new mission type bitmaps
* Fixed SAV weapon pitch
* Added debug display showing hardpoint types and locations
- Toggle with "showguns" cheat code
- Color indicates slot: 1=red, 2=yellow, 3=green, 4=cyan, 5=blue
- Letter indicates type: C=cannon, R=rocket, M=mortar, S=special
* Run simulation during a D3D device reset in MP
* Added cutoff distances for hardpoint and collision debug displays
* Disabled MP "death cam" view until I come up with something better
* Set KOTH icon back to king.bmp
- Allows full backwards compatibility
- Asset version can look different
- Resource version is never used anyway
* Shell handles missing MPI icons gracefully
- Use [D] if [A] is missing
- Use [S] if [M] is missing

1.5.2.10 (2013-04-24)
* Fixed Torpedo double-speed movement
* Fixed ReticleDisplay when selectObj got deleted out from under it
- It now uses a DeleteObject callback instead of DeleteEntity
* Added GetTarget accessor to Missile
* UnitTask evades ordnance at Very Hard difficulty
- Sidestep incoming projectiles
- Attempt to dodge homing missiles
- Priority over line-of-fire evasion
* Added weaker line-of-fire avoidance at Hard difficulty
* Added random movement after being shot by an enemy
* Fixed SAV double-speed movement
* GroundCheck takes current time to impact into account
- Now gets the earliest time to impact
* Updated PowerUp collision handling
- Moved ground check into a protected method
- Clamp time of intersection to a minimum of 0
- Moved airborne collision landing to PostSimulate
* Updated Torpedo collision handling
- Use PowerUp GroundCheck method
- Clamp time of intersection to a minimum of 0

1.5.2.9 (2013-04-14)
* SeismicWave can move floor-owning buildings
* Rolled back some terrain editor changes that broke things
* Updated terrain editor camera rotation
- Turn rate is now independent of frame rate
- Halved turn rate so the camera is more controllable
- Reduced filtering so the camera is more responsive
* New ScriptUtils functions
- IsValid: returns true if the handle is valid and false otherwise
- IsDamaged: returns true if the handle is valid and the game object is damaged
* Scrubbed mission scripts of GameObjectHandle::GetObj and calls to GameObject methods
- Replaced them with ScriptUtils equivalents (many of them new to 1.5.2.x)
* Clear out team-to-net-player map after the session ends

1.5.2.8 (2013-04-09)
* Fixed editor setting the wrong build teams
* Fixed video mode switch changing camera settings
- This particularly affected the terrain editor view
* Clamp visibility ranges to maximum far clipping plane
* Halved memory used by tile mix cache
* Updated terrain editor
- Moved non-rendering functionality to Simulate
- No longer changes view distance when switching views
* Deployed craft ignore collision and ordnance impulses
- They are now as immovable as buildings :)
* Call PostSimulate for destroyed game objects
- Updated PostSimulate to handle this
- Fixes units "hanging" in midair when killed
* Fixed crash on exit when running a DM mission from the command line
* Fixed a crash in GotoTask when the path was NULL

1.5.2.7 (2013-04-07)
* Fixed a potential buffer overrun in PathSpawn
* Turned off DR_Debug memory allocation message spam
* Moved ParameterDB::FileData struct out of the header
* Turned off PARAMETERDB_REPORT_WRONG_SECTIONS
* Switched polygon collision to local space
- Now works more like box collision
- Fully supports animated models
- Improves precision
- Tested with buildings (though currently disabled)
- Floor geometry still in world space
* Streamlined collision geometry structures
- One memory allocation per collision geometry
- Flat array of vertices, indices, and faces
* Added collision debug display
- Toggle with cheat code "drawcoll" (type while holding SHIFT+CTRL)
- Shows entity bounding box in grey
- Shows other collision shapes in team color
- Supports spheres (in theory), boxes, and poly
* Fixed crash when showing Goals or Priorities for a team with no strategic AI
* AI team checks relations when counting enemy buildings and units
- It previously assumed all other teams were enemy :|
* BREAKING CHANGE: strategic AI requires opt-in
- Single-player missions default to team 2
- Multi-player missions default to none
- SetAIControl function overrides default AI control
- NOTE: this only takes effect during pre-load!
* Allocate strategic AI mapgrid goals from a memory pool
- This speeds up initialization of large maps in Debug
* Added Team::GetAllies method returning the allies bitfield
* Track team ownership of terrain cells
- Replaces "team hazard" mechanism
- Works correctly for all teams
- Takes team alliances into account
* Fixed material cost calculation
- Derp de derp...
* Fixed cliff force for teams 3-15
* Fixed team ownership for team 15
- SLAB_STRIP was stomping its ownership bit
* Fixed a crash in path editing
* Added new path editing features
- Delete removes the selected path point instead of the last point
- Holding control inserts points after the selected path point
* Fixed units on AI teams not counting towards kills
- There's three different places keeping track of score...
* Prevent terrain access from reading outside the world
- The world effectively "wraps around" at the edges
* Revised craft collision
- Resolves interpenetration better
- Reduce friction/stickiness of continous contact
* Reorganized how collision detection works
- Simulation updates linear and angular velocity
- Collision detection uses the updated values
- PostSimulate applies collision response and sets final transform
- This improves collision accuracy (especially continuous contact)
* Added GeomBox collision
- Fixes some missed collisions
* BoxGeom doesn't assume that geom is stationary
- It used to be but isn't any more :)
- TO DO: make it more efficient
* Fixed CLASS_ID_VEHICLE not colliding with buildings
- Collision previously required one entity use CLSN_TYPE_CAR
- Vehicle load now preserves car collision data for CLASS_ID_VEHICLE
- Collision will use that car collision data when necessary
* Combine identical vertices in the collision geometry
- Ideally this would be done once as part of a shared structure
* Use GeomBox check for tall units in addition to CLASS_ID_VEHICLE
- This is a hack to fix Walkers not colliding with per-poly buildings
* Fixed ConstructionRigProcess class crash in misn09.bzn
- Handle CMD_STOP more like other producers
* Added extended teams (8-15) to the Build Team menu
* Fixed clients crashing when a player killed an AI team unit
* Inst03Mission supports Lua mission scripts
- This allows play01.bzn to act as a Lua testing sandbox

1.5.2.6 (2013-03-22)
* Fixed mistyped objective file name in misns1 (submitted by Dx)
* Removed AudioMessage for nonexistent sound in misns4 (submitted by Dx)
* Updated PathDisplay
- Always show a label over the user object
- Added a slight rollover effect for game objects
* Consolidated memory allocations in Numerical Recipes matrix creation functions
- They were previously allocating a header and then one block per row
* Backed out revision 1404
- GlobalSetLocal/GlobalSetRemote doesn't work well at runtime
- It didn't solve the ownership problem for remote players
* Backed out GlobalSetLocal changes from revision 1403
- These got rolled up into the big ParameterDB change
* Track team ownership based on team number instead of network player id
- This works because each player is on their own team...
- Disambiguates MPI AI teams from the host player
- Non-player teams should migrate properly during host migration
* Destroying units on a non-player team counts as a kill
* Non-player teams display kill and death messages like player teams
* Removed unused team remapping feature from AiMission
- Only MultDMMission ever used it
- Increasing MAX_TEAMS made it obsolete
* Remove the oldest scrap piece when out of game object slots
- This is a last-ditch recovery attempt to avoid a crash
* Don't show a health bar for indestructible objects
- This fixes geysers showing a health bar when targeted
* GoodScrapPosition and GoodMinePosition take a region parameter
- Updated RecycleTask (Scavenger AI) and MineLayerProcess accordingly
- This lets them take region pathability into account
* Don't place scrap pieces in bad locations
- ScrapField uses a non-region variant of GoodScrapPosition
* Try to make player-controlled APCs less exploitable
- Only deploy when within 75m of a (potential) target
* Moved path spawn functionality into a shared PathSpawn class
- Replaces separate copies in Inst03Mission and MultDMMission 
- Added to Inst04XMission and MultSTMission
- Fixed a few issues with it

1.5.2.5 (2013-03-14)
* ParameterDB no longer tries to resize its string pool
- Its string pointers would become invalid if the pool moved
- This fixes crashes when run outside the debugger
* Added more ScriptUtils functions from BZ2
- GetPerceivedTeam
- SetTarget, GetTarget
- SetOwner, GetOwner
- SetPilotClass

1.5.2.4 (2013-03-13)
* PathDisplay updates
- Show strategic AI goals and priorities for the build team if not default
- Label resources as Team 1 and Team 2 instead of American and Soviet
- Fixed build ODF teams beyond 2 appearing black
* Use aiName2 for any non-player team, not just team 2
- This makes AI team production units go to geysers autonomously
* ParameterDB supports ODF sections like the BZ2 version
- Prefer the label in the requested section
- Look in other sections if it is not found
- BZ1 ODF sections aren't always named correctly...
- Debug build reports misplaced labels
* Use GlobalSetLocal for objects not belonging to a player
- This fixes AI-controlled teams using the host's name and flag
- This should also make them survive a host migration
* ParameterDB uses reference-counted shared data internally
- Reduces redundant allocation, parsing, and freeing
- Improves load performance
* Added int and bool ParameterDB::Get functions
* Fixed section validation for labels with no section
* Ported some GetODF functions from BZ2
- OpenODF
- GetODFBool
- GetODFInt
- GetODFFloat
- GetODFString
* Don't run strategic AI on client machines
* Don't set up Lua if there's no Lua script
* Fixed Instant Action save games

1.5.2.3 (2013-03-08)
* LuaMission updates
- Call Setup from the constructor so it gets done in LoadDefaultMission too
- Fixed the Lua script asset not getting unlocked when it failed to load or run
- Made the absence of a Lua script a trace message instead of a dialog warning
- Load but discard any saved Lua values when the script has no Load function
* Removed LuaMission::PostLoad since it was useless
- Mission PostLoad functions only do handle conversion
- Most script functionality didn't work when called from PostLoad
* Re-parented Inst04XMission, MultDMMission, and MultSTMission from AiMission to LuaMission
- These are the three mission scripts that user-created maps are likely to use
- They can now run Lua scripts in addition to their normal fixed-function logic
- MP-related Init and Respawn functions have no Lua script hooks (yet)
* Added .odf and .lua to the misson extensions that crc32mission checks
* Display the Zoom Factor in the Editor (submitted by Dx)
* Strategic AI update
- Replaced 32m "scheduler tiles" with standard 10m terrain grid
- Manages the Construction Rig as an infinitely-reusable construction crew
- Can build buildings in semi-reasonable locations
- Doesn't know about power requirements yet :(
- Continuously updates team base position
* Added all-in-one CMD_BUILD to Construction Rig
- This makes it easier for the strategic AI to control
* Path Display (shift-F9) shows AI goals as colored borders
- No goal: none
- Defend base: bright green
- Attack troops: dark red
- Siege: bright red
- Exploration: blue
- Scripted (scrap): white
- Perimeter: dark green
- Recon: cyan
- Resource: white
- Other: black
- Escort: dark grey
* More ScriptUtility functions
- GetCurrentWho
- HopOut
- KillPilot
- RemovePilot
- HoppedOutOf
- IsNetGame
- IsHosting

1.5.2.2 (2013-03-02): emergency hotfix...
* Fixed AISchedule stuff crashing on starup in multiplayer
* Fixed incompatibility with older save games
* Howitzers check the flight path of their projectile

1.5.2.1 (2013-02-28): 15th Anniversary Build!
* Misn09Mission: made turret setup around the CCA base reliable (submitted by Dx)
* Changed the horrible STRUCTURE2 audio to something better (submitted by Dx)
* Return focus back to the MapList for host selection (submitted by Dx)
* Updated Save/Load Shell (submitted by Dx)
- Requires new "saveload.bmp"
* Updated Pop Up Shell window buttons (submitted by Dx)
- Enabled WM_MOUSEMOVE
* NameDlgProc InvalidateRect IDC_EDIT_NAME (submitted by Dx)
* SaveDlgProc InvalidateRect IDC_EDIT_GAMEDESC (submitted by Dx)
* Made the selected paths a bit easier to read in the editor. (submitted by Dx)
* Improved game object selection
- Uses the larger of bounding radius and collision radius
- These correspond to the circles drawn around objects
- Picks the object closest to the cursor
* Enhanced Edit Object mode
- Show labels above objects that appear as an oriented box with circles
- Highlight the object under the mouse cursor (rollover)
- Reduced unintentional movement when clicking game objects
- Use the point clicked on the game object as a "handle" when moving it
* Enhanced Edit Path mode
- Show the path label over the first node (also with Show Paths)
- Reduced unintentional movement when clicking path nodes
- Use the point clicked on the path node as a "handle" when moving it
* Support getting team players
- Assign remote players to TEAM_SLOT_PLAYER
- Added GetPlayerHandle variant that takes a team
* Back-ported some ScriptUtils from BZ2
- Set object team number
- Modify and query team alliances
- Get and set current health
- Get and set maximum health
- Get and set current ammo
- Get and set maximum ammo
- Add ammo
* Fixed up some scripting weirdness with Misn08Mission
- AddObject was assigning objects to the wrong handles
* Updated ScriptUtil
- Use TeamNum typedef more consistently for team numbers
- Most functions taking a path name also take an optional point index
- Added path variants of GetNearestObject, GetNearestBuilding, and GetNearestEnemy
* Preliminary implementation of LuaMission
- AiMission framework for user-created mission scripts
- Matches any mission file starting with "lua"
- Reads the .lua script named after the mission (e.g. luatest.bzn reads luatest.lua)
- Supported script functions: Load, PostLoad, Save, AddObject, Update
- This has not been thoroughly tested yet...
* Revised LuaMission
- Fixed problems with Handle lightuserdata
- Now works with a real .lua mission script
* Added more ScriptUtils functions from BZ2
- GetWhoShotMe
- GetLastEnemyShot
- GetLastFriendShot
* Added LuaCheckStatus to consolidate error reporting
* Added basic Lua serialization and deserialization
- Supports nil, boolean, lightuserdata (handles), string, and table
- Does not preserve complex reference structures like lua-marshal
* More LuaMission tweaks
- Only call script Save and Load for save games
- Added some comments to code
- Debug build enables Lua os and io libraries
* LuaMission displays a message when it can't find a Lua script
* Switched to Lua 5.1.5
- Lua 5.1 has better tool support than 5.2
* Spiffied up PathDisplay (Shift-F9 view)
- Made it easier to click on small objects
- Show menu item keys with sprites instead of [text]
- Show item keys only for currently-selectable items
- Show menu selection state using color
- Use translucent backgrounds for unselected labels
* More PathDisplay tweaks
- Hold right mouse button to rotate the selected object
. It turns to face the mouse position
. This was actually in the previous commit...
- Placing a game object makes it the selected object
. This makes it easy to rotate
* LuaMission matches any mission with a corresponding .lua script
- For example, it matches misn02l.bzn if misn02l.lua exists
- This only applies when creating the mission in the first place
- CAVEAT: it uses the msn_filename value (like Inst04XMission)
* Improved DistributedObject bandwidth throttling
- Take reliable packets into account
- Take UDP packet header overhead (40 bytes) into account
* SetAIP takes a team number argument
- It defaults to 2 for backwards compatibility
* AIPs can control any team, not just team 2
- This has not been thoroughly tested yet...
- Controlling a player team will have unknown effects
* Fixed LuaMission::Save dropping the last data value
* Added more ScriptUtils functions from BZ2
- GiveWeapon
- IsDeployed
- Deploy
- IsSelected
* Made HasCargo safe to use with non-Tug units
- Returns false in that case
* Improved how LuaMission gets and pushes Handle values
- Push nil for a zero handle so Lua logic can test for it
