Tinny Posted September 11, 2005 Posted September 11, 2005 Check out bp_move.c and look at how rage and speed when activated affect the player speed. If you want to edit the overall speed just change with a cvar the /g_speed where 280 I think is the default.
Astelraid Posted September 13, 2005 Author Posted September 13, 2005 is there a specific location in the file where i could write the code? for when player has like 50 health then the player movement speed will be slower also.
Wudan Posted September 13, 2005 Posted September 13, 2005 Yes, look in bg_pmove.c, you can contol all kinds of movement related things in that file.
Astelraid Posted September 13, 2005 Author Posted September 13, 2005 yes yes i understand that but i cant figure out how should the code look like for when player has like 50 health then the player movement speed will be slower also. so could someone post a code for that? so i could get a start.
ensiform Posted September 13, 2005 Posted September 13, 2005 actually you want g_active.c where g_speed cvar is controlled.
Tinny Posted September 13, 2005 Posted September 13, 2005 Astelraid said: is there a specific location in the file where i could write the code? for when player has like 50 health then the player movement speed will be slower also. In the file I was telling you about, look for these lines, you can do a search for just the first line (ctf+f): (ps->fd.forcePowersActive & (1 << FP_RAGE)) { ps->speed *= 1.3; } Add an if statement above or below that like so: if(ps->stats[sTAT_HEALTH] <= ps->stats[sTAT_MAX_HEALTH] * .5) ps->speed *= .6;//or whatever else you would like
Achelles Posted October 10, 2005 Posted October 10, 2005 Where or how can I find these files, please? g_active.c , bg_pmove.c
Achelles Posted October 10, 2005 Posted October 10, 2005 I mean where is that particular file located? The .dll's?
Jufa Posted October 10, 2005 Posted October 10, 2005 you need to get the JKA SDK -pack . it has all the source code u need
razorace Posted October 10, 2005 Posted October 10, 2005 ensiform said: actually you want g_active.c where g_speed cvar is controlled. I'm not sure what you're getting at. Wouldn't that effect all the players at once?
stubert Posted October 11, 2005 Posted October 11, 2005 in g_runframe you can specify more about what effects what
Recommended Posts
Archived
This topic is now archived and is closed to further replies.