[Fix] Pilot boarding hooks fixed.

This commit is contained in:
Allanis 2013-11-17 05:56:36 +00:00
parent 5d17f0e31d
commit 87771ab892
3 changed files with 3 additions and 4 deletions

View File

@ -86,8 +86,7 @@ void player_board(void) {
board_update(); board_update();
/* Run hook if needed. */ /* Run hook if needed. */
if(p->hook_type == PILOT_HOOK_BOARD) pilot_runHook(p, PILOT_HOOK_BOARD);
hook_runID(p->hook);
} }
/** /**

View File

@ -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_shootWeapon(Pilot* p, PilotOutfit* w, const unsigned int t);
static void pilot_update(Pilot* pilot, const double dt); static void pilot_update(Pilot* pilot, const double dt);
static void pilot_hyperspace(Pilot* pilot); static void pilot_hyperspace(Pilot* pilot);
static void pilot_runHook(Pilot* p, int hook_type);
void pilot_render(Pilot* pilot); void pilot_render(Pilot* pilot);
static void pilot_calcCargo(Pilot* pilot); static void pilot_calcCargo(Pilot* pilot);
void pilot_free(Pilot* p); void pilot_free(Pilot* p);
@ -446,7 +445,7 @@ void pilot_dead(Pilot* p) {
* @param p Pilot to run the hook. * @param p Pilot to run the hook.
* @param hook_type Type of hook to run. * @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; int i;
for(i = 0; i < PILOT_HOOKS; i++) { for(i = 0; i < PILOT_HOOKS; i++) {
if(p->hook_type[i] == hook_type) if(p->hook_type[i] == hook_type)

View File

@ -270,4 +270,5 @@ void pilots_update(double dt);
void pilots_render(void); void pilots_render(void);
void pilot_addHook(Pilot* pilot, int type, int hook); void pilot_addHook(Pilot* pilot, int type, int hook);
void pilot_runHook(Pilot* p, int hook_type);