Jump to content

Home

Disentigration (a bit more)


Dark Cloak

Recommended Posts

Okay, I'm trying to figure something out here...causing somebody to disintegrate as if they had been hit with the disruptor rifle when they are hit with a lightsaber...how would that work? I'm assuming that it would be in the code somewhere...but I'm not sure where to find it. I took a break from JK2 for a while to learn coding, so I'm a bit back up to par...a bit. ;) I KNOW that SOMEWHERE out there, there's some kind of instagib mod that does it every so often...but I'm trying to figure out a way to make it happen every time someone gets hit with the saber. ;) I'm also ASSUMING you can't make it happen in Single Player...ASSUMING...I'm hoping I'm wrong. ;)

Link to comment
Share on other sites

well in multiplayer it is possible,but not in single.first you have to make all the saber damages to 100 or actually more liek 200 so it is an instant kill. then in the code,the code of disintergate is:

if (traceEnt->client && preHealth > 0 && traceEnt->health <= 0 && fullCharge)

{ //was killed by a fully charged sniper shot, so disintegrate

VectorCopy(preAng, traceEnt->client->ps.viewangles);

 

traceEnt->client->ps.eFlags |= EF_DISINTEGRATION;

VectorCopy(tr.endpos, traceEnt->client->ps.lastHitLoc);

 

traceEnt->client->ps.legsAnim = preLegs;

traceEnt->client->ps.torsoAnim = preTorso;

 

traceEnt->r.contents = 0;

 

VectorClear(traceEnt->client->ps.velocity);

}

 

 

if you are looking at the jedimod source this code is on line 716 in g_weapons.c

Link to comment
Share on other sites

It's the code for the Disruptor shot initiating disintegration and then the game handling it

 

Basically to disintegrate an entity, do this:

ent->client->ps.eFlags |= EF_DISINTEGRATION;

 

and the game will do the rest

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...