Spring Engine 104

Annunciata la release 104 di SPRING ENGINE RTS scaricabile dal sito ufficiale.

Qui di seguito il changelog (in inglese) della nuova release:

— 104.0 ——————————————————–
– Add LuaMenu – an unsynced stripped down Lua environment that starts before the game is loaded and persists through reload
this environment receives the Draw{Genesis,Screen,ScreenPost} callins as well as
a special AllowDraw FPS limiter which enables these if true is returned from it
(otherwise they are called once every 30 seconds)
! make GL3.0 the minimum required OpenGL version; Intel G45’s and other relics are now banned
(any driver that claims support for this *and* shaders is allowed to run Spring unimpeded)
– improve memory management so Spring.Reload can be safely called multiple times in a row
– kill various desyncs that slipped into 103.0

– Assorted bugfixes and optimisations
– force regeneration of ArchiveCache
– Implement VFS modes – VFS.MOD, VFS.MAP & VFS.BASE now actually work. Added VFS.MENU
! base archives now have modtype of 4 and menu archive have modtype of 5
! one letter command-line flags (e.g. -g instead of –game) are removed
– generally more detailed error-logging
– continued internal cleanup and C++11 adoption to reduce unnecessary data copying and allocing
– don’t load-then-immediately-free the LuaGaia handler if neither (synced or unsynced) entrypoint exists
– don’t record non-essential profile data in the background if not in /debug mode; reset profiler on reload
– replace dozens of STL containers with faster custom alternatives
– use pooled memory allocations in several engine components
– make Use{V,P}BO=0 reuse buffers when downsized
– recycle audio-stream buffer memory
– recycle demo-streams across reloads
– write demos before destroying game on shutdown in case the latter CTD’s
– do not spawn VFS initialization threads if WorkerThreadCount=0
– rebase ThreadPool on a lock-free taskqueue; make IO-bound work unable to block execution of other tasks
– reduce ThreadPool worker-count right after VFS initialization
– asyncify writing screenshots via ThreadPool
– asyncify demo/savegame compression
– disable hang-detection when showing a message box
– defer loading *Def sounds until simulation asks for them
– use pcall in LuaUtils::Echo
– catch all exceptions in Game::Load and make it non-interruptable
– turn LoadDefs content_error exceptions into clean exits
– set modType to an integer (not string) value in base-content modinfo.lua’s
– do not auto-add springcontent dependency to non-game “mod” archives
– downgrade non-writeable springsettings.cfg’s to a warning
– allow maps to not supply a type-map; one fewer exception to worry about
– improve RNG statistical quality; sampled ints can now also exceed 0x7fff
– make the *nix CrashHandler compile on ARM; do not use cpuid on non-x86 builds
– enable compilation without streflop
– change ForceShaders to ForceDisableShaders (which does the opposite)
– add UseLuaMemPools config-option
– add ForceCoreContext config-option
– add ForceSwapBuffers config-option
– add ForceDisableClipCtrl config-option
– add NETMSG_LOGMSG for synced logging
– netlog Lua memory allocation failures
– netlog model parsing failures
– netlog SHA512 digests over cached path-estimator data
– enforce a minimum of 1GB free disk-space (to prevent cache corruption)
– log ‘Warning: Dropping packet from unknown IP’ only once per IP
– filter out consecutive duplicated log-messages; add LogRepeatLimit config-option
– fix inverted los-test logic in AI GetProperty callback (patch by rlcevg)
– fix memleak in generated C++ AI interface (patch by rlcevg)
– fix ResourceHandler memleak (patch by rlcevg)
– save SkirmishAI data in separate streams (patch by rlcevg)
– wrecks in water emit bubbles instead of smoke (patch by Sprunk)
– store path-estimator cache files as map.pe-hash.zip; forces a refresh
– delete cached path-estimator data which can not be opened or read successfully
– integrate custom selection volumes; also support subtable-based {col,sel}volume definitions
– refactor the object death-dependency system
– trim unused AssParser root-piece transform overrides;
‘rotAxisSigns’ and ‘rotAxisMap’ from 95.0 are also gone
– rip out DynamicSun
much more convincing day / night cycles can be completely and more cleanly
(re-)implemented in Lua with Spring.SetSunLighting, Spring.SetSunDirection,
and Spring.SetAtmosphere

