From d086fa7b7e200a86ada6b482a616b02f4eb1e77b Mon Sep 17 00:00:00 2001 From: James Haley Date: Fri, 10 Sep 2010 04:12:08 +0000 Subject: Changed MELEERANGE back to 64 and defined a new PLAYERMELEERANGE to be 80. Fixed P_SpawnPuff by removing more unused DOOM code. Fixed Crusader flamethower attack bug due to a missed return statement. Subversion-branch: /branches/strife-branch Subversion-revision: 2054 --- src/strife/p_pspr.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'src/strife/p_pspr.c') diff --git a/src/strife/p_pspr.c b/src/strife/p_pspr.c index 6e2ccfad..99981739 100644 --- a/src/strife/p_pspr.c +++ b/src/strife/p_pspr.c @@ -446,17 +446,19 @@ void A_Punch(player_t* player, pspdef_t* psp) int damage; int slope; int sound; - + int t; + // villsa [STRIFE] new damage formula damage = ((player->stamina / 10) + 2) * (psp->tics + 3) & P_Random(); if(player->powers[pw_strength]) - damage *= 10; + damage *= 10; angle = player->mo->angle; - angle += (P_Random()-P_Random())<<18; - slope = P_AimLineAttack (player->mo, angle, MELEERANGE); - P_LineAttack (player->mo, angle, MELEERANGE, slope, damage); + t = P_Random(); + angle += (t - P_Random()) << 18; + slope = P_AimLineAttack (player->mo, angle, PLAYERMELEERANGE); + P_LineAttack (player->mo, angle, PLAYERMELEERANGE, slope, damage); // turn to face target if(linetarget) @@ -467,14 +469,15 @@ void A_Punch(player_t* player, pspdef_t* psp) else sound = sfx_meatht; - S_StartSound (player->mo, sound); - player->mo->angle = R_PointToAngle2 (player->mo->x, - player->mo->y, - linetarget->x, - linetarget->y); + S_StartSound (player->mo, sound); + player->mo->angle = R_PointToAngle2 (player->mo->x, + player->mo->y, + linetarget->x, + linetarget->y); // villsa [STRIFE] apply flag player->mo->flags |= MF_JUSTATTACKED; + // villsa [STRIFE] do punch alert routine P_DoPunchAlert(player->mo, linetarget); } -- cgit v1.2.3