[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 28, Wed Nov 21 18:04:40 2007 UTC revision 46, Sat Feb 19 21:36:22 2011 UTC
# Line 1  Line 1 
1  /*  /*
2  Grab+ v1.2.3  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 95  Line 95 
95  French (100%) - Thanks to connorr  French (100%) - Thanks to connorr
96  German (100%) - Thanks to SchlumPF*  German (100%) - Thanks to SchlumPF*
97  Russian (100%) - Thanks to `666  Russian (100%) - Thanks to `666
98  Spanish (100%) - Hope these don't suck.  Spanish (100%) - Thanks to RenXO
99  Swedish (100%) - Thanks to Bend3r  Swedish (100%) - Thanks to Bend3r
100    
101    
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)
110    f: Killing player with choke in some mods bugged out really bad.
111    
112  v1.2.3 (Nov 21, 2007)  v1.2.3 (Nov 21, 2007)
113  c: A few more small optimizations.  c: A few more small optimizations.
114  f: Bloodstream for choke wasn't aligned with player.  f: Bloodstream for choke wasn't aligned with player.
# Line 134  Line 141 
141  #include <amxmisc>  #include <amxmisc>
142  #include <fakemeta>  #include <fakemeta>
143    
144  new const VERSION[ ] = "1.2.3"  new const VERSION[ ] = "1.2.4b1"
145  new const TRKCVAR[ ] = "grab_plus_version"  new const TRKCVAR[ ] = "grab_plus_version"
146  #define ADMIN ADMIN_LEVEL_A  #define ADMIN ADMIN_LEVEL_A
147    
# Line 148  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 545  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          set_pev( target, pev_health, float( health ) )          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 {
563          emit_sound( target, CHAN_BODY, "player/PL_PAIN2.WAV", VOL_NORM, ATTN_NORM, 0, PITCH_NORM )                  set_pev( target, pev_health, health )
564                    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
570          set_task( get_pcvar_float( p_choke_time ), "clear_no_choke", TSK_CHKE + id )          set_task( get_pcvar_float( p_choke_time ), "clear_no_choke", TSK_CHKE + id )

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

Contact
ViewVC Help
Powered by ViewVC 1.0.4