LucasForums

LucasForums (http://www.lucasforums.com/index.php)
-   JO Coding (http://www.lucasforums.com/forumdisplay.php?f=380)
-   -   Additional FORCE_LEVEL_ (http://www.lucasforums.com/showthread.php?t=187540)

Tetraform 04-01-2008 02:15 PM

Additional FORCE_LEVEL_
 
Hello,

i have a problem:

I want to jump higher, when I'm empowered, so I added a FOFCE_LEVEL_ in the q_shared.h data. There already exists 4 FORCE_LEVEL_ :
Quote:

FORCE_LEVEL_0
FORCE_LEVEL_1
FORCE_LEVEL_2
FORCE_LEVEL_3
Now I have a FORCE_LEVEL_4.
Then I added following in the bg_pmove.c to work as FORCE_LEVEL_4 (red marked are the added ones)
Quote:

float forceJumpHeight[NUM_FORCE_POWER_LEVELS] =
{
32,
96,
192,
384,
384 // <--- (No change need)
};

float forceJumpStrength[NUM_FORCE_POWER_LEVELS] =
{
JUMP_VELOCITY,//normal jump
420,
590,
840,
1500 // <---
};
So far, so good.
Now I said the Empower command, that he have to gives me the FORCE_LEVEL_4 for that force to jump higher.
Quote:

other->client->ps.fd.forcePowerLevel[f] = FORCE_LEVEL_3;
other->client->ps.fd.forcePowerLevel[FP_LEVITATION] = FORCE_LEVEL_4; // <--- added
other->client->ps.fd.forcePowersKnown |= (1 << f);
It's my problem now, that JK2 crashs, when I try to jump in empower mode.
What things I have to change, when I want my modification working ?
Or is there an alternative way ?

PS. Sorry for my "bad" english, I'm German :D


All times are GMT -4. The time now is 06:55 AM.

Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
LFNetwork, LLC ©2002-2011 - All rights reserved.