September 16th patch update

DLL version incremented
Beacon functionality added
Support for loading screen match preview display
Placeholder handling of new key-bindable mod commands
This commit is contained in:
PG-SteveT
2020-09-16 10:03:04 -07:00
parent e37e174be1
commit fd05be35c1
68 changed files with 1313 additions and 267 deletions
+26 -4
View File
@@ -305,14 +305,20 @@ bool FootClass::Mark(MarkType mark)
/*
** Inform the map of the refresh, occupation, and overlap
** request.
** Special case is fixed-wing aircraft, which are never placed
** or picked up since they can never land.
*/
switch (mark) {
case MARK_UP:
Map.Pick_Up(cell, this);
if (What_Am_I() != RTTI_AIRCRAFT || !((AircraftClass*)this)->Class->IsFixedWing) {
Map.Pick_Up(cell, this);
}
break;
case MARK_DOWN:
Map.Place_Down(cell, this);
if (What_Am_I() != RTTI_AIRCRAFT || !((AircraftClass*)this)->Class->IsFixedWing) {
Map.Place_Down(cell, this);
}
break;
default:
@@ -947,8 +953,10 @@ void FootClass::Approach_Target(void)
/*
** If a suitable intermediate location was found, then head toward it.
** Otherwise, head toward the enemy unit directly.
** Infantry always head towards the target since they can enter a cell
** in range, but still not be able to hit the target if the spot is out of range.
*/
if (found) {
if (found && What_Am_I() != RTTI_INFANTRY) {
Assign_Destination(::As_Target(trycell));
} else {
Assign_Destination(TarCom);
@@ -990,6 +998,20 @@ int FootClass::Mission_Guard_Area(void)
ArchiveTarget = ::As_Target(Coord_Cell(Coord));
}
/*
** Ensure units aren't trying to guard cells off the map.
*/
if (Target_Legal(NavCom) && Is_Target_Cell(NavCom)) {
CELL cell = As_Cell(NavCom);
int x = Cell_X(cell);
int y = Cell_Y(cell);
if (x < Map.MapCellX || y < Map.MapCellY || x >= (Map.MapCellX + Map.MapCellWidth) || y >= (Map.MapCellY + Map.MapCellHeight)) {
Assign_Target(TARGET_NONE);
Assign_Destination(TARGET_NONE);
ArchiveTarget = ::As_Target(Coord_Cell(Coord));
}
}
/*
** Make sure that the unit has not strayed too far from the home position.
** If it has, then race back to it.
@@ -1320,7 +1342,7 @@ void FootClass::Active_Click_With(ActionType action, CELL cell)
case ACTION_MOVE:
if (AllowVoice) {
COORDINATE coord = Map.Pixel_To_Coord(Get_Mouse_X(), Get_Mouse_Y());
OutList.Add(EventClass(ANIM_MOVE_FLASH, PlayerPtr->Class->House, coord));
OutList.Add(EventClass(ANIM_MOVE_FLASH, PlayerPtr->Class->House, coord, 1 << PlayerPtr->Class->House));
}
// Fall into next case.