slightly cosmetic issue in multiplayer, when a player dies, whatever saber they use for saber1 (which is actually saber[0]) gets reset to default. The reason for this is in CG_BodyQueueCopy, where no eType is being set for the new entity. Although this is a cosmetic issue, further inspection into this seems to show a LOT of issues.
For now, I've fixed the cosmetic issue, and need to work on the remaining issues involved. This is a client side bug, sorry server side mods
cg_servercmds.c, function CG_BodyQueueCopy:
Look for:
Code:
cent->bodyFadeTime = 0;
cent->bodyHeight = 0;
cent->dustTrailTime = source->dustTrailTime;
trap_G2API_DuplicateGhoul2Instance(source->ghoul2, ¢->ghoul2);
if (source->isRagging)
Change this to:
Code:
cent->bodyFadeTime = 0;
cent->bodyHeight = 0;
cent->dustTrailTime = source->dustTrailTime;
//// Griswald -- cent needs an eType to pass on for proper saber model setting.
//// Stock JKA Bug. This is a corpse, so ET_BODY should suffice.
cent->currentState.eType = ET_BODY;
trap_G2API_DuplicateGhoul2Instance(source->ghoul2, ¢->ghoul2);
if (source->isRagging)
in cg_weapons.c, function CG_G2WeaponInstance:
Look for:
Code:
if (cent->currentState.eType != ET_PLAYER &&
cent->currentState.eType != ET_NPC)
{
return g2WeaponInstances[weapon];
}
if (cent->currentState.eType == ET_NPC)
{
ci = cent->npcClient;
}
Change this too:
Code:
if (cent->currentState.eType != ET_PLAYER &&
cent->currentState.eType != ET_NPC && cent->currentState.eType != ET_BODY)
{
return g2WeaponInstances[weapon];
}
if (cent->currentState.eType == ET_NPC)
{
ci = cent->npcClient;
}
However, the remaining issues still remain, the ONLY saber being checked is saber[0], and this is the only saber being passed into CG_G2WeaponInstance, and is the only saber being checked inside. Possible memory leak anyone?