[Half-Life AMXX] / amxmod_compat / vexdum.sma Repository:
ViewVC logotype

Diff of /amxmod_compat/vexdum.sma

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 16, Fri Nov 16 15:12:40 2007 UTC revision 17, Fri Nov 16 15:29:57 2007 UTC
# Line 34  Line 34 
34          register_forward(FM_EmitSound,                          "Hook_FM_EmitSound")          register_forward(FM_EmitSound,                          "Hook_FM_EmitSound")
35          register_forward(FM_EmitAmbientSound,           "Hook_FM_EmitAmbientSound")          register_forward(FM_EmitAmbientSound,           "Hook_FM_EmitAmbientSound")
36          register_forward(FM_SetModel,                           "Hook_FM_SetModel")          register_forward(FM_SetModel,                           "Hook_FM_SetModel")
         register_forward(FM_TraceLine,                          "Hook_FM_TraceLine")  
37          register_forward(FM_SetClientKeyValue,          "Hook_FM_SetClientKeyValue")          register_forward(FM_SetClientKeyValue,          "Hook_FM_SetClientKeyValue")
38          register_forward(FM_KeyValue,                           "Hook_FM_KeyValue")          register_forward(FM_KeyValue,                           "Hook_FM_KeyValue")
39          register_forward(FM_Touch,                                      "Hook_FM_Touch")          register_forward(FM_Touch,                                      "Hook_FM_Touch")
# Line 44  Line 43 
43          register_forward(FM_PlayerPostThink,            "Hook_FM_PlayerPostThink")          register_forward(FM_PlayerPostThink,            "Hook_FM_PlayerPostThink")
44          register_forward(FM_ClientUserInfoChanged,      "Hook_ClientUserInfoChanged")          register_forward(FM_ClientUserInfoChanged,      "Hook_ClientUserInfoChanged")
45    
46            // Only register the traceline forward if there actually is a plugin
47            // that needs it.  Otherwise this will mess with set_user_hitzones
48    
49            new pluginnum = get_pluginsnum();
50            for (new i = 0; i < pluginnum; i++)
51            {
52                    if (plugin_flags(0, i) & AMX_FLAG_OLDFILE &&    // plugin is an AMX plugin being emulated
53                            get_func_id("traceline", i) != -1)                      // plugin needs traceline
54                    {
55                            register_forward(FM_TraceLine,                          "Hook_FM_TraceLine")
56                            break;
57                    }
58    
59            }
60          /* Global Forwards */          /* Global Forwards */
61          g_FwdTouch =                    CreateMultiForwardEx("entity_touch",            ET_STOP, FORWARD_ONLY_OLD, FP_CELL, FP_CELL)          g_FwdTouch =                    CreateMultiForwardEx("entity_touch",            ET_STOP, FORWARD_ONLY_OLD, FP_CELL, FP_CELL)
62          g_FwdThink =                    CreateMultiForwardEx("entity_think",            ET_STOP, FORWARD_ONLY_OLD, FP_CELL)          g_FwdThink =                    CreateMultiForwardEx("entity_think",            ET_STOP, FORWARD_ONLY_OLD, FP_CELL)
# Line 395  Line 408 
408                  case TR_FL_flFraction:                  case TR_FL_flFraction:
409                          set_tr2(g_LastTrace, TraceResult:TR_flFraction, fValue)                          set_tr2(g_LastTrace, TraceResult:TR_flFraction, fValue)
410                  case TR_FL_flPlaneDist:                  case TR_FL_flPlaneDist:
411                          get_tr2(g_LastTrace, TraceResult:TR_flPlaneDist, fValue)                          set_tr2(g_LastTrace, TraceResult:TR_flPlaneDist, fValue)
412                  default:                  default:
413                  {                  {
414                          log_error(AMX_ERR_NATIVE, "Invalid TR_ parameter")                          log_error(AMX_ERR_NATIVE, "Invalid TR_ parameter")

Legend:
Removed from v.16  
changed lines
  Added in v.17

Contact
ViewVC Help
Powered by ViewVC 1.0.4