enable kicks on players in ja -1 reply

Please wait...

Guest

I didn't make it!

0 XP

 
#1 8 years ago

the tile says it all, i want to enable kicks on players like in jk2. i'am new to modding so someone maybe knows where i have to look.

thx, chunny




Supa

People say I post too much

50 XP

1st April 2009

0 Uploads

1,368 Posts

0 Threads

#2 8 years ago

JAplus, an enable flip kick in the server.cfg. Can only be done server side.




Guest

I didn't make it!

0 XP

 
#3 8 years ago

i know that, i want to mod it by my self not using somones mod.

just need to know what c file and what line. ;)




Noxious

I'm too cute for a title.

50 XP

16th October 2009

0 Uploads

141 Posts

0 Threads

#4 8 years ago

Search bg_pmove.c for "forceKickFlip". Without the "" obviously.

Should be easy enough for you to figure it out from there. Happy coding. :)




Raz0r

Worse than most terrible

50 XP

27th September 2006

0 Uploads

6,737 Posts

0 Threads

#5 8 years ago

Ah, heylo. A coder. *eats*

Let me see here.. You'll need to edit bg_pmove on the server-side

else if ( anim == BOTH_FLIP_BACK1 || anim == BOTH_FLIP_BACK2 || anim == BOTH_FLIP_BACK3 || anim == BOTH_WALL_FLIP_BACK1 ) { pm->ps->velocity[0] = pm->ps->velocity[1] = 0; VectorMA( pm->ps->velocity, -150, fwd, pm->ps->velocity ); }

//Raz: Added this back in if ( doTrace && anim != BOTH_WALL_RUN_LEFT && anim != BOTH_WALL_RUN_RIGHT ) { if (trace.entityNum < MAX_CLIENTS) { pm->ps->forceKickFlip = trace.entityNum+1; //let the server know that this person gets kicked by this client } }

//up if ( vertPush ) { pm->ps->velocity[2] = vertPush; pm->ps->fd.forcePowersActive |= (1 << FP_LEVITATION); }

//Raz: Added this back in else if ( pm->cmd.forwardmove > 0 //pushing forward && pm->ps->fd.forcePowerLevel[FP_LEVITATION] > FORCE_LEVEL_1 && pm->ps->velocity[2] > 200 && PM_GroundDistance() <= 80 //unfortunately we do not have a happy ground timer like SP (this would use up more bandwidth if we wanted prediction workign right), so we'll just use the actual ground distance. && !BG_InSpecialJump(pm->ps->legsAnim)) {//run up wall, flip backwards vec3_t fwd, traceto, mins, maxs, fwdAngles; trace_t trace; vec3_t idealNormal;

VectorSet(mins, pm->mins[0],pm->mins[1],pm->mins[2]); VectorSet(maxs, pm->maxs[0],pm->maxs[1],pm->maxs[2]); VectorSet(fwdAngles, 0, pm->ps->viewangles[YAW], 0);

AngleVectors( fwdAngles, fwd, NULL, NULL ); VectorMA( pm->ps->origin, 32, fwd, traceto );

pm->trace( &trace, pm->ps->origin, mins, maxs, traceto, pm->ps->clientNum, MASK_PLAYERSOLID );//FIXME: clip brushes too? VectorSubtract( pm->ps->origin, traceto, idealNormal ); VectorNormalize( idealNormal ); if ( trace.fraction < 1.0f ) {//there is a wall there int parts = SETANIM_LEGS;

pm->ps->velocity[0] = pm->ps->velocity[1] = 0; VectorMA( pm->ps->velocity, -150, fwd, pm->ps->velocity ); pm->ps->velocity[2] += 128;

if ( !pm->ps->weaponTime ) { parts = SETANIM_BOTH; } PM_SetAnim( parts, BOTH_WALL_FLIP_BACK1, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD, 0 );

pm->ps->legsTimer -= 600; //I force this anim to play to the end to prevent landing on your head and suddenly flipping over. //It is a bit too long at the end though, so I'll just shorten it.

PM_SetForceJumpZStart(pm->ps->origin[2]);//so we don't take damage if we land at same height pm->cmd.upmove = 0; pm->ps->fd.forceJumpSound = 1; BG_ForcePowerDrain( pm->ps, FP_LEVITATION, 5 );

if (trace.entityNum < MAX_CLIENTS) { pm->ps->forceKickFlip = trace.entityNum+1; //let the server know that this person gets kicked by this client } } }

//Raz: Added this back in //kick if jumping off an ent if ( /*kick &&*/ traceEnt && (traceEnt->s.eType == ET_PLAYER || traceEnt->s.eType == ET_NPC) ) { //kick that thang! pm->ps->forceKickFlip = traceEnt->s.number+1; }

As you can see, it's all just left-over JK2 code you can uncomment. As it is, you can't flipkick people side-on, but that shouldn't be too hard to track down or add in. =]

EDIT: Noxious beat me =[




Noxious

I'm too cute for a title.

50 XP

16th October 2009

0 Uploads

141 Posts

0 Threads

#6 8 years ago
-Raz0r-;5347591EDIT: Noxious beat me =[

Sowwy. :(




Guest

I didn't make it!

0 XP

 
#7 8 years ago

[INDENT]thx, it works. :) [/INDENT]