! Sonar will now detect ships/hovers – this is since los can’t raycast through water.
note that wobble still exists without LoS.
– add ‘collideFireBase’ weapondef flag
– allow manually sharing nano-frames (patch by Sprunk)
– share unfinished buildees if factory changes team (patch by Sprunk)
– prevent building from dead factories (patch by CommanderSpice)
– restore randomized circling behavior for air-constructors (patch by CommanderSpice)
– UnitExperience is called based on regular exp difference, not limExp (patch by Sprunk)
– set defBaseRadarErrorMult back to 2 instead of 20 (patch by Sprunk)
– expand CEG underground-test lenience from 1 to 20 elmos (patch by Sprunk)
– allow but do not enable staggered LOS updates
– do not hard-assign floatOnWater=true for hovers and ships
checks for this property now first query a unit’s MoveDef
(if any) so that ship->tank and similar substitutions via
MoveCtrl.SetMoveDef behave as expected
– disable randomized hovering during CMD_LOAD_UNITS for air-transports
– make Spring.CreateUnit smarter (patch by Sprunk)
if a builderID parameter is passed to Spring.CreateUnit, the new unit
will consider that its solo-builder if it has canBeAssisted=false set
– EMGCannon now obeys flightTime override (patch by Sprunk)
– allow setting runtime/initial firestate to 3 [FIREATNEUTRAL] from COB and unitdefs (patch by Sprunk)
– change a weapon reaiming-tolerance constant from 20 radians to 20 degrees (patch by Sprunk)
– experiment with larger medium-resolution PFS blocksize (16*SQUARE_SIZE vs 8*SQUARE_SIZE)
– bump the default unloadSpread multiplier from 1 to 5
– incorporate native “raw move” (straight-line path) support
inert by default; enable by adding allowRawMovement = true
to a MoveDef table

! Undeprecate {unit,feature}def.modelname and add .modeltype and .modelpath to
allow reading these without loading the model. Removed def.model.{name,type,path}
so they aren’t used accidentally.
! The callins GameStart and GamePreload won’t be called when a saved game is loaded
– Add VFS.AbortDownload(id) – returns whether the download was found&removed from the queue
– Add Spring.Get{Game,Menu}Name to LuaUnsyncedRead, so LuaMenu and unsynced Lua handles know about each other
– Add new callins (LuaMenu only):
ActivateMenu() that is called whenever LuaMenu is on with no game loaded.
ActivateGame() that is called whenever LuaMenu is on with a game loaded.
AllowDraw() if it returns false, the next draw call is skipped (only active when a game isn’t running)
– Add Spring.{Set,Get}VideoCapturingMode() – this doesn’t actually record the game in any way,
it just regulates the framerate and interpolations.
– add Engine and Platform global tables currently containing the following keys:
Engine.version: string
Engine.versionFull: string
Engine.versionPatchSet: string
Engine.buildFlags: string
Engine.wordSize: number

