Fixed traceresults (Freecode)

This commit is contained in:
David Anderson 2004-09-14 23:39:22 +00:00
parent 44bb871f7e
commit 4ed906248d
3 changed files with 5 additions and 2 deletions

View File

@ -9,6 +9,7 @@ void OnAmxxAttach()
MF_AddNatives(pev_natives);
MF_AddNatives(forward_natives);
MF_AddNatives(pdata_natives);
MF_AddNatives(tr_Natives);
}
int GetHullBounds(int hullnumber, float *mins, float *maxs);
// sawce: Do not null out the forward for ServerActivate. It's required for the INDEXENT() fix. (I don't think ServerActivate is planned on being forwarded anyway)

View File

@ -15,4 +15,6 @@ enum
TR_iHitgroup,
};
extern AMX_NATIVE_INFO tr_Natives[];
#endif //_INCLUDE_TR_H

View File

@ -97,7 +97,7 @@ void TraceLine(const float *v1, const float *v2, int fNoMonsters, edict_t *pentT
cell vec2[3] = {amx_ftoc(v2[0]), amx_ftoc(v2[1]), amx_ftoc(v2[2])};
cell retvec1 = MF_PrepareCellArray(vec1, 3);
cell retvec2 = MF_PrepareCellArray(vec2, 3);
FM_ENG_HANDLE(FM_TraceLine, (Engine[FM_TraceLine].at(i), vec1, vec2, fNoMonsters, ENTINDEX(pentToSkip), (cell)ptr));
FM_ENG_HANDLE(FM_TraceLine, (Engine[FM_TraceLine].at(i), retvec1, retvec2, fNoMonsters, ENTINDEX(pentToSkip), (cell)ptr));
RETURN_META(mswi(lastFmRes));
}
@ -107,7 +107,7 @@ void TraceLine_post(const float *v1, const float *v2, int fNoMonsters, edict_t *
cell vec2[3] = {amx_ftoc(v2[0]), amx_ftoc(v2[1]), amx_ftoc(v2[2])};
cell retvec1 = MF_PrepareCellArray(vec1, 3);
cell retvec2 = MF_PrepareCellArray(vec2, 3);
FM_ENG_HANDLE(FM_TraceLine, (Engine[FM_TraceLine].at(i), vec1, vec2, fNoMonsters, ENTINDEX(pentToSkip), (cell)ptr));
FM_ENG_HANDLE(FM_TraceLine, (Engine[FM_TraceLine].at(i), retvec1, retvec2, fNoMonsters, ENTINDEX(pentToSkip), (cell)ptr));
RETURN_META(MRES_IGNORED);
}