View Issue Details

IDProjectCategoryView StatusLast Update
0003860Spring engineLuapublic2013-06-22 20:05
ReporterKingRaptor Assigned TojK  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version94.1.1+git 
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

Activities

IthoughtWeBannedHim

2013-06-22 19:04

reporter   ~0010901

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

IthoughtWeBannedHim

2013-06-22 19:29

reporter   ~0010902

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

KingRaptor

2013-06-22 19:38

reporter   ~0010903

Last edited: 2013-06-22 19:39

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

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
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