Permalink
Browse files

passEntityNum must not < 0

Selling a weapon was leaving weapon in players hands.
  • Loading branch information...
Victor Roemer Victor Roemer
Victor Roemer authored and Victor Roemer committed Jun 12, 2016
1 parent 87abdd9 commit 053785b75c17058fd6887ba1d3f018821bbe3655
Showing with 2 additions and 2 deletions.
  1. +1 −1 src/game/g_buildable.c
  2. +1 −1 src/game/g_cmds.c
View
@@ -100,7 +100,7 @@ gentity_t *G_CheckSpawnPoint( int spawnNum, const vec3_t origin,
if( tr.entityNum != ENTITYNUM_NONE )
return &g_entities[ tr.entityNum ];
trap_Trace( &tr, localOrigin, cmins, cmaxs, localOrigin, -1, MASK_PLAYERSOLID );
trap_Trace( &tr, localOrigin, cmins, cmaxs, localOrigin, ENTITYNUM_NONE, MASK_PLAYERSOLID );
if( tr.entityNum != ENTITYNUM_NONE )
return &g_entities[ tr.entityNum ];
View
@@ -2311,7 +2311,7 @@ void Cmd_Sell_f( gentity_t *ent )
//if we have this weapon selected, force a new selection
if( weapon == selected )
G_ForceWeaponChange( ent, WP_NONE );
G_ForceWeaponChange( ent, WP_BLASTER );
}
else if( upgrade != UP_NONE )
{

0 comments on commit 053785b

Please sign in to comment.