X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=world_entity.c;fp=world_entity.c;h=61d014d6ea38806dcecfef8ab4066ba72aba89cd;hb=4c95c9c3e6033cd1360adacef3c80fc4da933715;hp=38bf86f7e650a0f4660f901db07a70fdae00cb33;hpb=d43d7f62ff83799b6d99221d881179814cb239a6;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/world_entity.c b/world_entity.c index 38bf86f..61d014d 100644 --- a/world_entity.c +++ b/world_entity.c @@ -162,8 +162,7 @@ VG_STATIC void ent_volume_call( world_instance *world, ent_call *call ) } } -VG_STATIC void ent_audio_call( world_instance *world, ent_call *call ) -{ +VG_STATIC void ent_audio_call( world_instance *world, ent_call *call ){ if( world->status == k_world_status_unloading ){ vg_warn( "cannot modify audio while unloading world\n" ); return; @@ -256,4 +255,13 @@ VG_STATIC void ent_audio_call( world_instance *world, ent_call *call ) } } + +VG_STATIC void ent_ccmd_call( world_instance *world, ent_call *call ){ + if( call->function == k_ent_function_trigger ){ + u32 index = mdl_entity_id_id( call->id ); + ent_ccmd *ccmd = mdl_arritm( &world->ent_ccmd, index ); + vg_execute_console_input( mdl_pstr(&world->meta, ccmd->pstr_command) ); + } +} + #endif /* WORLD_ENTITY_C */