mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-06 10:58:01 +00:00
HDB: Add removeFirstWaypoint()
This commit is contained in:
parent
755bd46728
commit
bf98bcca01
@ -24,6 +24,21 @@
|
||||
|
||||
namespace HDB {
|
||||
|
||||
void AI::removeFirstWaypoint() {
|
||||
if (!_numWaypoints)
|
||||
return;
|
||||
|
||||
int i;
|
||||
for (i = 0;i < _numWaypoints;i++) {
|
||||
_waypoints[i] = _waypoints[i + 1];
|
||||
}
|
||||
|
||||
_waypoints[i].x = 0;
|
||||
_waypoints[i].y = 0;
|
||||
_waypoints[i].level = 0;
|
||||
_numWaypoints--;
|
||||
}
|
||||
|
||||
void AI::clearWaypoints() {
|
||||
memset(&_waypoints[0], 0, sizeof(_waypoints));
|
||||
_numWaypoints = 0;
|
||||
|
@ -664,6 +664,7 @@ public:
|
||||
|
||||
// Waypoint & Movement Functions
|
||||
void lookAtXY(int x, int y);
|
||||
void removeFirstWaypoint();
|
||||
void clearWaypoints();
|
||||
Tile *getStandFrameDir(AIEntity *e);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user