Repository navigation
Conversation
Mine() gave its radar_trace min/max size 10, while mines launched from a tube use 32*(0.25+0.25*category_modifier) in missilesystem.cpp, which is 16 for the medium category (modifier 1.0). Use 16 so scripted and player-launched medium mines look the same on radar. Fixes daid#2883 Suggested-by: oznogon (patch in the issue body) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #2883 (closed as filed against an older version). The numbers below are from current master, so I'm opening this in case it is still wanted; feel free to close it if not.
Cause
scripts/api/entity/mine.luagivesMine()aradar_tracewithmin_size=10, max_size=10. Mines launched from a tube get32 * (0.25 + 0.25 * category_modifier)insrc/systems/missilesystem.cpp. For the medium categorycategory_modifieris 1.0 (MissileWeaponData::convertSizeToCategoryModifier), so 16. Player-launched medium mines therefore have a larger blip than scripted ones.Change
One line:
min_size/max_size10 -> 16 inmine.lua. The change was suggested by oznogon in the issue body (credited in the commit message).Checks run
Lua 5.4 syntax parse of
scripts/**.lua(the engine's own Lua): 0 failed.Grep: no other place in
scripts/,src/or docs hard-codes 10 for the mine trace (scanprobe.lua and probe.cpp use 10 for probes, unrelated).Built the branch (MSVC RelWithDebInfo; rebuilt after rebasing onto current master 2026-11-13). Headless scenario: Atlantis, 5 medium tubes, fired mines, then read
radar_traceof every mine entity. Before the change:Mine()min/max 10, launched medium 16. After: both 16.Not tested
Mine()(e.g.scenario_00_basic.lua) were not run.Possible conflict
Open PR #2737 (oznogon, "Create, tweak missiles using scripts or GM screen") also touches
mine.lua; it refactors it without changing the size, so a trivial merge conflict on that line is possible.🤖 Generated with Claude Code