2025-07-27 23:53 CEST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0003860Spring engineLuapublic2013-06-22 20:05
ReporterKingRaptor 
Assigned TojK 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
Product Version94.1.1+git 
Target VersionFixed in Version 
Summary0003860: Spring.GetUnitNearestEnemy can return neutral units
DescriptionSpring.GetUnitNearestEnemy will return units from an opposing allyTeam (including gaia), even if Spring.SetUnitNeutral has been called on that unit.

There should be an option to make GetUnitNearestEnemy not do this.
TagsNo tags attached.
Checked infolog.txt for Errors
Attached Files

-Relationships
+Relationships

-Notes

~0010901

IthoughtWeBannedHim (reporter)

Could you post the code snippet you were using? Particullarly Line Of Sight or not Line of Sight?

~0010902

IthoughtWeBannedHim (reporter)

[19:23:59] <KingRaptor> wasn't using los tag no
[19:24:03] <KingRaptor> tested units had LoS on each other

~0010903

KingRaptor (reporter)

Last edited: 2013-06-22 19:39

View 2 revisions

In case you still need it:
function gadget:UnitFinished(unitID, unitDefID, unitTeam)
    Spring.SetUnitNeutral(unitID, true)
    local enemy = Spring.GetUnitNearestEnemy(unitID, 1000)
    Spring.Echo("bla", enemy)
end

tested with /give armpw 1 near my spawned commander

+Notes

-Issue History
Date Modified Username Field Change
2013-06-22 08:58 KingRaptor New Issue
2013-06-22 19:04 IthoughtWeBannedHim Note Added: 0010901
2013-06-22 19:29 IthoughtWeBannedHim Note Added: 0010902
2013-06-22 19:38 KingRaptor Note Added: 0010903
2013-06-22 19:39 KingRaptor Note Edited: 0010903 View Revisions
2013-06-22 20:05 jK Changeset attached => spring develop 17016c78
2013-06-22 20:05 jK Assigned To => jK
2013-06-22 20:05 jK Status new => resolved
2013-06-22 20:05 jK Resolution open => fixed
+Issue History