From 512a7008aba70884e90cfcbadb0c048b988cb066 Mon Sep 17 00:00:00 2001 From: Victor Chow Date: Sat, 28 Jul 2001 18:28:34 +0000 Subject: [PATCH] Elder: Last batch of updated for the 0-06-00 VMs Note: Kevlar is still messed up --- reaction/game/bg_pmove.c | 5 ++++- reaction/game/g_active.c | 4 +++- reaction/game/g_cmds.c | 8 ++++++-- reaction/game/g_combat.c | 9 ++++----- reaction/game/g_items.c | 2 +- reaction/game/g_misc.c | 6 ++++-- 6 files changed, 22 insertions(+), 12 deletions(-) diff --git a/reaction/game/bg_pmove.c b/reaction/game/bg_pmove.c index 2eb4723b..c55c1983 100644 --- a/reaction/game/bg_pmove.c +++ b/reaction/game/bg_pmove.c @@ -2644,7 +2644,10 @@ void PmoveSingle (pmove_t *pmove) { PM_Weapon(); //weapon animations(rq3 specific) - PM_WeaponAnimation(); + //Elder: hack to avoid messing up fast-reloads + if (pm->ps->weapon == WP_PISTOL) + PM_WeaponAnimation(); + // torso animation PM_TorsoAnimation(); diff --git a/reaction/game/g_active.c b/reaction/game/g_active.c index 3142f96f..fbead069 100644 --- a/reaction/game/g_active.c +++ b/reaction/game/g_active.c @@ -1570,7 +1570,9 @@ void ClientEndFrame( gentity_t *ent ) { if ( bg_itemlist[ent->client->ps.stats[STAT_HOLDABLE_ITEM]].giTag == HI_LASER ) { //Disable laser if switching weapons, bandaging, etc. - if (ent->client->lasersight && ent->client->ps.weaponstate == WEAPON_DROPPING) + if (ent->client->lasersight && + (ent->client->ps.weaponstate == WEAPON_DROPPING || + ent->client->ps.weaponstate == WEAPON_RELOADING)) { Laser_Gen(ent, qfalse); } diff --git a/reaction/game/g_cmds.c b/reaction/game/g_cmds.c index 3330fd27..01df81a7 100644 --- a/reaction/game/g_cmds.c +++ b/reaction/game/g_cmds.c @@ -1992,8 +1992,12 @@ void Cmd_Reload( gentity_t *ent ) { //ent->client->ps.weaponstate = WEAPON_RELOADING; ent->client->ps.weaponstate = WEAPON_RELOADING; - //ent->client->ps.torsoAnim = ( ( ent->client->ps.torsoAnim & ANIM_TOGGLEBIT ) - // ^ ANIM_TOGGLEBIT ) | TORSO_DROP; + //Elder: temporary hack to drop weapon if it's not the MK23 + if (ent->client->ps.weapon != WP_PISTOL) + { + ent->client->ps.torsoAnim = ( ( ent->client->ps.torsoAnim & ANIM_TOGGLEBIT ) + ^ ANIM_TOGGLEBIT ) | TORSO_DROP; + } ent->client->ps.weaponTime += delay; //Elder: at this point there should be sufficient ammo requirements to reload diff --git a/reaction/game/g_combat.c b/reaction/game/g_combat.c index 47a38c07..f49aabfe 100644 --- a/reaction/game/g_combat.c +++ b/reaction/game/g_combat.c @@ -1662,31 +1662,30 @@ void G_Damage( gentity_t *targ, gentity_t *inflictor, gentity_t *attacker, //Vest stuff if (bg_itemlist[targ->client->ps.stats[STAT_HOLDABLE_ITEM]].giTag == HI_KEVLAR) { - //if ((attacker->client->ps.stats[STAT_WEAPONS] & (1 << WP_SSG3000)) == (1 << WP_SSG3000)) if (attacker->client->ps.weapon == WP_SSG3000) - { trap_SendServerCommand(attacker-g_entities, va("print \"%s has a Kevlar Vest, too bad you have AP rounds...\n\"",targ->client->pers.netname)); + { + trap_SendServerCommand(attacker-g_entities, va("print \"%s has a Kevlar Vest, too bad you have AP rounds...\n\"",targ->client->pers.netname)); trap_SendServerCommand(targ-g_entities, va("print \"Kevlar Vest absorbed some of %s's AP sniper round\n\"",attacker->client->pers.netname)); take = take * 0.325; - } else { trap_SendServerCommand( attacker-g_entities, va("print \"%s^7 has a Kevlar Vest - AIM FOR THE HEAD!\n\"", targ->client->pers.netname)); trap_SendServerCommand( targ-g_entities, va("print \"Kevlar Vest absorbed most of %s shot\n\"", attacker->client->pers.netname )); take = take/10; + instant_dam = 1; bleeding = 0; } //Elder: flag for sound in feedback targ->client->damage_vest = qtrue; - break; } else { trap_SendServerCommand( attacker-g_entities, va("print \"You hit %s^7 in the chest.\n\"", targ->client->pers.netname)); trap_SendServerCommand( targ-g_entities, va("print \"Chest Damage.\n\"")); take *= 0.65; - break; } + break; } case (LOCATION_STOMACH): { diff --git a/reaction/game/g_items.c b/reaction/game/g_items.c index 9675bad5..d412d54d 100644 --- a/reaction/game/g_items.c +++ b/reaction/game/g_items.c @@ -1583,7 +1583,7 @@ void RQ3_DroppedItemThink(gentity_t *ent) { rq3_temp = (gentity_t*)SelectRandomDeathmatchSpawnPoint(); G_FreeEntity(ent); Drop_Item (rq3_temp, rq3_item, angle); - G_Printf("RQ3_DroppedItemThink: Freeing item entity + respawning\n"); + //G_Printf("RQ3_DroppedItemThink: Freeing item entity + respawning\n"); break; default: //Elder: shouldn't have to come here diff --git a/reaction/game/g_misc.c b/reaction/game/g_misc.c index 4a8b94c3..6d532b89 100644 --- a/reaction/game/g_misc.c +++ b/reaction/game/g_misc.c @@ -482,13 +482,12 @@ void G_BreakGlass( gentity_t *ent, vec3_t point, int mod ) //eParm should now be under 1 byte and shiftCount >= 0 //G_Printf("New eParm: %i Shifts: %i\n", eParm, shiftCount); - G_FreeEntity( ent ); - // Tell the program based on the gun if it was caused by splash damage switch( mod ) { //Elder: added + compacted case MOD_KNIFE: case MOD_KNIFE_THROWN: + case MOD_MP5: case MOD_M4: case MOD_M3: case MOD_PISTOL: @@ -506,7 +505,10 @@ void G_BreakGlass( gentity_t *ent, vec3_t point, int mod ) VectorScale(size, 0.5, size); VectorAdd(ent->r.mins, size, impactPoint); break; + } + + G_FreeEntity( ent ); switch ( shiftCount ) {