View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
---|---|---|---|---|---|---|---|---|---|
0001820 | Spring engine | General | public | 2010-02-02 18:16 | 2010-02-07 11:43 | ||||
Reporter | tvo | ||||||||
Assigned To | jK | ||||||||
Priority | normal | Severity | major | Reproducibility | always | ||||
Status | resolved | Resolution | fixed | ||||||
Product Version | 0.81.1.3 | ||||||||
Target Version | 0.81.2 | Fixed in Version | |||||||
Summary | 0001820: Mines explode now even when plane flies high above them | ||||||||
Description | Mines still have 2d radius in which they check for enemies, but in the past they checked for physicalState != Flying. That has been removed, see this part of diff between 0.80.5.2 and 0.81.1.3: if (unitDef->canKamikaze) { if (fireState >= 2) { - CUnit* u = helper->GetClosestEnemyUnitNoLosTest(pos, unitDef->kamikazeDist, allyteam, false, true); - if (u && u->physicalState != CSolidObject::Flying && u->speed.dot(pos - u->pos) <= 0) { - // self destruct when unit start moving away from mine, should maximize damage + CUnit* u = helper->GetClosestEnemyUnit(pos, unitDef->kamikazeDist, allyteam); + if (u && u->speed.dot(pos - u->pos) <= 0) { + //! self destruct when we start moving away from the target, this should maximize the damage KillUnit(true, false, NULL); } } Hence, now mines can be defused by flying any kind of airplane over them. | ||||||||
Additional Information | Use this command to see the diff a bit better: git diff 0.80.5.2..0.81.1.3 -- rts/Sim/Units/Unit.cpp | ||||||||
Tags | No tags attached. | ||||||||
Checked infolog.txt for Errors | |||||||||
Attached Files |
|
![]() |
|
hoijui (reporter) 2010-02-02 21:36 |
done in commit 06de8be5d358dcc6a0a7a08db4982b2ae4b3692d: ############# fix kamikaze units: * do a los check * do a sphere instead of cylinder check (don't explode on subs anymore) * removed a check-for-flying hack (was there cause of cylinder checking) ############# So the commit was meant to do a sphere check, but as you say, still does a cylindrical(2D) check. So the appropriate fix would be, to really use a 3D instead of 2D check then, right? |
Kloot (developer) 2010-02-02 22:19 Last edited: 2010-02-02 22:20 |
CGameHelper::GetClosestEnemyUnit uses the ClosestUnit filter struct, which does a 2D check in AddUnit ((pos - u->midPos).SqLength2D()) to set the closest unit. So it's strange the commit worked for subs in the first place... |
Auswaschbar (reporter) 2010-02-04 18:19 |
Added height check, remaining issues with cloaked units. |
jK (developer) 2010-02-06 12:55 |
added a new unitdef tag "kamikazeUseLOS" (default false) |
![]() |
|||
Date Modified | Username | Field | Change |
---|---|---|---|
2010-02-02 18:16 | tvo | New Issue | |
2010-02-02 18:16 | tvo | Additional Information Updated | |
2010-02-02 21:36 | hoijui | Note Added: 0004586 | |
2010-02-02 22:19 | Kloot | Note Added: 0004587 | |
2010-02-02 22:20 | Kloot | Note Edited: 0004587 | |
2010-02-04 18:19 | Auswaschbar | Note Added: 0004598 | |
2010-02-06 12:55 | jK | Note Added: 0004605 | |
2010-02-06 12:55 | jK | Status | new => resolved |
2010-02-06 12:55 | jK | Resolution | open => fixed |
2010-02-06 12:55 | jK | Assigned To | => jK |
2010-02-07 11:43 | tvo | Target Version | => 0.81.2 |