|
楼主 |
发表于 2008-6-29 22:48:43
|
显示全部楼层
来自 中国–广东–深圳
回复: 怎么看都没有错的变量匹配错误tag mismatch
TraceResult constants cause a tag mismatch on compile if both engine and fakemeta are included, since both const includes have the TraceResult enum.
engine_const.inc:
// Used by the traceresult() native.
enum
{
TR_AllSolid, // (int) if true, plane is not valid
TR_StartSolid, // (int) if true, the initial point was in a solid area
TR_InOpen, // (int)
TR_InWater, // (int)
TR_Fraction, // (float) time completed, 1.0 = didn't hit anything
TR_EndPos, // (vector) final position
TR_PlaneDist, // (float)
TR_PlaneNormal, // (vector) surface normal at impact
TR_Hit, // (entity) entity the surface is on
TR_Hitgroup // (int) 0 == generic, non zero is specific body part
};fakemeta_const.inc:
enum TraceResult
{
TR_AllSolid, // int
TR_StartSolid, // int
TR_InOpen, // int
TR_InWater, // int
TR_flFraction, // float
TR_vecEndPos, // float array[3]
TR_flPlaneDist, // float
TR_vecPlaneNormal, // float array[3]
TR_pHit, // int (edict_t*)
TR_iHitgroup, // int
};
--------------------------------------------------------------------------------
Was using:
get_tr2(tr, TR_InOpen)Could only get it to compile, after I realized what was going on, when I placed TraceResult in front like so:
get_tr2(tr, TraceResult:TR_InOpen) |
|