2020-02-22 14:20 CET

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0005102Spring engineGeneralpublic2016-02-24 11:08
Assigned Tohokomoko 
Product Version100.0+git 
Target VersionFixed in Version 
Summary0005102: wreckages after self-d - strange behaviour
DescriptionAfter self-d wreckages are not destroyed. Also when you blow a commander - blow don't destroy wreckages too.

for latest dev spring version (2f89d03): https://youtu.be/wpN7-5NEvNA

if I compile spring version: e365726 (6 days ago) - then all OK:

probably this commit introduced this: https://github.com/spring/spring/commit/4785bdcc9298b564d20e22c918889f57ee8748fc

If this change is intended - please give a hint to game devs: how to keep old behaviour
Steps To Reproduceself-d units
Additional InformationBalanced Annihilation test-4892
(I guess BA 9.34 is suitable too)
TagsNo tags attached.
Checked infolog.txt for Errors
Attached Files
  • txt file icon infolog.txt (7,562 bytes) 2016-02-22 12:38 -
    [ParseCmdLine] command-line args: "./spring"
    Using configuration source: "/home/revenant/projects/spring100/springsettings.cfg"
    Using additional configuration source: "/home/revenant/.config/spring/springsettings.cfg"
    Using additional configuration source: "/home/revenant/.spring/springsettings.cfg"
    ============== <User Config> ==============
    AdvSky = 1
    BumpWaterBlurReflection = 1
    BumpWaterDepthBits = 16
    BumpWaterReflection = 0
    BumpWaterRefraction = 0
    BumpWaterShoreWaves = 0
    BumpWaterTexSizeReflection = 128
    CamMode = 5
    CamTimeExponent = 4.0
    CamTimeFactor = 1.0
    CompressTextures = 1
    DualScreenMiniMapOnLeft = 1
    FPSFOV = 90
    FPSScrollSpeed = 34
    FSAALevel = 4
    Fullscreen = 0
    GrassDetail = 30
    GroundDecals = 5
    GroundDetail = 196
    GroundScarAlphaFade = 1
    HangTimeout = 0
    HardwareCursor = 1
    HighResLos = 1
    InitialNetworkTimeout = 0
    InputTextGeo = 0.26 0.73 0.02 0.028
    LODScale = 1.000
    LODScaleReflection = 1.000
    LODScaleRefraction = 1.000
    LODScaleShadow = 1.000
    LastSelectedMap = DeltaSiege
    LastSelectedMod = Balanced Annihilation test-4892
    LastSelectedScript = Player Only: Testing Sandbox
    LastSelectedSetting = DebugGL
    MaxDynamicMapLights = 4
    MaxDynamicModelLights = 4
    MaxNanoParticles = 20000
    MaxParticles = 20000
    MaxSounds = 32
    MaximumTransmissionUnit = 0
    MiddleClickScrollSpeed = -0.005
    MouseDragScrollThreshold = 0
    OverheadScrollSpeed = 39
    ReconnectTimeout = 0
    ReflectiveWater = 4
    RotOverheadScrollSpeed = 39
    ScreenshotCounter = 31
    ScrollWheelSpeed = 30
    ShadowMapSize = 6144
    Shadows = 1
    ShowClock = 0
    ShowFPS = 1
    ShowPlayerInfo = 0
    SmoothLines = 1
    SmoothPoints = 1
    SpringData = /home/revenant/projects/spring100:/home/revenant/projects/spring100/cont
    TreeRadius = 3000
    UnitIconDist = 221
    UnitLodDist = 600
    UsePBO = 0
    VSync = 1
    WindowBorderless = 1
    WindowPosX = 640
    WindowPosY = 381
    XResolution = 2560
    XResolutionWindowed = 1920
    YResolution = 1440
    YResolutionWindowed = 1022
    snd_volmaster = 100
    ============== </User Config> ==============
    Available log sections: SkyBox, UnitScript, Font, LuaSocket, Net, KeyBindings, CSMFGroundTextures, CregSerializer, RoamMeshDrawer, GameServer, BumpWater, DynWater, OBJParser, ArchiveScanner, ModelRenderContainer, CrashHandler, FarTextureHandler, Shader, Model, Path, Texture, GroundMoveType, Piece, AutohostInterface, Sound, VFS, DecalsDrawerGL4
    Enabled log sections: Sound(Notice)
    Enable or disable log sections using the LogSections configuration key
      or the SPRING_LOG_SECTIONS environment variable (both comma separated).
      Use "none" to disable the default log sections.
    LogOutput initialized.
    Spring 100.0.1-1200-g46f039d develop
    Build Environment: boost-105800, GNU libstdc++ version 20151207
    Compiler Version:  gcc-5.3.1 20151207 (Red Hat 5.3.1-2)
    Operating System:  Linux 4.3.5-300.fc23.x86_64 #1 SMP Mon Feb 1 03:18:41 UTC 2016 x86_64
    Word Size:         64-bit (native mode)
             CPU Clock: std::chrono::high_resolution_clock
    Physical CPU Cores: 4
     Logical CPU Cores: 8
    [CMyMath::Init] CPU SSE mask: 127, flags:
    	SSE 1.0:  1,  SSE 2.0:  1
    	SSE 3.0:  1, SSSE 3.0:  1
    	SSE 4.1:  1,  SSE 4.2:  1
    	SSE 4.0A: 0,  SSE 5.0A: 0
    	using streflop SSE FP-math mode, CPU supports SSE instructions
    Supported Video modes on Display 1 x:0 y:0 1680x1050:
    	640x480, 800x600, 1024x768, 1280x800, 1152x864, 1280x1024, 1680x1050, 1920x1080, 1600x1200, 1920x1200, 2560x1440
    SDL version:  linked 2.0.3; compiled 2.0.3
    GL version:   4.5.0 NVIDIA 358.16
    GL vendor:    NVIDIA Corporation
    GL renderer:  GeForce GTX 670/PCIe/SSE2
    GLSL version: 4.50 NVIDIA
    GLEW version: 1.10.0
    Video RAM:    total 2048MB, available 1670MB
    SwapInterval: 1
    FBO::maxSamples: 32
    GL info:
    	haveARB: 1, haveGLSL: 1, ATI hacks: 0
    	FBO support: 1, NPOT-texture support: 1, 24bit Z-buffer support: 1
    	maximum texture size: 16384, compress MIP-map textures: 1
    	maximum SmoothPointSize: 190, maximum vec4 varying/attributes: 31/16
    	maximum drawbuffers: 8, maximum recommended indices/vertices: 1048576/1048576
    	number of UniformBufferBindings: 84 (64kB)
    Using Adaptive VSync
    [InitOpenGL] video mode set to 1920x1022:24bit @60Hz (windowed)
    [WatchDog::Install] disabled
    [WatchDog] registering controls for thread [main]
    [ThreadPool::SetThreadCount][1] #wanted=4 #current=1 #max=4
    [ThreadPool::SetThreadCount][2] #threads=3
    [DataDirs] Portable Mode!
    Using read-write data directory: /home/revenant/projects/spring100/
    Using read-only data directory: /home/revenant/.config/spring/
    Using read-only data directory: /home/revenant/.spring/
    Using read-only data directory: /home/revenant/projects/spring100/cont/
    Scanning: /home/revenant/projects/spring100/cont/base
    Scanning: /home/revenant/.spring/maps
    Scanning: /home/revenant/.spring/games
    Scanning: /home/revenant/.spring/packages
    Scanning: /home/revenant/projects/spring100/base
    Error: Found a "/home/revenant/.spring/maps/emain_macha.sd7" already in "/home/revenant/.spring/maps/Emain_Macha.sd7", ignoring.
    [f=-000001] [Sound] OpenAL info:
    [f=-000001] [Sound]   Available Devices:
    [f=-000001] [Sound]               Built-in Audio Analog Surround 5.0
    [f=-000001] [Sound]               GK104 HDMI Audio Controller Digital Stereo (HDMI)
    [f=-000001] [Sound]               CM8888 [Oxygen Express] (HDA Controller) Analog Stereo
    [f=-000001] [Sound]               Yeti Stereo Microphone Analog Stereo
    [f=-000001] [Sound]   Device:     OpenAL Soft
    [f=-000001] [Sound]   Vendor:         OpenAL Community
    [f=-000001] [Sound]   Version:        1.1 ALSOFT 1.17.1
    [f=-000001] [Sound]   Renderer:       OpenAL Soft
    [f=-000001] [Sound]   AL Extensions:  AL_EXT_ALAW AL_EXT_BFORMAT AL_EXT_DOUBLE AL_EXT_EXPONENT_DISTANCE AL_EXT_FLOAT32 AL_EXT_IMA4 AL_EXT_LINEAR_DISTANCE AL_EXT_MCFORMATS AL_EXT_MULAW AL_EXT_MULAW_BFORMAT AL_EXT_MULAW_MCFORMATS AL_EXT_OFFSET AL_EXT_source_distance_model AL_LOKI_quadriphonic AL_SOFT_block_alignment AL_SOFT_buffer_samples AL_SOFT_buffer_sub_data AL_SOFT_deferred_updates AL_SOFT_direct_channels AL_SOFT_loop_points AL_SOFT_MSADPCM AL_SOFT_source_latency AL_SOFT_source_length
    [f=-000001] [Sound]   ALC Extensions: ALC_ENUMERATE_ALL_EXT ALC_ENUMERATION_EXT ALC_EXT_CAPTURE ALC_EXT_DEDICATED ALC_EXT_disconnect ALC_EXT_EFX ALC_EXT_thread_local_context ALC_SOFTX_device_clock ALC_SOFT_HRTF ALC_SOFT_loopback ALC_SOFT_pause_device
    [f=-000001] [Sound]   EFX Enabled: yes
    [f=-000001] [Sound]   Max Sounds: 32
    [f=-000001] [WatchDog] registering controls for thread [audio]
    [f=-000001] Joysticks found: 0
    [f=-000001] [ThreadPool::SetThreadCount][1] #wanted=3 #current=4 #max=4
    [f=-000001] [ThreadPool::SetThreadCount][2] #threads=2
    [f=-000001] [Threading] Main thread CPU affinity mask set: 252
    [f=-000001] Warning: AI Interface property 'supportsLookup' could not be found.
    [f=-000001] [InitOpenGL] video mode set to 1680x1023:24bit @59Hz (windowed)
    [f=-000001] [InitOpenGL] video mode set to 1680x1023:24bit @59Hz (windowed)
    [f=-000001] [SpringApp::ShutDown][1]
    [f=-000001] [ThreadPool::SetThreadCount][1] #wanted=0 #current=3 #max=4
    [f=-000001] [ThreadPool::SetThreadCount][2] #threads=0
    [f=-000001] [SpringApp::ShutDown][2]
    [f=-000001] [SpringApp::ShutDown][3]
    [f=-000001] [SpringApp::ShutDown][4]
    [f=-000001] [WatchDog] deregistering controls for thread [audio]
    [f=-000001] [SpringApp::ShutDown][5]
    [f=-000001] [SpringApp::ShutDown][6]
    [f=-000001] [SpringApp::ShutDown][7]
    [LuaSocket] Dumping luasocket rules:
    [LuaSocket] TCP_CONNECT ALLOW * -1
    [LuaSocket] TCP_LISTEN  ALLOW * -1
    [LuaSocket] UDP_LISTEN  ALLOW * -1
    [WatchDog] deregistering controls for thread [main]
    [WatchDog::Uninstall][1] hangDetectorThread=(nil)
    [SpringApp::Run] exitCode=0
    txt file icon infolog.txt (7,562 bytes) 2016-02-22 12:38 +




