[Half-Life AMXX] / grab_plus.sma Repository:
ViewVC logotype

Diff of /grab_plus.sma

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 45, Sat Oct 16 23:55:40 2010 UTC revision 46, Sat Feb 19 21:36:22 2011 UTC
# Line 1  Line 1 
1  /*  /*
2  Grab+ v1.2.4  Grab+ v1.2.5
3  Copyright (C) 2007 Ian (Juan) Cammarata  Copyright (C) 2011 Ian (Juan) Cammarata
4    
5  This program is free software: you can redistribute it and/or modify  This program is free software: you can redistribute it and/or modify
6  it under the terms of the GNU Affero General Public License as  it under the terms of the GNU Affero General Public License as
# Line 17  Line 17 
17  --------------------------------------------------------------------------------  --------------------------------------------------------------------------------
18    
19  http://ian.cammarata.us/projects/grab_plus  http://ian.cammarata.us/projects/grab_plus
20  Nov 21 11:03  ?19 ?February, ?2011
21    
22    
23  Description:  Description:
# Line 102  Line 102 
102  Change Log:  Change Log:
103  Key (+ added | - removed | c changed | f fixed)  Key (+ added | - removed | c changed | f fixed)
104    
105    v1.2.5 (Feb 19, 2011)
106    f: Applied fix mailed to me on Allied Modders site several years ago.  (Maybe I should sign up for new mail notifications.)
107    Thanks to ConnorMcLeod
108    
109  v1.2.4 (Feb 18, 2007)  v1.2.4 (Feb 18, 2007)
110  f: Killing player with choke in some mods bugged out really bad.  f: Killing player with choke in some mods bugged out really bad.
111    
# Line 151  Line 155 
155  #define GRAB_LEN 2  #define GRAB_LEN 2
156  #define FLAGS    3  #define FLAGS    3
157    
158    #define m_bitsDamageType 76
159    
160  #define CDF_IN_PUSH   (1<<0)  #define CDF_IN_PUSH   (1<<0)
161  #define CDF_IN_PULL   (1<<1)  #define CDF_IN_PULL   (1<<1)
162  #define CDF_NO_CHOKE  (1<<2)  #define CDF_NO_CHOKE  (1<<2)
# Line 548  Line 554 
554          write_byte( random_num( 50, 250 ) ) //speed          write_byte( random_num( 50, 250 ) ) //speed
555          message_end( )          message_end( )
556    
557          new health = pev( target, pev_health ) - dmg          //Thanks to ConnorMcLeod for making this block of code more proper
558            new Float:health
559            pev( target, pev_health , health)
560            health -= dmg
561          if( health < 1 ) dllfunc( DLLFunc_ClientKill, target )          if( health < 1 ) dllfunc( DLLFunc_ClientKill, target )
562          else {          else {
563                  set_pev( target, pev_health, float( health ) )                  set_pev( target, pev_health, health )
564                  emit_sound( target, CHAN_BODY, "player/PL_PAIN2.WAV", VOL_NORM, ATTN_NORM, 0, PITCH_NORM )                  set_pdata_int(target, m_bitsDamageType, DMG_CRUSH) // m_bitsDamageType = 76 // found by VEN
565                    set_pev(target, pev_dmg_take, dmg)
566                    set_pev(target, pev_dmg_inflictor, id)
567          }          }
568    
569          client_data[id][FLAGS] ^= CDF_NO_CHOKE          client_data[id][FLAGS] ^= CDF_NO_CHOKE

Legend:
Removed from v.45  
changed lines
  Added in v.46

Contact
ViewVC Help
Powered by ViewVC 1.0.4