Update of /cvsroot/gcblue/gcb_wx/src/ai
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6732/src/ai
Modified Files:
Nav.cpp
Log Message:
- Added waypoint drag edit feature to gui. User can adjust waypoints on
map screen by clicking and dragging
- Fixed sound disable to include music. Previously sound failure would disable
sound effects, but then play music leading to a crash.
- Added random feature targeting to missiles. Missiles should now lock on
to a random feature of the target instead of always hitting the center.
Index: Nav.cpp
===================================================================
RCS file: /cvsroot/gcblue/gcb_wx/src/ai/Nav.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** Nav.cpp 10 Sep 2005 21:47:38 -0000 1.4
--- Nav.cpp 27 Nov 2005 22:21:29 -0000 1.5
***************
*** 106,110 ****
--- 106,126 ----
waypoints.clear();
+ }
+
+ void Nav::EditWaypoint(size_t idx, double lon_rad, double lat_rad, float alt_m)
+ {
+ if (idx < waypoints.size())
+ {
+ GeoPoint& waypoint = waypoints[idx];
+ waypoint.mfLon_rad = lon_rad;
+ waypoint.mfLat_rad = lat_rad;
+ waypoint.mfAlt_m = alt_m;
+ platform->GetBrain()->SetNewCommand();
+ }
+ else
+ {
+ fprintf(stderr, "Nav::EditWaypoint - bad idx\n");
+ }
}
|