Kloot (developer)

see changelog: the return value of Killed is now used to determine wreck level.

in http://imolarpg.dyndns.org/trac/balatest/browser/trunk/scripts/armmex.bos there are three "return (0)"'s, which means all those cases will leave the default wreck. what you want is to return the value of corpsetype.


jamerlan (reporter)

why it was changed?

the documentation said that second parameter is used for corpse type:

Killed(severity, corpsetype) ....
Corpsetype basically indicates the number of times the unit and its corpses are destroyed; for example, corpsetype = 3 acts as if the unit is destroyed, the corpse is destroyed, and the corpse's corpse is destroyed. If it runs out of corpses nothing is left behind. Set corpsetype to the desired value.

so for armmex - corpsetype was used correctly.

Looks like this change will force game devs to change all unit scripts => a lot of work


Kloot (developer)

Last edited: 2016-02-22 15:05

View 2 revisions

because 1) the assign-to-corpsetype way is inherited from OTA and 2) doesn't work when the Killed function contains sleep commands (== takes more than one tick to finish): it was already necessary to use return statements in that case. a single method is more consistent, less confusing, and cleaner.


jamerlan (reporter)

let's estimate amount of work required:
~ 234 scripts for BA and around 700+ scripts for techa

are you sure that this change is required?


jamerlan (reporter)

