diff options
author | Tim Angus <tim@ngus.net> | 2001-07-11 02:40:40 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2001-07-11 02:40:40 +0000 |
commit | 2ab1eefdb54b0d4a82001b3d87158d7fa876bdf4 (patch) | |
tree | 68a67c2f0f644cf87571053c28faaf8e42421842 /src | |
parent | 38095b5c02e3c9ab5cd45f817837f06b1da67ef2 (diff) |
Grabbing now works
Diffstat (limited to 'src')
-rw-r--r-- | src/game/g_active.c | 3 | ||||
-rw-r--r-- | src/game/g_local.h | 2 | ||||
-rw-r--r-- | src/game/g_weapon.c | 7 |
3 files changed, 10 insertions, 2 deletions
diff --git a/src/game/g_active.c b/src/game/g_active.c index 69007011..86dd5148 100644 --- a/src/game/g_active.c +++ b/src/game/g_active.c @@ -762,6 +762,9 @@ void ClientThink_real( gentity_t *ent ) { else client->ps.pm_type = PM_NORMAL; + if( client->ps.stats[ STAT_STATE ] & SS_GRABBED && client->lastGrabTime + 500 < level.time ) + client->ps.stats[ STAT_STATE ] &= ~SS_GRABBED; + client->ps.gravity = g_gravity.value; // set speed diff --git a/src/game/g_local.h b/src/game/g_local.h index d17dd223..2d285131 100644 --- a/src/game/g_local.h +++ b/src/game/g_local.h @@ -338,7 +338,9 @@ struct gclient_s { int lastInfestTime; //TA: to keep track of how long infests take gentity_t *infestBody; //TA: body that is being infested. must be persistant + int lastPoisonTime; + int lastGrabTime; //TA: yuck yuck hack urgh }; #define MAX_LOCDAMAGE_TEXT 8192 diff --git a/src/game/g_weapon.c b/src/game/g_weapon.c index 8684574c..1179ce3e 100644 --- a/src/game/g_weapon.c +++ b/src/game/g_weapon.c @@ -651,7 +651,7 @@ qboolean CheckVenomAttack( gentity_t *ent ) if( traceEnt->client->ps.stats[ STAT_PTEAM ] == PTE_DROIDS ) return qfalse; - G_Damage( traceEnt, ent, ent, forward, tr.endpos, 5, 0, MOD_VENOM ); + G_Damage( traceEnt, ent, ent, forward, tr.endpos, 5, DAMAGE_NO_KNOCKBACK, MOD_VENOM ); if( traceEnt->client ) { if( !( traceEnt->client->ps.stats[ STAT_STATE ] & SS_POISONED ) ) @@ -716,7 +716,7 @@ void Weapon_CSaw_Fire( gentity_t *ent ) } if ( traceEnt->takedamage ) - G_Damage( traceEnt, ent, ent, forward, tr.endpos, 5, 0, MOD_VENOM ); + G_Damage( traceEnt, ent, ent, forward, tr.endpos, 5, DAMAGE_NO_KNOCKBACK, MOD_VENOM ); } /* @@ -755,6 +755,8 @@ void Weapon_Grab_Fire( gentity_t *ent ) if( traceEnt->client ) { //lock client + traceEnt->client->ps.stats[ STAT_STATE ] |= SS_GRABBED; + traceEnt->client->lastGrabTime = level.time; } } @@ -911,6 +913,7 @@ void FireWeapon2( gentity_t *ent ) Weapon_Venom_Fire( ent ); break; case WP_GRABANDCSAW: + Weapon_Grab_Fire( ent ); break; case WP_DBUILD: Weapon_Abuild_Fire( ent ); |