Scarlett Posted March 25, 2003 Share Posted March 25, 2003 I've had this problem for quite some time, but i'm determined to get it fixed now. As it is in single player, i wanted to do the fancy lightsaber arming/disarming animations. It half works the way i have it setup... the arming animation works perfectly, but then the disarming animation, BOTH_STAND2TO1, does nothing.. it just twitches the torso a bit. Here's how it's set up, in g_cmds.c for Cmd_ToggleSaber_f: if (ent->client && ent->client->ps.weaponTime < 1) { if (ent->client->ps.saberHolstered) { ent->client->ps.saberHolstered = qfalse; //UPDATED: We want to do the fancy lightsaber arming animation -Scarlett if (ent->client->ps.forceHandExtend == HANDEXTEND_NONE) { PM_SetAnim(SETANIM_TORSO, BOTH_STAND1TO2, SETANIM_FLAG_NORMAL|SETANIM_FLAG_HOLD|SETANIM_FLAG_HOLDLESS, 0); } G_Sound(ent, CHAN_AUTO, saberOnSound); } else { ent->client->ps.saberHolstered = qtrue; //UPDATED: We want to do the fancy lightsaber disarming animation -Scarlett //NOTE: Sadly, this animation isn't working right now... if (ent->client->ps.forceHandExtend == HANDEXTEND_NONE) { PM_SetAnim(SETANIM_TORSO, BOTH_STAND2TO1, SETANIM_FLAG_NORMAL|SETANIM_FLAG_HOLD|SETANIM_FLAG_HOLDLESS, 0); } G_Sound(ent, CHAN_AUTO, saberOffSound); //prevent anything from being done for 400ms after holster ent->client->ps.weaponTime = 400; } } There must be something wrong with the animation itself, because if you replace BOTH_STAND2TO1 with another animation it plays it fine... Any ideas? Link to comment Share on other sites More sharing options...
Scarlett Posted March 25, 2003 Author Share Posted March 25, 2003 Hmm... i just noticed something, in ModView the animation is displayed as "-BOTH_STAND2TO1".... i've also noticed that all the animations i've had problems like this with have the "-" before them in ModView as well. What significance does that have? Why is it there? Are they meant to be used in a certain way or what? From what it appears, all the animations that are like that are basicly reversed versions of another and used for the "ending" animation.... Link to comment Share on other sites More sharing options...
razorace Posted March 25, 2003 Share Posted March 25, 2003 Interesting. Those animations are playing in reverse. I'm looking into this. The MP animation calls might not be set up to handle backward playing animations. If this is the case, I can probably rewrite it to make it do it anyway. Watch the JK2 animation thread for the details of my research. Link to comment Share on other sites More sharing options...
Scarlett Posted March 25, 2003 Author Share Posted March 25, 2003 Alright, i will. Link to comment Share on other sites More sharing options...
Wudan Posted March 25, 2003 Share Posted March 25, 2003 Edited: Ok Ok ... so I don't know wtf I'm talking about Link to comment Share on other sites More sharing options...
Scarlett Posted March 25, 2003 Author Share Posted March 25, 2003 Unfortunatly, that change didn't fix anything, wudan. It also plays fine in ModView. From animation.cfg: // Format: enum, targetFrame, frameCount, loopFrame, frameSpeed BOTH_STAND2TO1 12409 16 -1 -15 The frameSpeed is -15.... where as BOTH_STAND1TO2 is 20, which is the only difference between them. Hmm.. i'll try setting it's frame speed to 20 as well then.... Alright, now that i've done that, it's playing BOTH_STAND1TO2 instead... either that or it's playing it backwards, which I think is far more likely to be the case. BOTH_STAND1TO2 and BOTH_STAND2TO1 must be the same animation, there's just two copies of it (which is what the "-" is for, to indicate it's playing in reverse) so they can specify each for different instances. So that's how to play animations backwards, set the frameSpeed to a negative value. However, it doesn't seem the multiplayer version has support for it... Link to comment Share on other sites More sharing options...
Wudan Posted March 25, 2003 Share Posted March 25, 2003 Apparently, we don't :_( Looks like a job for the GLA Tool I've been working on ... I've been considering that feature, so it's on the list to be added. Wtf am I talking about? Why, specify a sequence and rip it, write the new sequence in reverse You could just straight-merge it back in to the GLA, adding X more frames, but I'd also like the ability to remove frames that aren't used in MP. Link to comment Share on other sites More sharing options...
razorace Posted March 25, 2003 Share Posted March 25, 2003 Scarlette is correct. The some of the animations are just reverse playing versions of other animations. The target frame is the same and the framerate is negative. You can see the frame tick backwards in modview too. Link to comment Share on other sites More sharing options...
razorace Posted March 25, 2003 Share Posted March 25, 2003 Or you could take my approcact and try to hack the system to run animations in reverse. Assuming it's not engine side and it's possible in SP, it should be possible in MP. Link to comment Share on other sites More sharing options...
Scarlett Posted March 25, 2003 Author Share Posted March 25, 2003 That'd be so nice to have something like that, wudan... But i think it'd be good to get support for reverse animations in multiplayer as well (assuming it doesn't already and we just don't know about it). Link to comment Share on other sites More sharing options...
razorace Posted March 25, 2003 Share Posted March 25, 2003 Well, if we can play animations in reverse we'd have the ability to "remix" the current animations without having to mess with the humaniod.gla (and force all our users to download the 7 meg + file over again) Link to comment Share on other sites More sharing options...
Wudan Posted March 25, 2003 Share Posted March 25, 2003 There's a mention of it in the BG_ParseAnimationFile (not sure if that's the exact name), but if you wanted to edit the animation in reverse to have it different than the animation forward, the GLA tool is the way to go. Of course, right now I'm just fleshing out an animation manipulation toolset ... Link to comment Share on other sites More sharing options...
razorace Posted March 25, 2003 Share Posted March 25, 2003 Well, many animations will look fine without making changes (like BOTH_STAND2TO1). Link to comment Share on other sites More sharing options...
razorace Posted March 25, 2003 Share Posted March 25, 2003 ok dokie. Unless Raven changed the animation call internals inside the engine (between SP and MP), reverse playing animations SHOULD work. Everything checks out up to the animation syscalls. Link to comment Share on other sites More sharing options...
razorace Posted March 26, 2003 Share Posted March 26, 2003 Hmmm....Not good. I tried to run several backward running animations and they all don't seem to work. I've emailed Rich about it but my hope is fadeing. The code seems to be ok, it's just the syscall that's messing things up. I guessing that this is some weird bandwidth saver by not allowing reversed animations. (which doesn't make sense cause only the animation name and timers are passed to the clients and not the framerate. Unfortunately, this means that we're restricted to forward moving animations since the fix to this would probably require some engine code changes. Doh! Link to comment Share on other sites More sharing options...
Wudan Posted March 26, 2003 Share Posted March 26, 2003 Hehehe ... an optimized MP GLA (that is, SP specific animations removed) would be much smaller than the SP GLA, anyway. Link to comment Share on other sites More sharing options...
razorace Posted March 26, 2003 Share Posted March 26, 2003 Shazbot! Rich wrote back and says that that SP ghoul2 system is different than the MP system. He said my backup plan idea doesn't work but the current system might work (but doesn't). It looks like backward playing animations aren't possible in MP, but I'll still play with it a little more before I give up on it. Link to comment Share on other sites More sharing options...
Wudan Posted March 26, 2003 Share Posted March 26, 2003 Oh well, guess good old fashioned GLA manipulation is still a good idea! Link to comment Share on other sites More sharing options...
razorace Posted March 26, 2003 Share Posted March 26, 2003 Well, Rich suggested another idea I had originally where you play the backward animations one frame at a time. I'll try it but I'm not sure it'll work correctly cause you'd have to run the animation one frame forward as part of the call while actually playing it backwards. IE, it might look jerky. Link to comment Share on other sites More sharing options...
razorace Posted March 31, 2003 Share Posted March 31, 2003 This is interesting. The animations are in fact playing like they should on the server but not on the client side. I'm still checking the code but I suspect it's due to the client setboneanim syscall being different than the server setboneanim. Unfortunately this means that I'll have to use a hack to run animations backwards (at least on the client side. ) Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.