|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0003018||FSSCP||scripting||public||2014-03-09 15:18||2014-03-15 13:26|
|Target Version||Fixed in Version|
|Summary||0003018: Setting a weapon's Target/HomingObject/HomingPosition etc doesn't work|
|Description||It looks like the lua functions are missing weapon_set_tracking_info() that's also called in the weapon-create sexp. The lua functions do try to set homing objects and positions, but it doesn't look like its enough to actually get the weapons to home in on new objects.|
|Steps To Reproduce||So if I were to do this...|
local weapon = mn.createWeapon(tb.WeaponClasses["Drop Pod Effect"], effectOrientation, effectStart)
And then do one of the following...
weapon.Target = thisObject --This just causes the weapon to fly straight
weapon.HomingObject = thisObject --Same here
weapon.HomingPosition = thisObject.Position --and this actually crashes the game!
|Tags||No tags attached.|
Good catch with the missing weapon_set_tracking_info(), uploaded patch fixes the issue in my test case, homing position seems to only work if there is actually a homing object so I clarified that in the documentation.
I'm not sure what the differences between the homing object and the target objects are so for now both functions do the same.
|Patch looks good, ship it.|
|Fix committed to trunk@10494.|
fs2open: trunk r10494
Timestamp: 2014-03-15 12:29:30
|Fix for Mantis 3018: Setting a weapon's Target/HomingObject/HomingPosition etc doesn't work|
|mod - /trunk/fs2_open/code/parse/lua.cpp|
|2014-03-09 15:18||Axem||New Issue|
|2014-03-10 06:04||m_m||Note Added: 0015646|
|2014-03-10 06:04||m_m||Assigned To||=> m_m|
|2014-03-10 06:04||m_m||Status||new => code review|
|2014-03-10 06:04||m_m||File Added: 3018.patch|
|2014-03-15 13:24||The_E||Note Added: 0015660|
|2014-03-15 13:26||m_m||Changeset attached||=> fs2open trunk r10494|
|2014-03-15 13:26||m_m||Note Added: 0015661|
|2014-03-15 13:26||m_m||Status||code review => resolved|
|2014-03-15 13:26||m_m||Resolution||open => fixed|