View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
---|---|---|---|---|---|---|---|---|---|
0003799 | Spring engine | Lua | public | 2013-05-21 14:03 | 2013-05-23 19:54 | ||||
Reporter | KingRaptor | ||||||||
Assigned To | cleanrock | ||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | resolved | Resolution | fixed | ||||||
Product Version | 94.1.1+git | ||||||||
Target Version | Fixed in Version | 94.1.1+git | |||||||
Summary | 0003799: Spring.SetProjectileTarget with position args does not work as expected | ||||||||
Description | I am calling Spring.SetProjectileTarget(projectileID, x, y, z) on a MissileLauncher's projectile. Expected behaviour is for projectile to fly towards the specified new position, but instead it continues to track existing target unit (if tracks=true) or point. Tested with Spring 94.1.1-542-g8d17b01. | ||||||||
Additional Information | Example gadget: http://paste.springfiles.com/view/fec4eb73 | ||||||||
Tags | No tags attached. | ||||||||
Checked infolog.txt for Errors | |||||||||
Attached Files |
|
![]() |
|
Kloot (developer) 2013-05-21 14:33 |
If a projectile has a target object, calling SetProjectileTarget with a position argument does nothing and you should clear the projectile's target first with SetProjectileTarget(proID, -1, 'u'). |
cleanrock (reporter) 2013-05-21 16:32 |
Is this limitation really needed ? How about changing LuaSyncedCtrl::SetProjectileTarget to remove the check or remove target if necessary ? Current code: if (wpro->GetTargetObject() == NULL) { wpro->SetTargetPos(float3(luaL_checkfloat(L, 2), luaL_checkfloat(L, 3), luaL_checkfloat(L, 4))); } |
KingRaptor (reporter) 2013-05-22 12:10 |
On that note, a unitID arg of -1 (or any other value outside the allowed unitID range, or a nil unitID) causes it to throw a "bad unitID" error. Have to work around it by passing it a valid but unused unitID. |
Google_Frog (reporter) 2013-05-22 15:01 |
When I last checked, Spring.SetUnitTarget also throws an error (when called with two arguments) if the target unitID is invalid. So calling with -1 to clear target does not work. |
cleanrock (reporter) 2013-05-23 17:12 |
Please test with http://springrts.com/dl/buildbot/default/develop/94.1.1-554-g7933d4f/ |
cleanrock (reporter) 2013-05-23 19:54 |
KR test ok |
![]() |
|||
Date Modified | Username | Field | Change |
---|---|---|---|
2013-05-21 14:03 | KingRaptor | New Issue | |
2013-05-21 14:33 | Kloot | Note Added: 0010720 | |
2013-05-21 16:32 | cleanrock | Note Added: 0010723 | |
2013-05-22 12:10 | KingRaptor | Note Added: 0010746 | |
2013-05-22 15:01 | Google_Frog | Note Added: 0010748 | |
2013-05-23 16:15 | cleanrock | Assigned To | => cleanrock |
2013-05-23 16:15 | cleanrock | Status | new => assigned |
2013-05-23 16:22 | cleanrock | Changeset attached | => spring develop 7933d4f1 |
2013-05-23 16:22 | cleanrock | Resolution | open => fixed |
2013-05-23 17:12 | cleanrock | Note Added: 0010750 | |
2013-05-23 17:12 | cleanrock | Status | assigned => feedback |
2013-05-23 19:54 | cleanrock | Note Added: 0010751 | |
2013-05-23 19:54 | cleanrock | Status | feedback => resolved |
2013-05-23 19:54 | cleanrock | Fixed in Version | => 94.1.1+git |