diff --git a/reaction/game/bg_misc.c b/reaction/game/bg_misc.c index 8485ea0d..1b8b6662 100644 --- a/reaction/game/bg_misc.c +++ b/reaction/game/bg_misc.c @@ -5,6 +5,10 @@ //----------------------------------------------------------------------------- // // $Log$ +// Revision 1.29 2002/02/23 16:55:09 jbravo +// Added debugging to help find what was going with can't find item for weapon +// error that crash the server. +// // Revision 1.28 2002/01/24 14:20:53 jbravo // Adding func_explosive and a few new surfaceparms // @@ -886,6 +890,14 @@ BG_FindItemForWeapon gitem_t *BG_FindItemForWeapon( weapon_t weapon ) { gitem_t *it; +// JBravo: adding debugging messages. + if (weapon > 10) { + Com_Printf("The server will most likly crash now.\n"); + Com_Printf("If you see this message, write down what was happening\n"); + Com_Printf("and let JBravo know about it.\n"); + Com_Printf("in BG_FindItemForWeapon: weapon is %i.\n", weapon); + } + for ( it = bg_itemlist + 1 ; it->classname ; it++) { if ( it->giType == IT_WEAPON && it->giTag == weapon ) { return it; diff --git a/reaction/game/g_active.c b/reaction/game/g_active.c index 221d0360..0c14f74d 100644 --- a/reaction/game/g_active.c +++ b/reaction/game/g_active.c @@ -5,6 +5,10 @@ //----------------------------------------------------------------------------- // // $Log$ +// Revision 1.54 2002/02/23 16:55:09 jbravo +// Added debugging to help find what was going with can't find item for weapon +// error that crash the server. +// // Revision 1.53 2002/02/22 02:13:13 jbravo // Fixed a few bugs and did some cleanups // @@ -1065,6 +1069,9 @@ int ThrowWeapon( gentity_t *ent, qboolean forceThrow ) weap = client->ps.weapon; } +// JBravo: adding debugging messages. + G_Printf("in ThrowWeapon: weapon is %i\n", weap); + xr_item = BG_FindItemForWeapon( weap ); //Elder: Send a server command instead of force-setting diff --git a/reaction/game/g_misc.c b/reaction/game/g_misc.c index 769415cc..e62a3515 100644 --- a/reaction/game/g_misc.c +++ b/reaction/game/g_misc.c @@ -5,6 +5,10 @@ //----------------------------------------------------------------------------- // // $Log$ +// Revision 1.21 2002/02/23 16:55:09 jbravo +// Added debugging to help find what was going with can't find item for weapon +// error that crash the server. +// // Revision 1.20 2002/02/08 18:00:34 jbravo // Fixing "No newline at end of file" Warnings Linux keeps giving me // @@ -355,6 +359,9 @@ void InitShooter( gentity_t *ent, int weapon ) { ent->use = Use_Shooter; ent->s.weapon = weapon; +// JBravo: adding debugging messages. + G_Printf("in InitShooter: weapon is %i\n", weapon); + RegisterItem( BG_FindItemForWeapon( weapon ) ); G_SetMovedir( ent->s.angles, ent->movedir );