View Single Post
Old 09-07-2006, 10:51 AM   #117
=X=Master HeX
@=X=Master HeX
=X=Master HeX's Avatar
Join Date: Dec 2002
Location: Lake Villa, IL.
Posts: 117
The following appears to fix the bug with saber collision after you die when your saber was knocked away.

In g_combat.c, function player_die
	self->client->ps.saberEntityNum = self->client->saberStoredIndex; //in case we died while our saber was knocked away.
After, add:
	if (self->client->ps.weapon == WP_SABER && self->client->saberKnockedTime)
		gentity_t *saberEnt = &g_entities[self->client->ps.saberEntityNum];
		//G_Printf("DEBUG: Running saber cleanup for %s\n", self->client->pers.netname);
		self->client->saberKnockedTime = 0;
		saberReactivate(saberEnt, self);
		saberEnt->r.contents = CONTENTS_LIGHTSABER;
		saberEnt->think = saberBackToOwner;
		saberEnt->nextthink = level.time;

=X=Master HeX is offline   you may: quote & reply,