-
Notifications
You must be signed in to change notification settings - Fork 48
Gladiator changes
In vanilla Gunz, the data used for hit registration math is collected 150 milliseconds before the actual, visible impact. Since ground and aerial massives take 450 and 350 ms, respectively, between pressing Attack to when it actually goes off, the hit registration acts as though it occurs at 300 and 200 ms, although with the impact delayed.
The effect of this is that the massive range appears to expand and contract as you move further away and closer before the impact, respectively. For instance, moving away from someone throwing a ground massive makes the range seem larger than normal, and throwing an aerial massive forwards after dashing makes it appear smaller. However, when standing still, everything seems normal. This effect is amplified even further when both players are moving.
This also applies to the angle: If you stand in front of someone doing a forwards block, turn around 180 (so you are facing away), throw a massive, and turn 180 back around just before it goes off, the massive appears to be a forwards massive based on the massiver's angle, but acts like a reverse massive: The person blocking will get hit.
The old position used for the distance math is reflected in the position of the massive effect. This is very visible on Freestyle Gunz, where their custom massive effect is a lightning, striking straight down on where you are throwing it, and you can easily see that the massive is in the wrong place by dashing forwards, throwing an aerial massive, and looking at where the lightning is.
On the other hand, the old direction used is not visible in the effect: The 180 massive trick described earlier, with the standard yellow massive, will appear to be thrown forwards.
Despite the position used for the victim being the old one, the direction used for the victim is current. Whether they're blocking or evading (via i-frames) is also current.
All this information is summarized below:
Name | Value | Indicator |
---|---|---|
Attacker's position | 150 ms old | Visible in massive effect position |
Attacker's direction | 150 ms old | Misleading current direction is used with massive effect |
Victim's position | 150 ms old | No indication |
Victim's direction | Current | No indication |
Victim's blocking state | Current | No indication |
Victim's evasion state | Current | No indication |
In Refined Gunz, everything works as you'd expect: The massive's position and direction is exactly where the massiver is when they throw it, and the position and direction of the victim is exactly where they are when the massive goes off on their screen.
The damage of massives scales linearly with distance, between a ratio of 0.9 and 3.0, which is multiplied by the sword damage. For instance, with Freestyle Gunz's 18 damage rusty sword, a massive does 16 damage at maximum range, and 54 at minimum range.
The distance used is between two points on each player. However, the points aren't in the same place on each player. The massiver's point is at their position/origin, whereas the victim's point is at their origin plus 80 units on the Z axis. The result of this is that the max damage massive is achieved only when the massiver is jumping and the victim is on the ground. Also note that the above information about the displaced/old position applies here too.
The range is a fixed 300 units, irrespective of weapon type or zitem.xml stats.
The damage scales with distance just like before. However, the ratios have been changed to 0.9 to 1.5, to make the damage less variable and more consistent.
Distance is now calculated the same way it is for slashes: It takes the massiver's origin + (0, 0, 180 / 2), and takes the distance from that point to a line segment going from victim origin to victim origin + (0, 0, 180). (The magic 180 value used is the height of the collision cylinder, which is just slightly taller than a standing player.)
The range is a fixed 280 units.
When pressing the Attack key with a sword, the slash happens 100 ms after the actuation, and the recoil check happens 100 ms after that. So, actuation happens at t + 0 ms, slash at t + 100 ms, and recoil check at t + 200 ms.
At the recoil check, you will recoil if, at that point, the following are true for any other player:
- They are in one of the block animations that can recoil (guard_idle, guard_block1, guard_block1_ret, and guard_block2, code)
- They are less than roughly 200 units away (, code)
where apos
is the attacker's position, adir
is the attacker's direction, and tpos
is the target's position
- The angle between your direction and the direction towards the other player is less than 84.26 degrees (code)
- The angle between your direction and their direction is above 90 degrees (code)
There are many strange consequences for this.
For one, you can not only recoil without hitting the other player's block, you can recoil without hitting them at all. That is, you can recoil when missing the slash completely or when hitting their back.
To demonstrate the first, have the blocker to turn around, holding their back to the attacker, and looking all the way upwards while holding block. The attacker then hits their back while looking slightly downwards. The attacker will always recoil.
To demonstrate the second, have the blocker look forwards and slightly upwards and the attacker look away and all the way downwards.
At low ping (less than 50), the combination of 1) the low basicinfo rate in vanilla Gunz, 2) the fact that slashes cancel a held block, and 3) that you must be in a recoilable block animation at point of the recoil check, not at the point of the slash, means that "normal" recoils become random.
A simple example is a position with both players looking at each other, no vertical angles or movement, and one blocks and the other jumps and slashes. At around 25 ping, the inconsistency will be obvious: Recoils will happen around half of the time. (In general, the probability is ping/50.)
However, this only happens when the blocker registers that their block got hit and cancelled. If the blocker is moving around enough that they don't, or if you're in one of the positions described earlier where you're not hitting their block at all, it will be consistent.
Because the condition that checks whether you're facing them takes the vertical component into account, the effectiveness of vertical angles end up depending on height. If you're below the other player, ground angles are unrecoilable, and if you're above the other player, sky angles are unrecoilable. If you're at the same height (e.g. both on ground), both are unrecoilable. This means that, on even ground, ground slashes while looking all the way down, and high aerial slashes while looking up, are both always unrecoilable.
Conversely, a fully downwards angle when you're above them, or a full upwards angle when below, will always be recoiled by blocking angles over and under perfect stance, respectively. This holds irrespective of either player's horizontal angles (which is why the earlier example of weird recoils work).
Also, the angles involved in recoiling and slashing are not the same at all, which means there are several strange points where you can be very close to the other player (i.e. distinctly not tipslashing), and either hit them without ever recoiling, or miss them completely but always recoil.
The new recoil check has the following conditions:
- When slashing, you must have hit the other player's block, and they must have been in one of the recoilable block animations.
- They are less than 240 units away. Distance is calculated the same way as it is for slashes.
- Your horizontal direction is within 60 degrees of the horizontal direction towards the other player
- The angle between your direction and their direction is above 90 degrees
Since you have to hit their block, you can't recoil when hitting someone's back or when missing. Since they must be in a recoilable animation only when they're slashed, it's consistent at all pings.
Since the third condition that checks whether you're facing them only takes the horizontal components of the directions into account, vertical angles are unaffected by height, and are never uncounterable.
The third conditions angle (60 degrees) is also the same as the angle of the slash sector, meaning that there are no weird spots where you can slash and never recoil, or miss and always recoil. Also, horizontally turning to avoid recoil works exactly when you've turned enough that your slash wouldn't hit them anymore.
You will hit someone with a slash if:
- (code)
where dist(a, b, c)
returns the distance between a point at a
and a line segment between b
and c
, r
is the range for the weapon in zitem.xml (usually 220 for katanas and kodachi), and ahdir
is the attacker's horizontal direction
- (code)
When both at same height, the resultant hurtbox looks like this from top-down:
where red is within the hurtbox, green is outside, the white dot is the origin, and the gray circle is the periphery of the collision hitbox.
This is very asymmetrical: Your range increases as you look more towards someone, and the angle at which you can hit people increases the closer you are.
You will hit someone with a slash if:
The hitbox would now just look like a 120 degree circular sector with radius 320.
The range is the same at all angles, and the angle never changes with distance. However, the angle is also notably lower.
In vanilla Gunz, your vertical angle isn't outwardly visible in your animation if you're not in the idle or running animations. In Refined Gunz, it's always visible.
In vanilla Gunz, the weapon's zitem.xml range value is used when checking if you hit a wall. This means you have less range against walls than you do againat actual players. In Refined Gunz, it used the range + 100, the same as the hitbox radius used with players.
All of the melee attacks have the additional, unmentioned condition of requiring the target to be visible and not occluded by a wall. This doesn't seem notable, but it is, because the vanilla check for this was buggy, causing the invulnerability frame mechanic. Whether the buggy check that enables i-frames or the correct check that does not is used is dependent on a stage option in Refined Gunz.