dragon 1.72.2
Target Autolock Plus 1.12
Recently i switched to a Dragon-M with 3 turrets, and i also have autolock installed.
Shortly after a fight sometimes i get the message "Auto-locked onto attacker - Dragon M" on screen.
After a few seconds i get target lost, and status is back to yellow/green .
My own Dragon M is the only 1 present in these cases.
At first i thought autolock did something wrong, but decided to check the code.
Code: Select all
this.shipBeingAttacked = function(attacker)
{
if(missionVariables.targetAutolock == "TRUE" && player.ship.equipmentStatus("EQ_SCANNER_SHOW_MISSILE_TARGET") == "EQUIPMENT_OK" && player.ship.target == null && attacker && !attacker.isCloaked && !attacker.hasRole("OXP_stealthShip") && !attacker.hasRole("OXP_noAutolock") && !attacker.hasRole("TAP_noAutolock"))
{
player.ship.target = attacker;
player.consoleMessage("Auto-locked onto attacker - " + attacker.displayName + ".",5);
}
}
I fly through the remnant of a plasma cloud i fired and get some damage from it.
The shipBeingAttacked event is triggered with me as the attacker, since it was my plasma cloud.
If my reasoning is correct, the bug is in shipBeingAttacked, not in the oxps.
Note : this happened first to me in 1.74.x, but i only flew the dragon a short time then.