[openjk] 11/23: [MP] Fix for holocron mode to disallow saber styles that aren't known
Simon McVittie
smcv at debian.org
Thu Jan 11 17:28:59 UTC 2018
This is an automated email from the git hooks/post-receive script.
smcv pushed a commit to branch debian/master
in repository openjk.
commit 18f20494dffbf12c2167a1c92dbea4aae70fdeb9
Author: Razish <mrrazish at gmail.com>
Date: Mon Dec 25 10:34:06 2017 +1100
[MP] Fix for holocron mode to disallow saber styles that aren't known
---
codemp/game/w_force.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/codemp/game/w_force.c b/codemp/game/w_force.c
index 64e4f87..034df35 100644
--- a/codemp/game/w_force.c
+++ b/codemp/game/w_force.c
@@ -4793,6 +4793,20 @@ void HolocronUpdate(gentity_t *self)
{
self->client->ps.fd.forcePowerLevel[i] = FORCE_LEVEL_1;
}
+
+ //make sure that the player's saber stance is reset so they can't continue to use that stance when they don't have the skill for it anymore.
+ if ( self->client->saber[0].model[0] && self->client->saber[1].model[0] )
+ { //dual
+ self->client->ps.fd.saberAnimLevelBase = self->client->ps.fd.saberAnimLevel = self->client->ps.fd.saberDrawAnimLevel = SS_DUAL;
+ }
+ else if ( (self->client->saber[0].saberFlags & SFL_TWO_HANDED) )
+ { //staff
+ self->client->ps.fd.saberAnimLevel = self->client->ps.fd.saberDrawAnimLevel = SS_STAFF;
+ }
+ else
+ {
+ self->client->ps.fd.saberAnimLevelBase = self->client->ps.fd.saberAnimLevel = self->client->ps.fd.saberDrawAnimLevel = SS_MEDIUM;
+ }
}
else
{
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/openjk.git
More information about the Pkg-games-commits
mailing list