Fixed traceresults (Freecode)
This commit is contained in:
parent
44bb871f7e
commit
4ed906248d
|
@ -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)
|
||||
|
|
|
@ -15,4 +15,6 @@ enum
|
|||
TR_iHitgroup,
|
||||
};
|
||||
|
||||
extern AMX_NATIVE_INFO tr_Natives[];
|
||||
|
||||
#endif //_INCLUDE_TR_H
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user