--- /dev/null
+#ifndef ENT_UNLOCK_C
+#define ENT_UNLOCK_C
+
+#include "entity.h"
+
+VG_STATIC void ent_unlock_call( world_instance *world, ent_call *call ){
+ u32 index = mdl_entity_id_id( call->id );
+ ent_unlock *unlock = mdl_arritm( &world->ent_unlock, index );
+
+ if( call->function == 0 ){ /* unlock() */
+ if( !unlock->status ){
+ vg_info( "unlock( '%s' )\n",
+ mdl_pstr( &world->meta, unlock->pstr_alias) );
+ ent_call call;
+ call.data = NULL;
+ call.function = unlock->target_event;
+ call.id = unlock->target;
+ entity_call( world, &call );
+ }
+ unlock->status = 1;
+ }
+ else {
+ vg_print_backtrace();
+ vg_error( "Unhandled function id: %u\n", call->function );
+ }
+}
+
+#endif /* ENT_UNLOCK_C */