diff options
author | James Haley | 2010-09-10 04:12:08 +0000 |
---|---|---|
committer | James Haley | 2010-09-10 04:12:08 +0000 |
commit | d086fa7b7e200a86ada6b482a616b02f4eb1e77b (patch) | |
tree | 184e450d327bcf49c75cce3f036cd7119676c8b4 /src/strife/p_pspr.c | |
parent | 15fdcbbe5899bde4831d100db63117ba2c00a4dd (diff) | |
download | chocolate-doom-d086fa7b7e200a86ada6b482a616b02f4eb1e77b.tar.gz chocolate-doom-d086fa7b7e200a86ada6b482a616b02f4eb1e77b.tar.bz2 chocolate-doom-d086fa7b7e200a86ada6b482a616b02f4eb1e77b.zip |
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
Diffstat (limited to 'src/strife/p_pspr.c')
-rw-r--r-- | src/strife/p_pspr.c | 23 |
1 files changed, 13 insertions, 10 deletions
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); } |