Platform.gpu: string, full GPU device name
Platform.gpuVendor: string, one of “Nvidia”, “Intel”, “ATI”, “Mesa”, “Unknown”
Platform.gpuMemorySize: number, size of total GPU memory in MBs; only available for “Nvidia”, (rest are 0)
Platform.glVersionShort: string, major.minor.buildNumber
Platform.glslVersionShort: string, major.minor
Platform.glVersion: string, full version
Platform.glVendor: string
Platform.glRenderer: string
Platform.glslVersion: string, full version
Platform.glewVersion: string
Platform.sdlVersionCompiledMajor: number
Platform.sdlVersionCompiledMinor: number
Platform.sdlVersionCompiledPatch: number
Platform.sdlVersionLinkedMajor: number
Platform.sdlVersionLinkedMinor: number
Platform.sdlVersionLinkedPatch: number
Platform.glSupportNonPowerOfTwoTex: boolean
Platform.glSupportTextureQueryLOD: boolean
Platform.glSupport24bitDepthBuffer: boolean
Platform.glSupportRestartPrimitive: boolean
Platform.glSupportClipSpaceControl: boolean
Platform.glSupportFragDepthLayout: boolean
Platform.osName: string, full name of the OS
Platform.osFamily: string, one of “Windows”, “Linux”, “MacOSX”, “FreeBSD”, “Unknown”
! Game.{version,versionFull,versionPatchSet,buildFlags} now reside in the Engine table
Engine.wordSize indicates the build type and is either 32 or 64 (or 0 in synced code)
– Spring.SetWaterParams() can now be used without /cheat for modifying unsynced values.
– Implemented gl.GetWaterRendering() to expose access to water rendering variables.
! Removed water rendering parameters from LuaConstGame, as they’re no longer const.
– Added Spring.SetMapRenderingParams() for modifying splatTexMults, splatTexScales, voidWater and voidGround.
– Implemented gl.GetMapRendering() to expose access to the map rendering variables.
! Removed voidWater and voidGround constant parameters from LuaConstGame, as they’re no longer const.
– add Spring.{Set,Get}{Unit,Feature}SelectionVolumeData callouts
! remove Spring.SetSunParameters and Spring.SetSunManualControl
! remove gl.Smoothing
– add gl.SwapBuffers callout for LuaMenu
– add Game.envDamageTypes table containing {def}IDs of environmental-damage sources (patch by Sprunk)
– add Spring.{Get,Set}ConfigFloat callouts
– add Spring.{Set,Get}{Unit,Feature}SelectionVolumeData callouts
– add Spring.SpawnExplosion callout
– add Spring.SpawnSFX callout
equal to the *UnitScript versions of EmitSFX, but
takes position and direction arguments (in either
unit- or piece-space) instead of a piece index
– add DrawScreenPost callin (patch by ivand/lhog)
Similar to DrawScreenEffects, this can be used to alter the contents of a
frame after it has been completely rendered (i.e. World, MiniMap, Menu, UI).
– add DrawWorldPreParticles callin
– add start- and hit-position (x,y,z) arguments to ShieldPreDamaged callin
– math.random is now available during execution of defs.lua
(math.randomseed also exists, but will always be a no-op)
– allow gl.BlitFBO blitting from/to the default FB with userdata FBO’s
– bump gl.UniformArray length restriction from 32 to 1024
– add Spring.SetFeatureResources(number metal, number energy [, number reclaimTime [, number reclaimLeft]])
– add Spring.SetUnitPieceMatrix(number unitID, number pieceNum, table matrix)
sets the local (i.e. parent-relative) matrix of the given piece if any of the
first three elements are non-zero, and also blocks all script animations from
modifying it until {0, 0, 0} is passed
(matrix should be an array of 16 floats, but is not otherwise sanity-checked)
– add LUS ChangeHeading callin
– add LUS {Start,Stop}Skidding callins; called when a (ground) unit reacts to an impulse
make the start-skidding threshold (‘sqSkidSpeedMult’) configurable via MoveCtrl.SetGroundMoveTypeData
– make MoveCtrl.Set*MoveTypeData recognize the ‘waterline’ key (patch by SanguinarioJoe)
– make Spring.ClearUnitGoal cancel raw movement by default
! reorder AllowStartPosition callin parameters and add teamID
old: clampedX, clampedY, clampedZ, playerID, readyState, rawX, rawY, rawZ
new: playerID, teamID, readyState, clampedX, clampedY, clampedZ, rawX, rawY, rawZ
– expose weapon salvo vars to {Get,Set}UnitWeaponState (patch by Sprunk)
– extend Spring.SetFeatureResurrect
old API: arg #2 was parsed as unitdef-name if string
new API: arg #2 is parsed as unitdef-name if string OR unitdef-id if number; arg #4 is parsed as resurrect-progress
– make Spring.SetFeatureResurrect ignore nil for its second arg and allow unsetting the resurrect-target if id=-1
! extend Spring.GetUnitWeaponHaveFreeLineOfFire to take aiming-from coors
old API: Spring.GetUnitWeaponHaveFreeLineOfFire(unitID, weaponNum, targetID | [ tgtPosX [, tgtPosY [, tgtPosZ ]]]])
new API: Spring.GetUnitWeaponHaveFreeLineOfFire(unitID, weaponNum, targetID | [srcPosX [, srcPosY [, srcPosZ [, tgtPosX [, tgtPosY [, tgtPosZ]]]]]])
(if the srcPos* arguments are all nil, the default aiming location is used as before)
– block getting NoAccessTeam’s LoS-state (patch by Sprunk)
– block Spring.GetRadarErrorParams for enemy allyteams (patch by Sprunk)
– implement Path.GetPathNodeCosts
– Spring.GetMouseState now returns a sixth value indicating if the cursor is offscreen
– add Spring.GetGrass(x, y) -> 0|1 to obtain grass map information
! exclude spectators from Spring.GetPlayerList if given a normal (id >= 0) team arg

– add new terrain-mesh renderer (faster than existing code, but does not respect cliffs well)
– draw bindpose models non-recursively
– setup alpha-masking for 3DO shadows
– bump ROAM node-pool size for more demanding maps
– limit number of ground-scar decals to 4096
– fix jagged shadows on maps with oblique sun-directions
– fix grass not receiving shadows; unify groundShadowDensity application
– fix grass being rendered black in metal-view
– fix particle shadows
– use clip-control (when possible) to improve depthbuffer precision
– micro-optimize LuaMatBinSet sorting
– make shader-flag handling more lightweight
– do not parse info-textures bound to shaders every single frame
– nuke {point,line}-smoothing options; selected primitive AA is obsolete with multisampling
– outsource vsync regulation to SDL2

