Changeset 27700

Timestamp:
Jun 14, 2023, 9:48:45 AM (14 months ago)
Author:
wraitii
Message:

Delay a distance computation in UnitMotion.

Minor optimisation to computing a point goal.

Differential Revision: https://code.wildfiregames.com/D5035

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ps/trunk/source/simulation2/components/CCmpUnitMotion.h

    r26865 r27700  
    1 /* Copyright (C) 2022 Wildfire Games.
     1/* Copyright (C) 202 Wildfire Games.
    22 * This file is part of 0 A.D.
    33 *
     
    102102 * TODO: if UnitMotion could send differentiated "unreachable" and "currently stuck" failing messages,
    103103 * this could probably be lowered.
    104  * TODO: when unit pushing is implemented, this number can probably be lowered.
    105104 */
    106105constexpr u8 MAX_FAILED_MOVEMENTS = 35;
     
    16591658    ENSURE(cmpObstructionManager);
    16601659
    1661     entity_pos_t distance = cmpObstructionManager->DistanceBetweenShapes(obstruction, targetObstruction);
    1662 
    16631660    out.x = targetObstruction.x;
    16641661    out.z = targetObstruction.z;
     
    16761673        return true;
    16771674    }
     1675
     1676
    16781677
    16791678    entity_pos_t circleRadius = CFixedVector2D(targetObstruction.hw, targetObstruction.hh).Length();
Note: See TracChangeset for help on using the changeset viewer.