Jump to content

Home

otherKillerDebounceTime and Character Bouncing


razorace

Recommended Posts

What the heck does the ps.otherKillerDebounceTime value do? It seems to be involved in controlling the character bouncing after receiving knockback or other effects that can cause you to get killed by a map effect by another player.

 

However, I can't seem to find where it is handled by the code. All I see is things setting this value.

 

As such this appears to be something handled at a level lower than what we have code for.

 

Could someone please explain how and where this value is handled?

Link to comment
Share on other sites

I'm pretty sure it's not that. There's a different timer for movement restriction during a knockdown. Check out the following... (I've added my own comments to the code. :)

//Player Bounce Control?

 

 

The $10,000 question is "where/why is this used?"

 

On second thought (combined with tireness. :), thinking about it, this doesn't seem to be directly related to bouncing. If it was, it would be referenced somewhere else AND not be controlled in the ClientThink function (where physic sync problems would occur if otherKillerDebounceTime related to bounce calucations.)

 

Best guess: It's simply a funky way for terminating the otherKiller "flag" on impact. See, you don't want it to simple terminate on impact (if(ent->client->ps.groundEntityNum == ENTITYNUM_NONE) because it’s possible that a character for to bounce off the ground over the edge of a cliff (Basically a trick shot in the world of JK2 J So, the coders added some code that makes the otherKiller set never terminate unless you spend more than 100 time units on the ground. It’s confusing for a outsider but makes perfect sense once you understand the goal of the code. God, I wish we had some better code documentation for this MP source code.

 

Anyway, that means I figured it out. :) ASk, thanks for poking my brain into the general direction of the answer. :)

 

Razor Ace

Link to comment
Share on other sites

Originally posted by razorace

God, I wish we had some better code documentation for this MP source code.

if they had to describe all the vars ,functions and structures then the mp code woulddn't be out yet :)

 

just continue to read the code and look in all the files for 'ps.otherKillerDebounceTime'

or ps->otherKillerDebounceTime

or just otherKillerDebounceTime

 

and when you find all functions that use it you will understand what it is used for ....

 

good luck

Link to comment
Share on other sites

So ... you're volunteering to ... read the code ... index it ... and ... annotate it?

 

I can imagine that other coders are making notes on what their favorite files/functions do, or maybe they just know, by some godly gift of being able to see the code clearly ...

 

Anyway, I don't see nearly enough people interested in coding, maybe something like a JK2 version of Code3Arena would be nice.

Link to comment
Share on other sites

Look I'm making one I've written 8 of 10 tutorials, I want to have a decent amount to launch the site.

 

Right now I have one on the:

class system and vars.

locational damage

hud

1st person model postioning

Cloak

server side instagib

adding a new weapon

adding a new command

 

I'll give you the url in a few days.

Link to comment
Share on other sites

From what I've seen in the code, anything called "debounce"-anything is a value used to delay the same event happening again for a certain period. There's several references to a forceDebounceTime which forces you to wait a second or so after using, say, Push or Pull.

 

The one that you cite sounds like it keeps multiple "x killed you" messages from happening. May have something to do with allowing for lag in such cases.

 

BTW, razorace, I've got you in my icq now. I'll contact you as soon as I get some time away from my 3.0 dev cycle.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...