Collision\Hit Box

Developer discussion of experimental fixes, changes, and improvements.

Moderators: Nexuiz Moderators, Moderators

Sat Aug 11, 2007 6:17 pm

  • I know this is a noob level question here, but where is the info held for the hitbox? The reason is this, I would like to see how its set up in darkplaces, and try to port some other code over to implement location damage on the player models (e.g. leg shot, head shot, etc...). After that, I'd like to try to figure out on how to add rotational forces dependent upon area of impact (e.g. spinning around some when shot in the arm or leg, possibly flipping on headshots, or falling faceward on footshot). I know it sounds crazy, but humor me. Thanks.
    Genegineer
    Advanced member
     
    Posts: 50
    Joined: Fri Nov 17, 2006 8:01 pm
    Location: East Coast, USA

Sat Aug 11, 2007 7:06 pm

  • you can to some extent firure it out by checking where on the hitbox the shot struck. i added some simplpe head/toso/leg shot checks for the mod running on the MoN server, it could be expanded more.

    i changed the FireRailgunBullet(...) function in w_common.qc like so:
    Code: Select all
          // apply the damage
          if (ent.takedamage || ent.classname == "case")
              if(ent.classname == "player") {

                    if(self.crouch)

                        f = 49 - ((hitloc_z - ent.origin_z) + 24);
                    else
                        f = 69 - ((hitloc_z - ent.origin_z) + 24);

                    if(f <= cvar("g_balance_nex_headshot_tresh")) {
                        deathtype = DEATH_HEADSHOT;
                        armor_blockpercent = armor_blockpercent * 0.5;
                        Damage (ent, self, self, bdamage * cvar("g_balance_nex_headshot_multiplier"), deathtype, hitloc, force,armor_blockpercent);
                    } else {
                        if(f >= cvar("g_balance_nex_leg_tresh")) {
                            Damage (ent, self, self, bdamage * cvar("g_balance_nex_leg_mutiplier"), deathtype, hitloc , force ,armor_blockpercent);
                        } else {
                            Damage (ent, self, self, bdamage * cvar("g_balance_nex_torso_mutiplier"), deathtype, hitloc , force ,armor_blockpercent);
                        }
                    }

                } else
    ...


    the height og the hitbox is 69 qu, not sure abt the width.
    HOF:
    <Diablo> the nex is a "game modification"
    <Diablo> quake1 never had a weapon like that.
    <Vordreller> there was no need for anything over 4GB untill Vista came along
    <Samua>]Idea: Fix it? :D
    <Samua>Lies, that only applies to other people.
    User avatar
    tZork
    tZite Admin
     
    Posts: 1337
    Joined: Tue Feb 28, 2006 6:16 pm
    Location: Halfway to somwhere else

Sun Aug 12, 2007 2:24 am

  • thx 4 the info!
    Genegineer
    Advanced member
     
    Posts: 50
    Joined: Fri Nov 17, 2006 8:01 pm
    Location: East Coast, USA



Return to Nexuiz - Development




Information
  • Who is online
  • Users browsing this forum: No registered users and 1 guest