banimod / etpro / ettv forums Forum Index banimod / etpro / ettv forums
Bani's Discussion Forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

BUGFIX: self-headshot when prone

 
Post new topic   Reply to topic    banimod / etpro / ettv forums Forum Index -> ET Modding
View previous topic :: View next topic  
Author Message
bani
Site Admin


Joined: 21 Jul 2002
Posts: 3685

PostPosted: Sun Apr 25, 2004 8:14 pm    Post subject: BUGFIX: self-headshot when prone Reply with quote

g_weapon.c:

Code:

qboolean Bullet_Fire_Extended(gentity_t *source, gentity_t *attacker, vec3_t start, vec3_t end, float spread, int damage, qboolean distance_falloff) {
        trace_t         tr;
        gentity_t       *tent;
        gentity_t       *traceEnt;
        qboolean hitClient = qfalse;

        qboolean reducedDamage = qfalse;

        G_HistoricalTrace(source, &tr, start, NULL, NULL, end, source->s.number, MASK_SHOT);

        // bullet debugging using Q3A's railtrail


change it to:

Code:

qboolean Bullet_Fire_Extended(gentity_t *source, gentity_t *attacker, vec3_t start, vec3_t end, float spread, int damage, qboolean distance_falloff) {
        trace_t         tr;
        gentity_t       *tent;
        gentity_t       *traceEnt;
        qboolean hitClient = qfalse;

        qboolean reducedDamage = qfalse;

        qboolean waslinked = qfalse;

        //bani - prevent shooting ourselves in the head when prone, firing through a breakable
        if( g_entities[ attacker->s.number ].client && g_entities[ attacker->s.number ].r.linked ==
qtrue ) {
                g_entities[ attacker->s.number ].r.linked = qfalse;
                waslinked = qtrue;
        }

        G_HistoricalTrace(source, &tr, start, NULL, NULL, end, source->s.number, MASK_SHOT);

        //bani - prevent shooting ourselves in the head when prone, firing through a breakable
        if( waslinked == qtrue ) {
                g_entities[ attacker->s.number ].r.linked = qtrue;
        }

        // bullet debugging using Q3A's railtrail
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    banimod / etpro / ettv forums Forum Index -> ET Modding All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group