TriForceX / JediKnightPlus

Game modification for Jedi Knight II: Jedi Outcast Multiplayer with useful stuff and custom features
https://jkplus.github.io
GNU General Public License v2.0
21 stars 4 forks source link

Force powers not stopped in pause mode #4

Closed TriForceX closed 3 years ago

TriForceX commented 5 years ago

When servers applies "pause mode" the force powers get finished and not stopped as they should be. Maybe adding a "last force used" option can keep the force power running while server is stopped. Obiously need to be finished when "pause mode" finishes.

LordAttano commented 5 years ago

Just pause the timers for speed and other timed powers, keep their amount of force to its current amount / don't decrease the points while paused, and then make sure dark rage and grip don't hurt yourself or others. That way they would still be held in e.g. a choke even after the game has been paused for several minutes. If it were to let go of someone during the pause it could change potential fight outcomes.

Essentially do the same for force powers as would be done to keep a door open during the pause.

Simply letting the power run out and then storing the last force used doesn't sound like an approach most players would want.

LordAttano commented 3 years ago

Greetings once more. I see that this issue is still marked as unresolved after two years. Did you solve this in a previous commit and simply forgot to mark it as resolved, or have you yet to implement the fix for it? From a quick glance, implementing the method I had suggested above should at least be both quick and feasible, though I have not tested it in practice. Should you require further technical advice on how to approach the issue I suggest asking on the Discord server for JK2, where I am certain some of the many other developers in the community, with more knowhow with regards to the code of JK2 than I, may have potential insight or alternative methods to successfully solving the matter.

TriForceX commented 3 years ago

I already have it working in another branch, basically it needs to be done in clientside stop updating cg.time as suggested on JKCommunity Discord.

LordAttano commented 3 years ago

I already have it working in another branch, basically it needs to be done in clientside stop updating cg.time as suggested on JKCommunity Discord.

Assuming it is the correct post regarding cg.time I have located, that particular post by fau was about pausing a specific walking animation, and didn't have any relation to your question regarding force powers, but purely about the subject of your animation issue. If I remember correctly, force powers on the clientside only checks if the server tell them the power is active or not, in order to render the appropriate force effects, while the actual handling of the powers and for how long they can be used happens on the server end of things. It wouldn't make sense for it to be on the clientside either, as clients could then easily make infinite force power hacks. Therefore it should be more than possible to either extend the force power duration while the game is paused, restoring their stored previous remaining time once the game is resumed, or alternatively simply prevent the timers from decreasing while the game is on pause.

TriForceX commented 3 years ago

I wasnt clear when i described the issue, i thought i was edited/updated... i noticed after about the clientside part so i continued talking about it instead the first issue haha.

Yea you are right, these are different things, the non stopped force power actions (serverside related), and the non stopped effect/animation play (cg.time related on clientside). I dont know what fau said, but when i asked on the JKA Discord i got suggestions on this by ent and other people.

TriForceX commented 3 years ago

This has been fixed on a11faf5

PS: About the paused effects/animations on clientside this needs more research and it may be done in the future, anyways this was not related with the current issue.