From 6e3fdbdfc8ded67aaa77728939b46ae6b49c2c07 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 29 Aug 2009 15:50:03 +0000 Subject: [PATCH] - fixed: Switching a weapon did not reset the refire counter. SVN r1776 (trunk) --- src/g_shared/a_weapons.cpp | 1 + src/p_pspr.cpp | 1 + src/thingdef/thingdef_codeptr.cpp | 6 ------ 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/g_shared/a_weapons.cpp b/src/g_shared/a_weapons.cpp index d4fb4ec5c..06553696b 100644 --- a/src/g_shared/a_weapons.cpp +++ b/src/g_shared/a_weapons.cpp @@ -520,6 +520,7 @@ void AWeapon::PostMorphWeapon () Owner->player->PendingWeapon = WP_NOCHANGE; Owner->player->ReadyWeapon = this; Owner->player->psprites[ps_weapon].sy = WEAPONBOTTOM; + Owner->player->refire = 0; P_SetPsprite (Owner->player, ps_weapon, GetUpState()); } diff --git a/src/p_pspr.cpp b/src/p_pspr.cpp index 03ba4cd57..4eb8b7d3e 100644 --- a/src/p_pspr.cpp +++ b/src/p_pspr.cpp @@ -186,6 +186,7 @@ void P_BringUpWeapon (player_t *player) S_Sound (player->mo, CHAN_WEAPON, weapon->UpSound, 1, ATTN_NORM); } newstate = weapon->GetUpState (); + player->refire = 0; } else { diff --git a/src/thingdef/thingdef_codeptr.cpp b/src/thingdef/thingdef_codeptr.cpp index b59cb6c92..f10e961b9 100644 --- a/src/thingdef/thingdef_codeptr.cpp +++ b/src/thingdef/thingdef_codeptr.cpp @@ -1581,12 +1581,6 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_ThrowGrenade) bo->velx += self->velx >> 1; bo->vely += self->vely >> 1; bo->target= self; - if (bo->flags4&MF4_RANDOMIZE) - { - bo->tics -= pr_grenade() & 3; - if (bo->tics < 1) - bo->tics = 1; - } P_CheckMissileSpawn (bo); } else ACTION_SET_RESULT(false);