XycaleTh Posted May 10, 2007 Share Posted May 10, 2007 I'm in the middle of making a competition mod and at the moment through rcon you can 'pause' the match, which extends the timelimit with the correct amount of time, and pauses all players and prevents them from turning etc. It's not a great deal of a problem, but while the match is paused some animations (such as running animations) continue to run but the player remains stationary. I was wondering if it was possible to freeze the animation to stop it from doing this. I'm currently freezing the players by setting the player's ps->pm_type to PM_FREEZE. This isn't a major problem, but it would be a neat little extra and thanks for any help in advance Link to comment Share on other sites More sharing options...
ensiform Posted May 10, 2007 Share Posted May 10, 2007 I'm sure there is, but I don't think you can achieve it with a server-side mod. Link to comment Share on other sites More sharing options...
razorace Posted May 10, 2007 Share Posted May 10, 2007 Yeah, it's possible, but not without modifications to the bg_pmove code. Link to comment Share on other sites More sharing options...
XycaleTh Posted May 11, 2007 Author Share Posted May 11, 2007 Oh, I forgot to mention it's a full-game mod, so client, ui and server are being modified. I've tried stopping the ps->legsTimer/ps->torsoTimer (at least I think it stopped), but it made no difference. Link to comment Share on other sites More sharing options...
ensiform Posted May 11, 2007 Share Posted May 11, 2007 Well, I herd that setting the timers might freeze the animation. You will need to do some searching in the animation code for comments, etc. Link to comment Share on other sites More sharing options...
XycaleTh Posted May 11, 2007 Author Share Posted May 11, 2007 okay Link to comment Share on other sites More sharing options...
razorace Posted May 11, 2007 Share Posted May 11, 2007 ACtually, altering the animation timer won't work for any animation that loops (walking, running, etc). What you're really going to want to do is slam the animation's speed to near zero (you probably can't have exactly zero) based on a gamestate check (look to see how Force Rage alters the animation speeds) and then jack up the animation timers so that the animation still freeze that way. Link to comment Share on other sites More sharing options...
XycaleTh Posted May 11, 2007 Author Share Posted May 11, 2007 I've spent about 30 mins trying to figure out a few things to do with the animation code but I'm kind of confused. I've always thought as the animation timers (legsTimer, torsoTimer) to be something like a countdown timer where it gets set to however long the chosen animation takes to finish. Then I've seen in some places where it gets set to 1, even though the animation stays for quite a long time. Another thing is I'm wondering why the ANIM_TOGGLEBIT is used? Is it to restrict the number of animations that can be held in the game, or...? Link to comment Share on other sites More sharing options...
ensiform Posted May 11, 2007 Share Posted May 11, 2007 I don't think it ever *IS* used. Link to comment Share on other sites More sharing options...
razorace Posted May 11, 2007 Share Posted May 11, 2007 The animation timers are only used to determine when an animation is "finished", it doesn't determine how quickly the animation plays. In fact, actual animation system in the engine doesn't care what the animation timers since it's exclusively used to determine when the next animation should play. Some animation timers are set to 1 because they are "constant" animations like running or walking. These just constantly loop the same animation while the timer is maintained at 1 to keep it going. As for the toggle bit, I'm not sure if we're talking about the same thing, but the animation system uses a toggle bit to allow the system to be able to restart an animation already playing. Link to comment Share on other sites More sharing options...
Tinny Posted May 14, 2007 Share Posted May 14, 2007 The way I did it was the way the client did it when it froze an animation when someone was disrupted. This is a last resort idea, if you can't get them to work I can provide more info. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.