@@ -383,8 +383,67 @@ void mission_log_add_entry(LogType type, const char *pname, const char *sname, i
383383 nprintf ((" missionlog" , " new highwater point reached for mission log (%d entries).\n " , last_entry));
384384 }
385385 }
386- #endif
387386
387+ float mission_time = f2fl (Missiontime);
388+ int minutes = (int )(mission_time / 60 );
389+ int seconds = (int )mission_time % 60 ;
390+
391+ // record the entry to the debug log too
392+ switch (entry->type ) {
393+ case LOG_SHIP_DESTROYED:
394+ case LOG_WING_DESTROYED:
395+ nprintf ((" missionlog" , " MISSION LOG: %s destroyed at %02d:%02d\n " , entry->pname , minutes, seconds));
396+ break ;
397+ case LOG_SHIP_ARRIVED:
398+ case LOG_WING_ARRIVED:
399+ nprintf ((" missionlog" , " MISSION LOG: %s arrived at %02d:%02d\n " , entry->pname , minutes, seconds));
400+ break ;
401+ case LOG_SHIP_DEPARTED:
402+ case LOG_WING_DEPARTED:
403+ nprintf ((" missionlog" , " MISSION LOG: %s departed at %02d:%02d\n " , entry->pname , minutes, seconds));
404+ break ;
405+ case LOG_SHIP_DOCKED:
406+ case LOG_SHIP_UNDOCKED:
407+ nprintf ((" missionlog" , " MISSION LOG: %s %sdocked with %s at %02d:%02d\n " , entry->pname , entry->type == LOG_SHIP_UNDOCKED ? " un" : " " , entry->sname , minutes, seconds));
408+ break ;
409+ case LOG_SHIP_SUBSYS_DESTROYED:
410+ nprintf ((" missionlog" , " MISSION LOG: %s subsystem %s destroyed at %02d:%02d\n " , entry->pname , entry->sname , minutes, seconds));
411+ break ;
412+ case LOG_SHIP_DISABLED:
413+ nprintf ((" missionlog" , " MISSION LOG: %s disabled at %02d:%02d\n " , entry->pname , minutes, seconds));
414+ break ;
415+ case LOG_SHIP_DISARMED:
416+ nprintf ((" missionlog" , " MISSION LOG: %s disarmed at %02d:%02d\n " , entry->pname , minutes, seconds));
417+ break ;
418+ case LOG_PLAYER_CALLED_FOR_REARM:
419+ nprintf ((" missionlog" , " MISSION LOG: Player %s called for rearm at %02d:%02d\n " , entry->pname , minutes, seconds));
420+ break ;
421+ case LOG_PLAYER_ABORTED_REARM:
422+ nprintf ((" missionlog" , " MISSION LOG: Player %s aborted rearm at %02d:%02d\n " , entry->pname , minutes, seconds));
423+ break ;
424+ case LOG_PLAYER_CALLED_FOR_REINFORCEMENT:
425+ nprintf ((" missionlog" , " MISSION LOG: A player called for reinforcement %s at %02d:%02d\n " , entry->pname , minutes, seconds));
426+ break ;
427+ case LOG_GOAL_SATISFIED:
428+ nprintf ((" missionlog" , " MISSION LOG: Goal %s satisfied at %02d:%02d\n " , entry->pname , minutes, seconds));
429+ break ;
430+ case LOG_GOAL_FAILED:
431+ nprintf ((" missionlog" , " MISSION LOG: Goal %s failed at %02d:%02d\n " , entry->pname , minutes, seconds));
432+ break ;
433+ case LOG_WAYPOINTS_DONE:
434+ nprintf ((" missionlog" , " MISSION LOG: %s completed waypoint path %s at %02d:%02d\n " , entry->pname , entry->sname , minutes, seconds));
435+ break ;
436+ case LOG_CARGO_REVEALED:
437+ nprintf ((" missionlog" , " MISSION LOG: %s cargo %s revealed at %02d:%02d\n " , entry->pname , Cargo_names[entry->index ], minutes, seconds));
438+ break ;
439+ case LOG_CAP_SUBSYS_CARGO_REVEALED:
440+ nprintf ((" missionlog" , " MISSION LOG: %s subsystem %s cargo %s revealed at %02d:%02d\n " , entry->pname , entry->sname , Cargo_names[entry->index ], minutes, seconds));
441+ break ;
442+ case LOG_SELF_DESTRUCTED:
443+ nprintf ((" missionlog" , " MISSION LOG: %s self-destructed at %02d:%02d\n " , entry->pname , minutes, seconds));
444+ break ;
445+ }
446+ #endif
388447}
389448
390449// function, used in multiplayer only, which adds an entry sent by the host of the game, into
0 commit comments