Permalink
Browse files

* Allow passing of jump point as hook parameter.

  • Loading branch information...
1 parent 6fe5de0 commit 61e2a1959cd309d140a92a314f5da16f0aaadee4 @bobbens committed Jan 27, 2012
Showing with 6 additions and 0 deletions.
  1. +3 −0 src/hook.c
  2. +3 −0 src/hook.h
View
3 src/hook.c
@@ -280,6 +280,9 @@ static int hook_parseParam( lua_State *L, HookParam *param )
case HOOK_PARAM_ASSET:
lua_pushplanet( L, param[n].u.la );
break;
+ case HOOK_PARAM_JUMP:
+ lua_pushjump( L, param[n].u.lj );
+ break;
default:
WARN( "Unknown Lua parameter type." );
View
3 src/hook.h
@@ -12,6 +12,7 @@
#include "nlua_pilot.h"
#include "nlua_faction.h"
#include "nlua_planet.h"
+#include "nlua_jump.h"
#define HOOK_MAX_PARAM 3 /**< Maximum hook params, to avoid dynamic allocation. */
@@ -28,6 +29,7 @@ typedef enum HookParamType_e {
HOOK_PARAM_PILOT, /**< Pilot hook parameter. */
HOOK_PARAM_FACTION, /**< Faction hook parameter. */
HOOK_PARAM_ASSET, /**< Asset hook parameter. */
+ HOOK_PARAM_JUMP, /**< Jump point hook parameter. */
HOOK_PARAM_SENTINEL /**< Enum sentinel. */
} HookParamType;
@@ -43,6 +45,7 @@ typedef struct HookParam_s {
LuaPilot lp; /**< Hook parameter pilot data. */
LuaFaction lf; /**< Hook parameter faction data. */
LuaPlanet la; /**< Hook parameter planet data. */
+ LuaJump lj; /**< Hook parameter jump data. */
} u; /**< Hook parameter data. */
} HookParam;

0 comments on commit 61e2a19

Please sign in to comment.