map change crash fixed

This commit is contained in:
Lukasz Wlasinksi 2004-07-21 11:51:18 +00:00
parent 064853d9d5
commit 0b9f3d8e8c
4 changed files with 10 additions and 13 deletions

View File

@ -227,8 +227,6 @@ void CPlayer::saveKill(CPlayer* pVictim, int wweapon, int hhs, int ttk){
void CPlayer::saveHit(CPlayer* pVictim, int wweapon, int ddamage, int bbody){ void CPlayer::saveHit(CPlayer* pVictim, int wweapon, int ddamage, int bbody){
if ( index == pVictim->index ) return;
if ( ignoreBots(pEdict,pVictim->pEdict) ) if ( ignoreBots(pEdict,pVictim->pEdict) )
return; return;

View File

@ -62,7 +62,7 @@
#define MAX_TRACE 6 #define MAX_TRACE 6
struct traceVault { struct traceVault {
char * szName; char szName[16];
int iId; int iId;
int iAction; int iAction;
float fDel; float fDel;

View File

@ -80,7 +80,7 @@ cvar_t *dodstats_steam;
cvar_t init_dodstats_steam = {"dodstats_steam","1"}; cvar_t init_dodstats_steam = {"dodstats_steam","1"};
struct sUserMsg { struct sUserMsg {
const char* name; const char *name;
int* id; int* id;
funEventCall func; funEventCall func;
bool endmsg; bool endmsg;
@ -169,6 +169,9 @@ void ServerDeactivate() {
g_rank.saveRank( MF_BuildPathname("%s",get_localinfo("dodstats") ) ); g_rank.saveRank( MF_BuildPathname("%s",get_localinfo("dodstats") ) );
g_damage_info.clear();
g_death_info.clear();
// clear custom weapons info // clear custom weapons info
for ( i=DODMAX_WEAPONS-DODMAX_CUSTOMWPNS;i<DODMAX_WEAPONS;i++) for ( i=DODMAX_WEAPONS-DODMAX_CUSTOMWPNS;i<DODMAX_WEAPONS;i++)
weaponData[i].needcheck = false; weaponData[i].needcheck = false;
@ -277,7 +280,7 @@ void WriteEntity_Post(int iValue) {
void TraceLine_Post(const float *v1, const float *v2, int fNoMonsters, edict_t *e, TraceResult *ptr) { void TraceLine_Post(const float *v1, const float *v2, int fNoMonsters, edict_t *e, TraceResult *ptr) {
if (ptr->pHit&&(ptr->pHit->v.flags& (FL_CLIENT | FL_FAKECLIENT) )&& if (ptr->pHit&&(ptr->pHit->v.flags& (FL_CLIENT | FL_FAKECLIENT) )&&
e&&(e->v.flags& (FL_CLIENT | FL_FAKECLIENT) )){ e && (e->v.flags&(FL_CLIENT | FL_FAKECLIENT) )){
GET_PLAYER_POINTER(e)->aiming = ptr->iHitgroup; GET_PLAYER_POINTER(e)->aiming = ptr->iHitgroup;
RETURN_META(MRES_IGNORED); RETURN_META(MRES_IGNORED);
} }
@ -373,6 +376,4 @@ void FN_AMXX_Detach() {
g_rank.clear(); g_rank.clear();
g_grenades.clear(); g_grenades.clear();
g_rank.unloadCalc(); g_rank.unloadCalc();
g_damage_info.clear();
g_death_info.clear();
} }

View File

@ -169,11 +169,9 @@ void Client_Health_End(void* mValue){
g_damage_info.exec( pAttacker->index, mPlayer->index, damage, weapon, aim, TA ); g_damage_info.exec( pAttacker->index, mPlayer->index, damage, weapon, aim, TA );
if ( mPlayer->IsAlive() ) if ( !mPlayer->IsAlive() ){
return; pAttacker->saveKill(mPlayer,weapon,( aim == 1 ) ? 1:0 ,TA);
g_death_info.exec( pAttacker->index, mPlayer->index, weapon, aim, TA );
pAttacker->saveKill(mPlayer,weapon,( aim == 1 ) ? 1:0 ,TA); }
g_death_info.exec( pAttacker->index, mPlayer->index, weapon, aim, TA );
} }