Khaos 
Master
 
Posts: 595
Likes Given: 166
Likes Received: 83 in 51 posts
Joined: Mar 2012
Reputation: 11
![]()
|
RE: Swing swinging at record of the fight + source
(02-18-2016 02:06 AM)Coruja Wrote: honestly I think that "pre-swing-delay" is a bug instead feature. Probably it happens on 51a because old codes are somewhat weird, where the client send the attack request to server, the server receive this request, but will only start the action on next server tick after ~1s (which is not correct, because the server must start the action immediately instead wait for the next tick)
the current internal code (even using legacy formulas) is much more accurate, reliable, optimized and customizable compared to the code from 15 years ago, so copy the old behavior is like take a step backward. Instead, you can use the new code and just tweak the animation/swing delay, like this
Code:
//total swing delay is 7.4s, where the animation/damage occour in 5.0s and waiting the rest of the 2.4s
ON=@HitTry
LOCAL.AnimDelay=50
ARGN1=74
or
Code:
//animation/damage will always be the same of the total swing delay, with no waiting delay
ON=@HitTry
LOCAL.AnimDelay=<ARGN1>
etc
PS: ARGN1 will override the internal swing speed formula (CombatSpeedEra) allowing you to use a custom formula. Also if you don't set LOCAL.AnimDelay it will be 7 by default
Which was a precise point I was making, that the @HitTry and <Argn1> can completely rewrite his own system.
The only thing I am wondering is, was it a bug back in the day?! I mean OSI ran it the same way if I remember right. I think it was just their feature and then EA/Mythic changed it. Either way, it can be redone in @HitTry.
Gunther, I do not suggest adding a lot to the source. You could do this with soft code, which the source actually reads very fast and is made for the soft code overrides. Hence why Sphere you can do just about anything with. Our goals were to put most of the source we could into scripts to make less work on the server processing. Script code is as lightweight as the user makes it.
Just add that local.animdelay=14 to @HitTry if you want it on every fight swing and add it to skillclass 0 or a player event. That would give you that delay on every weapon.
I mean really, you could just do:
Code:
on=@HitTry
local.animdelay=14
argn1=<src.findlayer.layer_hand1.uid.speed>
return 0
This will give you the 1.4 second hit and whatever time is left for the wait.
(This post was last modified: 02-18-2016 06:45 AM by Khaos.)
|
|
02-18-2016 06:44 AM |
|
|