diff options
author | Tim Angus <tim@ngus.net> | 2005-08-05 02:09:00 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2005-08-05 02:09:00 +0000 |
commit | fe0d776b466a8787b0185f7683d0866891919b53 (patch) | |
tree | 496be407fb5ad8e1ba6459d0da6062425df8d7e8 /src/game | |
parent | f312c4912674b13fa07b8576f2e6c4ed96c9ec79 (diff) |
* Disabled weapon dropping after buying ammo for now
* Basilisk now loosens grip if getting damaged
Diffstat (limited to 'src/game')
-rw-r--r-- | src/game/bg_pmove.c | 2 | ||||
-rw-r--r-- | src/game/g_cmds.c | 5 | ||||
-rw-r--r-- | src/game/g_weapon.c | 5 |
3 files changed, 8 insertions, 4 deletions
diff --git a/src/game/bg_pmove.c b/src/game/bg_pmove.c index 4f48592f..b28366be 100644 --- a/src/game/bg_pmove.c +++ b/src/game/bg_pmove.c @@ -2683,7 +2683,7 @@ static void PM_Weapon( void ) pm->ps->pm_flags &= ~PMF_USE_ITEM_HELD; //something external thinks a weapon change is necessary - if( pm->ps->pm_flags & PMF_WEAPON_SWITCH ) + if( pm->ps->weapon != pm->cmd.weapon && pm->ps->pm_flags & PMF_WEAPON_SWITCH ) { pm->ps->pm_flags &= ~PMF_WEAPON_SWITCH; PM_BeginWeaponChange( pm->cmd.weapon ); diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c index abea0146..5199bd66 100644 --- a/src/game/g_cmds.c +++ b/src/game/g_cmds.c @@ -1518,8 +1518,9 @@ static void G_GiveClientMaxAmmo( gentity_t *ent, qboolean buyingEnergyAmmo ) quan, clips, maxClips ); //force a weapon change - ent->client->ps.pm_flags |= PMF_WEAPON_SWITCH; - trap_SendServerCommand( ent-g_entities, va( "weaponswitch %d", ent->client->ps.weapon ) ); + //FIXME: needs to work even if weapon is the same + //ent->client->ps.pm_flags |= PMF_WEAPON_SWITCH; + //trap_SendServerCommand( ent-g_entities, va( "weaponswitch %d", ent->client->ps.weapon ) ); } } } diff --git a/src/game/g_weapon.c b/src/game/g_weapon.c index 132bc83d..3518bb9c 100644 --- a/src/game/g_weapon.c +++ b/src/game/g_weapon.c @@ -813,7 +813,10 @@ void CheckGrabAttack( gentity_t *ent ) } traceEnt->client->ps.stats[ STAT_STATE ] |= SS_GRABBED; - traceEnt->client->lastGrabTime = level.time; + + //if getting damaged, don't reset the grab time + if( ( ent->client->lastDamageTime + ALIEN_REGEN_DAMAGE_TIME ) < level.time ) + traceEnt->client->lastGrabTime = level.time; } else if( traceEnt->s.eType == ET_BUILDABLE && traceEnt->s.modelindex == BA_H_MGTURRET ) |