Beherith will probably save us with magic script


Kloot (developer)

"are you sure that this change is required?"

Is any change ever required? ;)

You obviously shouldn't do it by hand, but write a script that replaces each instance of "return *" in all Killed's by "return corpsetype". Let me know if you need help with that.


Jools (reporter)

I though we had a feature freeze this close to release, this is a thing that affects a lot of unit scripts, I think in XTA we have about 750, as well, of which the bos versions of some have become lost.

Even if done by a script, some 750 scripts still need to be compiled. I haven't looked if the "return (0)" is unique to the killed part, but even if it is, you usually should check before doing a mass replace anyway. Is there not a better way to solve 0004085 with?


silentwings (reporter)

You could pm behe and ask to borrow his script.


hokomoko (developer)


This fixes the cob files directly, fixing the bos files should be easier to implement

tell me if you encounter any issues.


jamerlan (reporter)

is it possible to print which script creates errors like that?
[f=0035629] Error: CobError: Unknown get constant 0 (params = 0 0 0 0)


hokomoko (developer)

is this relevant to the current issue or just a general feature request?


jamerlan (reporter)

in scope of fixing current issue we changed MANY scripts (400+) and during test games - we had this error spam in console. I will try to investigate which unit gives this..

but if this info is available in context of error message - then engine could help to game devs by printing unit name

