diff --git a/src/board.c b/src/board.c index 662d0c4..c67dd51 100644 --- a/src/board.c +++ b/src/board.c @@ -86,8 +86,7 @@ void player_board(void) { board_update(); /* Run hook if needed. */ - if(p->hook_type == PILOT_HOOK_BOARD) - hook_runID(p->hook); + pilot_runHook(p, PILOT_HOOK_BOARD); } /** diff --git a/src/pilot.c b/src/pilot.c index 639cf20..a6353e7 100644 --- a/src/pilot.c +++ b/src/pilot.c @@ -58,7 +58,6 @@ extern int gui_load(const char* name); static void pilot_shootWeapon(Pilot* p, PilotOutfit* w, const unsigned int t); static void pilot_update(Pilot* pilot, const double dt); static void pilot_hyperspace(Pilot* pilot); -static void pilot_runHook(Pilot* p, int hook_type); void pilot_render(Pilot* pilot); static void pilot_calcCargo(Pilot* pilot); void pilot_free(Pilot* p); @@ -446,7 +445,7 @@ void pilot_dead(Pilot* p) { * @param p Pilot to run the hook. * @param hook_type Type of hook to run. */ -static void pilot_runHook(Pilot* p, int hook_type) { +void pilot_runHook(Pilot* p, int hook_type) { int i; for(i = 0; i < PILOT_HOOKS; i++) { if(p->hook_type[i] == hook_type) diff --git a/src/pilot.h b/src/pilot.h index 89e47d6..92aad51 100644 --- a/src/pilot.h +++ b/src/pilot.h @@ -270,4 +270,5 @@ void pilots_update(double dt); void pilots_render(void); void pilot_addHook(Pilot* pilot, int type, int hook); +void pilot_runHook(Pilot* p, int hook_type);