– show a splash-screen while initializing VFS; randomly chosen from any
.png or .jpg images found under SplashScreenDir defined in springsettings.cfg
(if SplashScreenDir is a relative path, Spring’s CWD will be prepended)
– Add FPSClampPos config for whether the engine should verify the camera doesn’t hit ground/go too far
this and other FPS camera configs can be changed midgame and will affect the next frame drawn.
– Add OverheadMaxHeightFactor config – a float multiplier for maximum overhead camera height.
– skip the IsAbove test/callin for input-receivers when mouse is offscreen
– show warning if VMware Mesa drivers are installed
– avoid “Invalid thread number 0” errors if window creation fails
– rename the ‘minimised’ CLI flag to ‘hidden’
– prevent window from being considered unresponsive during startup
– make shift+esc drop to LuaMenu from PreGame
! fix window-state restoration
the WindowState config-setting is gone, a maximized
non-fullscreen window now gets restored by checking
if the resolution previously written is maximal (for
minimized windows the state is not saved, as before)
– fix VRAM size detection
– coax more information out of systems that fail OpenGL context-creation
– add fallbacks for common context-creation failures; catch inadequate
desktop video-modes; turn exceptions during {window,context}-creation
into friendlier popups
– remove old warnings about junk GPU drivers that can no longer appear
– downgrade from throwing exception to warning for missing scar-textures
– extend and organize the information shown in /debug
! rename ‘/roam’ to ‘/mapmeshdrawer’ which cycles through the renderers
– add ‘/debugglerrors’ command (enables per-frame glGetError reporting)
– add ‘/debuggl x y z’ command (requires DebugGL=1) where x=source,y=type,z=severity
– add ‘/wire{model,sky,tree,water}’ debug commands
! change default bindings for chatswitch* actions
alt+ctrl+(a,a) now toggles chatswitchally
alt+ctrl+(s,s) now toggles chatswitchspec
chatswitchall now has to be bound manually
– allow area commands to be extended off-map
– fix tracking-mode with Free camera

– fix LuaParser thread-safety
– fix ProfileDrawer thread-safety
– fix ScopedMtTimer thread-safety
– fix LosMap thread-safety
– fix PathTexture thread-safety
– fix RoamMeshDrawer thread-safety
– fix LuaVFSDownload thread-safety during reload
– fix deadlocks in Windows crash-handler
– fix race-condition between screenshot counter and libIL
– fix sound-thread occasionally accessing a deleted pointer on exit
– fix sound-buffer deletion while buffers were still bound to sources
– fix double-free in CBitmap’s move-ctor for DDS images
– fix wrong number of pool-threads being spawned on reload
– fix runaway Text::WrapInPlace string-allocation
– fix FarTextureHandler performance-stalls
– fix potential segfault in SolidObjectDef::GetModelRadius
– fix degenerate GroundFlash quads
– fix ExploSpike projectiles instantly disappearing if they collided with anything on creation
– fix potential gsRNG.Next*() eval-order desync
– fix OOB memory-read in GameSetup::LoadTeams
– fix map-damage explosions being processed twice
– fix explosions causing terraform-spikes on certain maps
– fix UnitDamaged events following UnitDestroyed
– fix BuilderCAI crash when parsing invalid build-commands
– fix canBeAssisted-check in Builder::StartBuild
– fix ATI uniform-type validation for LuaMaterials
– fix ATI driver crash with BumpWater (on any map without a coastline) in TextureAtlas generation
– fix crash in AdvTreeDrawer on ARB-only junkware
– fix crash in InfoTextureHandler on ARB-only junkware
– fix PlayerRoster causing memory corruption on reload
– fix random WaitingDamage memory corruption
– fix Light::ClearDeathDependencies memory corruption
– fix CollisionHander::MouseHit not taking relMidPos translation into account
– fix LosHandler::UnitLoaded removing LOS from non-stunned units
– fix calling alSourcePlay even if alSourceQueueBuffers produced an error
– fix CheckEnlargeDrawArray for VA_TYPE’s larger than 10 floats
– fix crash if unit is assigned an empty COB-script
– fix potential buffer-overflow in GetFeatures AI callback
– do not bitshift negative values (undefined behavior)
– catch invalid CmdDesc indices in GuiHandler::DrawButtons
– insert missing eventHandler.RemoveClient call in RoamMeshDrawer

