Page 1 of 1
The limited arc moving code is flawed
Posted: 23 Feb 2007, 11:53
by KDR_11k
When a unit has a limited arc of fire it is supposed to turn that arc towards th enemy. Unfortunately it uses a move command towards the enemy location and full path finding to do that which means that if the enemy is behind an unpassable obstacle (that doesn't block shots) the unit will often turn AWAY from the target because the pathfinding says it has to go around the obstacle. The 8-way movement also gets annoying, a unit might not turn its arc until it's on one of the 8 cardinal directions when the pathfinding says "okay, turn here". All of this will often result in artillery units running way too close to the enemy instead of simply turning towards them.
Posted: 24 Feb 2007, 05:08
by ILMTitan
1. Which mod? What units?
2. It is not true that a movement command is used to rotate the unit. That code is directly in the CGroundMoveType class. Rotating does not call the pathfinder. It uses CWeapon::TryTarget (and TryTargetWithRotation).
Posted: 24 Feb 2007, 07:44
by KDR_11k
Interesting. In Kernel Panic 0.7 (original version, not KDR Edit) pointers often move around obstacles they could shoot over if their arc doesn't include the enemy (if their path ever turns them randomly towards the enemy they'll stop and shoot, of course), when I manually tell them to move towards the obstacle they can fire with no problem.
Posted: 25 Feb 2007, 03:27
by ILMTitan
Is this .74b3, or SVN head that you are experiencing this behavior. I believe arced weapon behavior was broken at some point (don't recall if it was before .74b3 or not), and the fix was added somewhat recently.
Posted: 25 Feb 2007, 08:11
by KDR_11k
74b3.