mirror of
https://github.com/ReactionQuake3/reaction.git
synced 2024-11-11 07:42:15 +00:00
Added debugging to help find what was going with can't find item for weapon
error that crash the server.
This commit is contained in:
parent
874c6c7119
commit
05eeb448ce
3 changed files with 26 additions and 0 deletions
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 );
|
||||
|
|
Loading…
Reference in a new issue