dod_get_user_weapon added. Compile options for old/new forwards system

This commit is contained in:
Lukasz Wlasinksi
2004-07-30 12:49:11 +00:00
parent 77c887d514
commit 8e23ca757a
8 changed files with 96 additions and 4 deletions

View File

@ -47,9 +47,18 @@ int mPlayerIndex;
int AlliesScore;
int AxisScore;
#ifdef FORWARD_OLD_SYSTEM
Forward g_death_info;
Forward g_damage_info;
#else
int iFDamage;
int iFDeath;
#endif
int gmsgCurWeapon;
int gmsgHealth;
int gmsgResetHUD;
@ -164,9 +173,13 @@ void ServerDeactivate() {
g_rank.saveRank( MF_BuildPathname("%s",get_localinfo("dodstats") ) );
#ifdef FORWARD_OLD_SYSTEM
g_damage_info.clear();
g_death_info.clear();
#endif
// clear custom weapons info
for ( i=DODMAX_WEAPONS-DODMAX_CUSTOMWPNS;i<DODMAX_WEAPONS;i++)
weaponData[i].needcheck = false;
@ -373,3 +386,13 @@ void OnAmxxDetach() {
g_grenades.clear();
g_rank.unloadCalc();
}
#ifndef FORWARD_OLD_SYSTEM
void OnPluginsLoaded(){
iFDeath = MF_RegisterForward("client_death",ET_IGNORE,FP_CELL,FP_CELL,FP_CELL,FP_CELL,FP_CELL,FP_DONE);
iFDamage = MF_RegisterForward("client_damage",ET_IGNORE,FP_CELL,FP_CELL,FP_CELL,FP_CELL,FP_CELL,FP_CELL,FP_DONE);
}
#endif