Need help with my jetpack


(D-Eagle) #1

I replaced backpack model with my jetpack model, and i need to get it flyable. Can someone help me with this? :clap:


(JigenFIN) #2

I dont know almost anything about programming, but you could try
to change the gravitysettings, like if a jetpack thing is selected or jetpack
key is pressed, it would set the gravity of the player to 100 for that and that time (normal gravity is 800 if i remember right)
But i really dunno if its possible.


(FREAK!!!) #3

gravity is a global cvar, so it has an effect for all players.

so, you first have to make a personal gravity for all players on the server… well thats not so a good idea.

i think its easier to let the player move in an upper vector through a command… but am not sure…
shrubmod has such a feature (i believe it was shrub)


(LION) #4

yep its much easier to do so


(D-Eagle) #5

Well… I need help to do that…


(No1_sonuk) #6

(i believe it was shrub)

Yeah, I think you’re right. At least as far as RtCW is concerned.
IIRC, you activated it with /pilot in the console. As a sniper, I had great fun shooting them, as they explode in mid air when hit. :skull:


(LION) #7

a very very simple one , add it in g_cmds.c


void Cmd_Jetpack_f (gentity_t *ent) {
ent->client->ps.velocity[2] += 100;
 }


(D-Eagle) #8

Hmm… I got error and warning… Error: game error PRJ0019: A tool returned an error code from “Copy to dir…”
Warning: Project The following environment variables were not found:
$(WOLFDIR)

and i have no idea why i got em… And the cmd doesn’t work…


(LION) #9

did you add the function into the end in g_cmd too??


search for 
	} else if (Q_stricmp (cmd, "setviewpos") == 0) {
		Cmd_SetViewpos_f( ent );
add:	} else if (Q_stricmp (cmd, "jetpack") == 0) {
		Cmd_Jetpack_f( ent );
	}  else if (Q_stricmp (cmd, "setspawnpt") == 0) {  


(D-Eagle) #10

Gaah! Lots of errors… I need coder :E


(Jaquboss) #11

Dont create debug binaries , but release ones…


(D-Eagle) #12

LION, if you got it work, can you please send me your g_cmds.c so i could look what i did wrong?


(Jaquboss) #13

well , you need also to add there fuel and so , otherwise it will be spammy and unplayable …


(D-Eagle) #14

Yes, i will add fuel and other things, but first i want to get this work…


(D-Eagle) #15

Thanks, i got it work! Thanks very much!


(LION) #16

so what was the failure?


(D-Eagle) #17

My brains :smiley: