Guest Redemption Posted April 10, 2017 Posted April 10, 2017 Hi, I would like to fix this since its a bit strange. Using lightning with a saber active or not, works just fine but without is a different story. The animation looks like it has a bad case of hiccups. Can anyone here help me get started with this fix? I think to begin with, would be here: wp_saber.cpp - void ForceLightning( gentity_t *self ) if ( self->client->ps.forcePowerLevel[FP_LIGHTNING] < FORCE_LEVEL_2 ) { NPC_SetAnim( self, SETANIM_TORSO, BOTH_FORCELIGHTNING, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD ); } else { NPC_SetAnim( self, SETANIM_TORSO, BOTH_FORCELIGHTNING_START, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD ); } self->client->ps.saberMove = self->client->ps.saberBounceMove = LS_READY;//don't finish whatever saber anim you may have been in self->client->ps.saberBlocked = BLOCKED_NONE; Maybe adding something like this may do it... self->client->ps.weaponTime = Q_irand( 100, 300 ); What d'you think? @@eezstreet @@redsaurus
Guest Redemption Posted April 11, 2017 Posted April 11, 2017 (edited) I've found out that you can still fire a weapon whilst using lightning, might this be the issue? Also, look at this... void ForceLightning( gentity_t *self ) { if ( self->health <= 0 ) { return; } if ( !self->s.number && (cg.zoomMode || in_camera) ) {//can't force lightning when zoomed in or in cinematic return; } The part with cg.zoomMode, I was firing lightning then, with the disruptor in my right hand, zooming in with alt-fire and shooting... Shouldn't return cancel the lightning?Anyways, if we could stop the functioning of the right hand weapon, maybe we can fix this issue. ps. Its a bug thats been shipped with the game; perhaps overlooked. Edit: Fixed this issue to void ForceLightning( gentity_t *self ) { if ( self->health <= 0 ) { return; } if ( self->client && (cg.zoomMode || in_camera) ) {//can't force lightning when zoomed in or in cinematic return; }Thought I'd share this with you @@Asgarath83 @@Noodle Edited December 1, 2017 by Redemption
eezstreet Posted April 11, 2017 Posted April 11, 2017 I have legitimately no idea what bug you're referring to. Maybe explain what you're trying to fix first?
Guest Redemption Posted April 12, 2017 Posted April 12, 2017 Are you kidding me... I've just thoroughly pointed it out pal. If its not a bug, then I'll redefine it as a f#%k up that's been overlooked by mostly everybody, it seems Equip a blaster, then fire lightning or grip, you'll see what I mean.
Guest Redemption Posted November 27, 2017 Posted November 27, 2017 Giving it a bump since its really the only bugged thing left that I want to fix atm :\ https://www.youtube.com/watch?v=vNLtCxEa5cU I'm thinking that its got something to do with this bit of code here: self->client->ps.saberMove = self->client->ps.saberBounceMove = LS_READY;//don't finish whatever saber anim you may have been in If I could add something for the other weapons, maybe this will fix it. Gonna go check grip... Edit: I fixed it. "Move along...Move along." It was a case of adding this to each weapon in bg_panimate: case WP_BRYAR_PISTOL: if (pm->ps->forcePowersActive&(1 << FP_GRIP) && pm->ps->forcePowerLevel[FP_GRIP] > FORCE_LEVEL_1) {//holding an enemy aloft with force-grip //PM_SetAnim( pm, SETANIM_TORSO, BOTH_FORCEGRIP_HOLD, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD ); return; } if (pm->ps->forcePowersActive&(1 << FP_LIGHTNING) && pm->ps->forcePowerLevel[FP_LIGHTNING] > FORCE_LEVEL_1) {//holding an enemy aloft with force-grip //PM_SetAnim( pm, SETANIM_TORSO, BOTH_FORCELIGHTNING_HOLD, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD ); return; } So... Do I get a medal for this or something?... Or "meh"... Thought I'd share this with you @@Asgarath83 @@Noodle Since you'se are decent Asgarath83 and Noodle like this
Asgarath83 Posted December 2, 2017 Posted December 2, 2017 Yes you win a medal. i know the animation override function because i used many times on my custom force power. your work is interessing. i think a day i will remove this tedious glitch also by my custom code. thanks for your work and your idea!
Guest Redemption Posted December 2, 2017 Posted December 2, 2017 @@Asgarath83 Thank you for your comment Asgarath83 likes this
Noodle Posted December 2, 2017 Posted December 2, 2017 Giving it a bump since its really the only bugged thing left that I want to fix atm :\ https://www.youtube.com/watch?v=vNLtCxEa5cU I'm thinking that its got something to do with this bit of code here: self->client->ps.saberMove = self->client->ps.saberBounceMove = LS_READY;//don't finish whatever saber anim you may have been in If I could add something for the other weapons, maybe this will fix it. Gonna go check grip... Edit: I fixed it. "Move along...Move along." It was a case of adding this to each weapon in bg_panimate: case WP_BRYAR_PISTOL: if (pm->ps->forcePowersActive&(1 << FP_GRIP) && pm->ps->forcePowerLevel[FP_GRIP] > FORCE_LEVEL_1) {//holding an enemy aloft with force-grip //PM_SetAnim( pm, SETANIM_TORSO, BOTH_FORCEGRIP_HOLD, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD ); return; } if (pm->ps->forcePowersActive&(1 << FP_LIGHTNING) && pm->ps->forcePowerLevel[FP_LIGHTNING] > FORCE_LEVEL_1) {//holding an enemy aloft with force-grip //PM_SetAnim( pm, SETANIM_TORSO, BOTH_FORCELIGHTNING_HOLD, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD ); return; } So... Do I get a medal for this or something?... Or "meh"... Thought I'd share this with you @@Asgarath83 @@Noodle Since you'se are decent I had never even heard of this bug! Good to see that you fixed it and shared the answer, I don't know much about coding but that line sure can be useful!
Guest Redemption Posted December 2, 2017 Posted December 2, 2017 I cant remember if they fixed it in Academy, But I think they havn't.
TheWhitePhoenix Posted December 2, 2017 Posted December 2, 2017 I cant remember if they fixed it in Academy, But I think they havn't.No, Redemption. They have not. I can confirm it.
AshuraDX Posted December 3, 2017 Posted December 3, 2017 Nicely done @ ! I allways found that annoying. This should probably be merged into the OpenJK public branch on Git Asgarath83 likes this
Guest Redemption Posted December 3, 2017 Posted December 3, 2017 Nicely done @ ! I allways found that annoying. This should probably be merged into the OpenJK public branch on GitThank you If that's the case, by all means. Asgarath83 likes this
katanamaru Posted January 7, 2018 Posted January 7, 2018 Yeah it's in JA. It's not playing the lightning looping animation like it's supposed to.
Solution Guest Redemption Posted February 7, 2018 Solution Posted February 7, 2018 Hello, it seems I was mistaken and that @@eezstreet had already solved this issue a while back in his https://jkhub.org/files/file/2877-jedi-knight-ii-enhanced/ mod, but I'd thought I would share this piece of code with the community for it is the definitive solution to this topics animation issue and not the way that I had it. In bg_panimate at line #3127, paste this code on that line, there.. that should do the trick. else { if (pm->ps->forcePowersActive&(1 << FP_GRIP) && pm->ps->forcePowerLevel[FP_GRIP] > FORCE_LEVEL_1) {//holding an enemy aloft with force-grip //PM_SetAnim( pm, SETANIM_TORSO, BOTH_FORCEGRIP_HOLD, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD ); return; } if (pm->ps->forcePowersActive&(1 << FP_LIGHTNING) && pm->ps->forcePowerLevel[FP_LIGHTNING] > FORCE_LEVEL_1) {//holding an enemy aloft with force-grip //PM_SetAnim( pm, SETANIM_TORSO, BOTH_FORCELIGHTNING_HOLD, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD ); return; } } Noodle likes this
TheWhitePhoenix Posted February 7, 2018 Posted February 7, 2018 Hello, it seems I was mistaken and that @@eezstreet had already solved this issue a while back in his https://jkhub.org/files/file/2877-jedi-knight-ii-enhanced/ mod, but I'd thought I would share this piece of code with the community for it is the definitive solution to this topics animation issue and not the way that I had it. In bg_panimate at line #3127, paste this code on that line, there.. that should do the trick. else { if (pm->ps->forcePowersActive&(1 << FP_GRIP) && pm->ps->forcePowerLevel[FP_GRIP] > FORCE_LEVEL_1) {//holding an enemy aloft with force-grip //PM_SetAnim( pm, SETANIM_TORSO, BOTH_FORCEGRIP_HOLD, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD ); return; } if (pm->ps->forcePowersActive&(1 << FP_LIGHTNING) && pm->ps->forcePowerLevel[FP_LIGHTNING] > FORCE_LEVEL_1) {//holding an enemy aloft with force-grip //PM_SetAnim( pm, SETANIM_TORSO, BOTH_FORCELIGHTNING_HOLD, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD ); return; } } Would this fix also work with JKA?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now