[Oxyd] Turrets attacking targets they can't attack
Posted: Thu Oct 29, 2020 12:16 pm
Water turrets again.
When a fire is created, it spawns a dummy that my turrets can attack. The turret type in the picture is looking for targets automatically -- the game decides if an entity that's on its target_trigger_mask is within reach and targets it automatically. In other words: I don't assign the turret a target per script.
This usually works, but there are edge cases. As you can see in the following picture, fire and dummy (the combat-bot) are within min_range of the turret, so the gun is still in the stand-by position: The turret obviously ignores this target, as expected. Now consider this picture: The turret's gun has turned into the direction of fire and dummy -- it's clearly trying to attack because the target is just out of min_range. However, there is no stream! The turret is locked unto this target and won't look for another until the current target has been removed (which happens automatically once the fire has expired of its own). It just sits there waiting while it could have extinguished a lot of other fires in that time.
I consider this a bug because it's unexpected that turrets won't actually shoot at positions that they consider valid targets.
When a fire is created, it spawns a dummy that my turrets can attack. The turret type in the picture is looking for targets automatically -- the game decides if an entity that's on its target_trigger_mask is within reach and targets it automatically. In other words: I don't assign the turret a target per script.
This usually works, but there are edge cases. As you can see in the following picture, fire and dummy (the combat-bot) are within min_range of the turret, so the gun is still in the stand-by position: The turret obviously ignores this target, as expected. Now consider this picture: The turret's gun has turned into the direction of fire and dummy -- it's clearly trying to attack because the target is just out of min_range. However, there is no stream! The turret is locked unto this target and won't look for another until the current target has been removed (which happens automatically once the fire has expired of its own). It just sits there waiting while it could have extinguished a lot of other fires in that time.
I consider this a bug because it's unexpected that turrets won't actually shoot at positions that they consider valid targets.