-Issue History
Date Modified Username Field Change
2016-02-22 12:38 jamerlan New Issue
2016-02-22 12:38 jamerlan File Added: infolog.txt
2016-02-22 12:53 Kloot Note Added: 0015841
2016-02-22 14:47 jamerlan Note Added: 0015842
2016-02-22 15:03 Kloot Note Added: 0015843
2016-02-22 15:05 Kloot Note Edited: 0015843 View Revisions
2016-02-22 15:55 jamerlan Note Added: 0015844
2016-02-22 16:24 jamerlan Note Added: 0015845
2016-02-22 16:31 Kloot Note Added: 0015846
2016-02-22 21:51 Jools Note Added: 0015853
2016-02-22 22:06 silentwings Note Added: 0015854
2016-02-23 12:37 hokomoko Note Added: 0015855
2016-02-23 12:38 hokomoko Assigned To => hokomoko
2016-02-23 12:38 hokomoko Status new => feedback
2016-02-23 20:31 jamerlan Note Added: 0015862
2016-02-23 20:31 jamerlan Status feedback => assigned
2016-02-23 21:16 hokomoko Note Added: 0015863
2016-02-24 09:45 jamerlan Note Added: 0015876
2016-02-24 11:08 hokomoko Changeset attached => spring develop 48bbcd79
2016-02-24 11:08 hokomoko Changeset attached => spring develop a5cd4ba0
2016-02-24 11:08 hokomoko Status assigned => resolved
2016-02-24 11:08 hokomoko Resolution open => fixed
+Issue History