– fix #5778 (crash when reloading with QTPFS)
– fix #5730 (crash during nano-particle creation by builders under specific circumstances)
– fix #5728 (canBeAssisted=false factories only being buildable by one constructor at a time)
– fix #5721 (structures created via AI orders sometimes not leveling ground)
– fix #5715 (zero-spread weapons avoiding non-target enemies)
– fix #5690 (Spring.GetProjectileTarget returning <0,0,0> for cannons with ground-attack orders)
– fix #5519 (path-estimator failure if start- and goal-coordinates mapped to the same block)
– fix #5684 (Spring.{Add,Remove}Grass updates not taking effect until camera is moved)
– fix #5658 (projectiles applying two position-updates while bounced)
– fix #5630 (free line-of-fire detection failure)
– fix #5287 (help units in firebases with a collideFireBase weapondef flag)
– fix #2970 (“pushResistant” is now accepted by MoveCtrl.SetGroundMoveTypeData)
– fix #3515 (better error-messages for the /team command)
– fix #5200 (broken ctrl+mousewheel tilt transitions with ‘Spring’ camera)
– fix #5258 (custom selection volumes)
– fix #5632 (don’t show just a black screen on startup)
– fix #5629 (make footprint-terraforming respect buildee’s actual facing)
– fix #4447 (FPS-mode locking onto out-of-LOS units)
– fix #4074 (equalize UnitDamaged parameters for LuaUI and LuaRules)
– fix #2855 #5092 #5180 (jagged terrain shadows)
– fix #5619 (area-commands not drawn on minimap)
– fix #5617 (enable non-binary alpha-testing for unit icons)
– fix #5684 (Spring.{Add,Remove}Grass updates not taking effect until camera is moved)
– fix #4164 (shield{Good,Bad}Color are RGBA float4’s now)
– fix #5587 (units in sharp holes sinking underground if also skidding)
– fix #5502 (crash with malformed build-commands)
– fix #4723 (EmitSfx crash when referencing effect not defined in unitdef)
– fix #4940 (“Recompressing Map Tiles with ETC1” load-stage triggering watchdog)
– fix #5403 (extra ShieldPreDamaged parameters)
– fix #5056 (let Spring.GetUnitWeaponHaveFreeLineOfFire take firing location as an argument)
– fix #5188 (units refusing to move if ordered to non-reachable locations from factory)
– fix #5639 (stunned transports not updating the position of their cargo)
– fix #5304 (invisible collada models if no secondary texture provided)
– fix #5318 (.ogg audio streams playing too fast)
– fix #5358 (theoretical desync with std::{strtod,atof})
– fix #5457 (TargetBorder broken for non-box collision volumes)
– fix #5411 (PFS not finding optimal paths on maps with extreme speed-modifiers)
– fix #5501 (PFS ignoring obstacles higher up or lower down cliffs)
– fix #5469 (overflow-FPE in GetHeadingFromVectorF)
– fix #5476 (assertion-failure with broken springcontent installation)
– fix #5434 (add logging to detect unicode-aware libIL)
– fix #5387 (GroundDecalHandler crash on exit)
– fix #5421 (Spring.SendCommands(“ctrlpanel”) crash if sent inside a callin)
– fix #5412 (GameRulesParams persisting through Spring.Reload)
– fix #5493 (crash while reloading with LoadingMT=1)
– fix #5463 (failing to connect to server sends user back to LuaMenu)
– fix #5544 (classified)
– fix #5468 (classified)
– fix #5461 (classified)
– fix #5404 (MoveCtrl.SetGunshipMoveTypeData crash if called for a non-gunship unit)
– fix #5483 (glDeleteList called from multiple threads)
– fix #5423 (random number generation in defs.lua)
– fix #5396 (units lacking sensors on fire-platforms)
– fix #5339 (crash when placing a geothermal)
– fix #5338 (grid-patterns in unsynced heightmap)
– fix #5644 (send BuggerOff notes from opened-but-blocked factories again)
– fix #4745 (broken transport-unloading with non-zero unloadSpread)
– fix #4971 (constructors not assisting if simultaneously given orders to build count-restricted units)
– fix #4481 (check MoveDef maxSlope for units built by mobile constructors)
– fix #4827 (idle gunships jiggling away from their position)
– fix #4232 (gunships snapping to horizontal attitude when ordered to stop after attacking)