Fixed TraceLine problems after map change

This commit is contained in:
Lukasz Wlasinksi 2004-06-28 11:13:07 +00:00
parent fc3b165e57
commit f69da4341b
2 changed files with 5 additions and 5 deletions

View File

@ -99,7 +99,7 @@ struct weaponsVault {
struct traceVault { struct traceVault {
char * szName; char * szName;
char * szTa; char szTag[6];
int iId; int iId;
int iAction; int iAction;
float fDel; float fDel;

View File

@ -288,14 +288,14 @@ void TraceLine_Post(const float *v1, const float *v2, int fNoMonsters, edict_t *
else{ else{
if ( e->v.owner && e->v.owner->v.flags& (FL_CLIENT | FL_FAKECLIENT) ){ if ( e->v.owner && e->v.owner->v.flags& (FL_CLIENT | FL_FAKECLIENT) ){
CPlayer *pPlayer = GET_PLAYER_POINTER(e->v.owner); CPlayer *pPlayer = GET_PLAYER_POINTER(e->v.owner);
int i;
for ( int i=0;i<MAX_TRACE;i++){ for ( i=0;i<MAX_TRACE;i++){
if ( util_strncmp( traceData[i].szTa,traceData[i].start ? STRING(e->v.classname)+traceData[i].start : STRING(e->v.classname) ,traceData[i].stop) ){ if ( util_strncmp( traceData[i].szTag,traceData[i].start ? STRING(e->v.classname)+traceData[i].start : STRING(e->v.classname) ,traceData[i].stop) ){
if ( traceData[i].iAction & ACT_NADE_SHOT ){ if ( traceData[i].iAction & ACT_NADE_SHOT ){
pPlayer->saveShot(traceData[i].iId); pPlayer->saveShot(traceData[i].iId);
} }
if ( traceData[i].iAction & ACT_NADE_PUT ){ if ( traceData[i].iAction & ACT_NADE_PUT ){
g_grenades.put(e,traceData[i].fDel,traceData[i].iId,GET_PLAYER_POINTER(e->v.owner)); g_grenades.put(e,traceData[i].fDel,traceData[i].iId,pPlayer);
} }
break; break;
} }