X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=entity.c;h=21815f461973b2337c31da02df2622a7bc9dea42;hb=074fa69f479724f9800849430bad5caf730b01ef;hp=cfc710618e60af5a26d6d1064c95ced82b4631e4;hpb=7eba38b8178c82040618a518634d8ff4813e2ff2;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/entity.c b/entity.c index cfc7106..21815f4 100644 --- a/entity.c +++ b/entity.c @@ -6,22 +6,27 @@ #include "world_entity.h" #include "ent_skateshop.c" +#include "ent_objective.c" #include "ent_challenge.c" +#include "ent_relay.c" typedef void (*fn_entity_call_handler)( world_instance *, ent_call *); -VG_STATIC void entity_call( world_instance *world, ent_call *call ){ +static void entity_call( world_instance *world, ent_call *call ){ u32 type = mdl_entity_id_type( call->id ); fn_entity_call_handler table[] = { [k_ent_volume] = ent_volume_call, [k_ent_audio] = ent_audio_call, [k_ent_skateshop] = ent_skateshop_call, - [k_ent_challenge] = ent_challenge_call, - [k_ent_ccmd] = ent_ccmd_call + [k_ent_objective] = ent_objective_call, + [k_ent_ccmd] = ent_ccmd_call, + [k_ent_gate] = ent_gate_call, + [k_ent_relay] = ent_relay_call, + [k_ent_challenge] = ent_challenge_call }; - if( type > vg_list_size(table) ){ + if( type >= vg_list_size(table) ){ vg_error( "call to entity type: %u is out of range\n", type ); return; }