mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-07-14 03:35:48 +00:00
Further Pushing tweaks: more customisable, longer ranges.
This overall decreases the deathball effect from units walking to each other a bit. - Fix formations - this cleans up a UnitMotion hack for formations, making it possible to increase pushing ranges without breaking closely knit formations like testudo. - Make MINIMAL_PUSHING and the MOVE_EXTENSION configurable, and add a STATIC_EXTENSION as well. - Increase the pushing range significantly, making units sparser. Differential Revision: https://code.wildfiregames.com/D4098 This was SVN commit r25708.
This commit is contained in:
@@ -26,6 +26,7 @@ BEGIN_INTERFACE_WRAPPER(UnitMotion)
|
||||
DEFINE_INTERFACE_METHOD("MoveToPointRange", ICmpUnitMotion, MoveToPointRange)
|
||||
DEFINE_INTERFACE_METHOD("MoveToTargetRange", ICmpUnitMotion, MoveToTargetRange)
|
||||
DEFINE_INTERFACE_METHOD("MoveToFormationOffset", ICmpUnitMotion, MoveToFormationOffset)
|
||||
DEFINE_INTERFACE_METHOD("SetMemberOfFormation", ICmpUnitMotion, SetMemberOfFormation)
|
||||
DEFINE_INTERFACE_METHOD("IsTargetRangeReachable", ICmpUnitMotion, IsTargetRangeReachable)
|
||||
DEFINE_INTERFACE_METHOD("FaceTowardsPoint", ICmpUnitMotion, FaceTowardsPoint)
|
||||
DEFINE_INTERFACE_METHOD("StopMoving", ICmpUnitMotion, StopMoving)
|
||||
@@ -63,6 +64,11 @@ public:
|
||||
m_Script.CallVoid("MoveToFormationOffset", target, x, z);
|
||||
}
|
||||
|
||||
virtual void SetMemberOfFormation(entity_id_t controller)
|
||||
{
|
||||
m_Script.CallVoid("SetMemberOfFormation", controller);
|
||||
}
|
||||
|
||||
virtual bool IsTargetRangeReachable(entity_id_t target, entity_pos_t minRange, entity_pos_t maxRange)
|
||||
{
|
||||
return m_Script.Call<bool>("IsTargetRangeReachable", target, minRange, maxRange);
|
||||
|
||||
Reference in New Issue
Block a user