|
|
 |
09-07-2006, 06:26 PM
|
#121
|
|
Impressive, Terran!
Join Date: May 2002
Posts: 9,153
|
Wrong thread?
---Jedi Guardian of the Newbie Questions
---Masters of the Force Team Leader / Creator
---Open Jedi Project Lead Moderator / Co-Founder

|
|
you may:
quote & reply,
|
09-07-2006, 08:00 PM
|
#122
|
|
The Stig
Join Date: Nov 2004
Location: Sawtooth Cauldron
Posts: 1,242
Current Game: Borderlands 2
|
no, a toggle for jk2 style speed+rage stacking or jka not allow stacking.
note: the weapon charge thing with use holdable doesnt seem to be fixed yet so ignore that for right now.
|
|
you may:
quote & reply,
|
09-07-2006, 09:57 PM
|
#123
|
|
Impressive, Terran!
Join Date: May 2002
Posts: 9,153
|
I suggest you delete the post or update it so people will know if reading from the start of the thread.
---Jedi Guardian of the Newbie Questions
---Masters of the Force Team Leader / Creator
---Open Jedi Project Lead Moderator / Co-Founder

|
|
you may:
quote & reply,
|
09-08-2006, 08:38 PM
|
#124
|
|
The Stig
Join Date: Nov 2004
Location: Sawtooth Cauldron
Posts: 1,242
Current Game: Borderlands 2
|
One really should not be able to return their flag from inside a vehicle since you cannot capture or pickup the enemy flag 
|
|
you may:
quote & reply,
|
09-09-2006, 01:17 PM
|
#125
|
Join Date: Dec 2002
Location: Lake Villa, IL.
Posts: 117
|
Fixed the bug with using alt fire and then hitting use holdable to hold your charge.
in bg_pmove.c in the function PmoveSingle:
after:
add:
Code:
if (pm->cmd.buttons & BUTTON_ATTACK && pm->cmd.buttons & BUTTON_USE_HOLDABLE)
{ pm->cmd.buttons &= ~BUTTON_ATTACK;
pm->cmd.buttons &= ~BUTTON_USE_HOLDABLE;}
if (pm->cmd.buttons & BUTTON_ALT_ATTACK && pm->cmd.buttons & BUTTON_USE_HOLDABLE)
{ pm->cmd.buttons &= ~BUTTON_ALT_ATTACK;
pm->cmd.buttons &= ~BUTTON_USE_HOLDABLE;}
|
|
you may:
quote & reply,
|
09-12-2006, 07:32 PM
|
#126
|
|
Impressive, Terran!
Join Date: May 2002
Posts: 9,153
|
I'm in the process of intergrating all the bugfixes into OJP and I notice that I can't replicate the following bug. Ensiform, if there maybe additional conditions for this bug to occur? Thanks!
Quote:
2. bot_minplayers removerandom bot bug where it kicks spectators watching them instead of the bot:
change the following in g_bot.c:
trap_SendConsoleCommand( EXEC_INSERT, va("kick \"%s\"\n", netname) );
to
trap_SendConsoleCommand( EXEC_INSERT, va("clientkick \"%d\"\n", cl->ps.clientNum));
|
Edit: Also, Ensiform, would you mind adding additional position information for those bugs mentioned in the starting post? I'd feel more comfortable if I could see exactly where the code is supposed to go. Maybe just show the line of code that preceeds the patched code? Thanks!
---Jedi Guardian of the Newbie Questions
---Masters of the Force Team Leader / Creator
---Open Jedi Project Lead Moderator / Co-Founder

|
|
you may:
quote & reply,
|
09-12-2006, 11:09 PM
|
#127
|
|
Impressive, Terran!
Join Date: May 2002
Posts: 9,153
|
Also, the bug fix for item 1 in Enisform's first post doesn't fully work. It looks like currentOrigin doesn't work for spectators so you gotta do a spectator check and then return values based on that. As such, the proper fix should be....
g_cmd.c
Code:
void Cmd_Where_f( gentity_t *ent ) {
trap_SendServerCommand( ent-g_entities, va("print \"%s\n\"", vtos( ent->s.origin ) ) );
}
to
g_cmd.c
Code:
void Cmd_Where_f( gentity_t *ent ) {
if(ent->client && ent->client->sess.sessionTeam != TEAM_SPECTATOR )
{//active players use currentOrigin
trap_SendServerCommand( ent-g_entities, va("print \"%s\n\"", vtos( ent->r.currentOrigin ) ) );
}
else
{
trap_SendServerCommand( ent-g_entities, va("print \"%s\n\"", vtos( ent->s.origin ) ) );
}
}
---Jedi Guardian of the Newbie Questions
---Masters of the Force Team Leader / Creator
---Open Jedi Project Lead Moderator / Co-Founder

|
|
you may:
quote & reply,
|
09-13-2006, 04:46 AM
|
#128
|
|
Impressive, Terran!
Join Date: May 2002
Posts: 9,153
|
Alternate fix for a dead body's color didn't match the player's color in team games. The fix offered by Enisform doesn't conform to the way team colors are normally forced on the player. In addition, I think that Ensiform's method might cause problems with dead body colors in siege.
g_client.c:
SetupGameGhoul2Model()
Change
Code:
if ( g_gametype.integer >= GT_TEAM && g_gametype.integer != GT_SIEGE && !g_trueJedi.integer )
{
BG_ValidateSkinForTeam( truncModelName, skin, ent->client->sess.sessionTeam, NULL );
}
to
Code:
if ( g_gametype.integer >= GT_TEAM && g_gametype.integer != GT_SIEGE && !g_trueJedi.integer )
{
//Also adjust customRGBA for team colors.
float colorOverride[3];
colorOverride[0] = colorOverride[1] = colorOverride[2] = 0.0f;
BG_ValidateSkinForTeam( truncModelName, skin, ent->client->sess.sessionTeam, colorOverride);
if (colorOverride[0] != 0.0f ||
colorOverride[1] != 0.0f ||
colorOverride[2] != 0.0f)
{
ent->client->ps.customRGBA[0] = colorOverride[0]*255.0f;
ent->client->ps.customRGBA[1] = colorOverride[1]*255.0f;
ent->client->ps.customRGBA[2] = colorOverride[2]*255.0f;
}
}
ClientUserinfoChanged()
After
Code:
client->ps.customRGBA[3]=255;
Add
Code:
if ( g_gametype.integer >= GT_TEAM && g_gametype.integer != GT_SIEGE && !g_trueJedi.integer )
{
char skin[MAX_QPATH];
float colorOverride[3];
colorOverride[0] = colorOverride[1] = colorOverride[2] = 0.0f;
BG_ValidateSkinForTeam( model, skin, client->sess.sessionTeam, colorOverride);
if (colorOverride[0] != 0.0f ||
colorOverride[1] != 0.0f ||
colorOverride[2] != 0.0f)
{
client->ps.customRGBA[0] = colorOverride[0]*255.0f;
client->ps.customRGBA[1] = colorOverride[1]*255.0f;
client->ps.customRGBA[2] = colorOverride[2]*255.0f;
}
}
ClientSpawn()
After
Code:
client->ps.customRGBA[3]=255;
Add
Code:
//update our customRGBA for team colors.
if ( g_gametype.integer >= GT_TEAM && g_gametype.integer != GT_SIEGE && !g_trueJedi.integer )
{
char skin[MAX_QPATH];
char model[MAX_QPATH];
float colorOverride[3];
colorOverride[0] = colorOverride[1] = colorOverride[2] = 0.0f;
Q_strncpyz( model, Info_ValueForKey (userinfo, "model"), sizeof( model ) );
BG_ValidateSkinForTeam( model, skin, savedSess.sessionTeam, colorOverride);
if (colorOverride[0] != 0.0f ||
colorOverride[1] != 0.0f ||
colorOverride[2] != 0.0f)
{
client->ps.customRGBA[0] = colorOverride[0]*255.0f;
client->ps.customRGBA[1] = colorOverride[1]*255.0f;
client->ps.customRGBA[2] = colorOverride[2]*255.0f;
}
}
Edit: Fixed typos in first and second code sections.
---Jedi Guardian of the Newbie Questions
---Masters of the Force Team Leader / Creator
---Open Jedi Project Lead Moderator / Co-Founder

Last edited by razorace; 09-13-2006 at 03:51 PM.
|
|
you may:
quote & reply,
|
09-13-2006, 03:00 PM
|
#129
|
|
The Stig
Join Date: Nov 2004
Location: Sawtooth Cauldron
Posts: 1,242
Current Game: Borderlands 2
|
Quote:
|
Originally Posted by razorace
Also, the bug fix for item 1 in Enisform's first post doesn't fully work. It looks like currentOrigin doesn't work for spectators so you gotta do a spectator check and then return values based on that. As such, the proper fix should be....
g_cmd.c
Code:
void Cmd_Where_f( gentity_t *ent ) {
trap_SendServerCommand( ent-g_entities, va("print \"%s\n\"", vtos( ent->s.origin ) ) );
}
to
g_cmd.c
Code:
void Cmd_Where_f( gentity_t *ent ) {
if(ent->client && ent->client->sess.sessionTeam != TEAM_SPECTATOR )
{//active players use currentOrigin
trap_SendServerCommand( ent-g_entities, va("print \"%s\n\"", vtos( ent->r.currentOrigin ) ) );
}
else
{
trap_SendServerCommand( ent-g_entities, va("print \"%s\n\"", vtos( ent->s.origin ) ) );
}
}
|
fix? spectators don't really have an origin. try playing a map with location entities in them, it doesn't update and is not supposed to.
Last edited by ensiform; 09-13-2006 at 03:22 PM.
|
|
you may:
quote & reply,
|
09-13-2006, 03:02 PM
|
#130
|
|
The Stig
Join Date: Nov 2004
Location: Sawtooth Cauldron
Posts: 1,242
Current Game: Borderlands 2
|
uhm... put some bots in the game from bot_minplayers, spectate them so that removerandombot will kick them however it will (try) to kick you. if you are localhost it will just say 'cannot kick localhost', also don't use ps.clientnum try something more like:
replace the top of the for loop with this:
Code:
for( i = 0; i < level.numConnectedClients; i++ ) {
idnum = level.sortedClients[i];
then use idnum instead of cl->ps.clientNum.
then just get rid of the netname part in G_RemoveRandomBot.
this is what my function looks like:
Code:
/*
===============
G_RemoveRandomBot
===============
*/
int G_RemoveRandomBot( int team ) {
int i,idnum;
gentity_t *cl_ent;
for ( i=0 ; i< g_maxclients.integer ; i++ ) {
idnum = level.sortedSlots[i];
cl_ent = g_entities + idnum;
if ( cl_ent->client->pers.connected != CON_CONNECTED ) {
continue;
}
if ( !(cl_ent->r.svFlags & SVF_BOT) ) {
continue;
}
if ( cl_ent->client->ps.powerups[PW_BLUEFLAG] ) {
continue;
}
if ( cl_ent->client->ps.powerups[PW_REDFLAG] ) {
continue;
}
if ( cl_ent->client->ps.powerups[PW_NEUTRALFLAG] ) {
continue;
}
//[BugFix9]
if ( cl_ent->client->sess.sessionTeam == TEAM_SPECTATOR
&& cl_ent->client->sess.spectatorState == SPECTATOR_FOLLOW )
{//this entity is actually following another entity so the ps data is for a
//different entity. Bots never spectate like this so, skip this player.
continue;
}
//[/BugFix9]
if (g_gametype.integer == GT_SIEGE)
{
if ( team >= 0 && cl_ent->client->sess.siegeDesiredTeam != team ) {
continue;
}
}
else
{
if ( team >= 0 && cl_ent->client->sess.sessionTeam != team ) {
continue;
}
}
trap_SendConsoleCommand( EXEC_INSERT, va2("clientkick \"%d\"\n", idnum));
return qtrue;
}
return qfalse;
}
sortedSlots is basically just sortedClients except it sorts by clientnumber instead of score, and va2 is just va but improved/tweaked. my func also skips removing bots that carry flags.
Last edited by ensiform; 09-13-2006 at 03:16 PM.
|
|
you may:
quote & reply,
|
09-13-2006, 03:45 PM
|
#131
|
|
Impressive, Terran!
Join Date: May 2002
Posts: 9,153
|
Quote:
|
Originally Posted by ensiform
fix? spectators don't really have an origin. try playing a map with location entities in them, it doesn't update and is not supposed to.
|
The original intent of the "where" command appears to have been for using spectator mode to determine positions on the map. That's why it doesn't work for active players. But on the flip side, currentOrigin isn't updated for spectators!
---Jedi Guardian of the Newbie Questions
---Masters of the Force Team Leader / Creator
---Open Jedi Project Lead Moderator / Co-Founder

|
|
you may:
quote & reply,
|
09-13-2006, 04:24 PM
|
#132
|
|
The Stig
Join Date: Nov 2004
Location: Sawtooth Cauldron
Posts: 1,242
Current Game: Borderlands 2
|
/viewpos on the client.
|
|
you may:
quote & reply,
|
09-13-2006, 05:36 PM
|
#133
|
|
Impressive, Terran!
Join Date: May 2002
Posts: 9,153
|
So, "where" is the server side equivilient. I suppose they're a little different due to the view position not being the same as the model origin.
---Jedi Guardian of the Newbie Questions
---Masters of the Force Team Leader / Creator
---Open Jedi Project Lead Moderator / Co-Founder

|
|
you may:
quote & reply,
|
09-13-2006, 05:39 PM
|
#134
|
|
Impressive, Terran!
Join Date: May 2002
Posts: 9,153
|
Say, for the "remapShader" exploit fix, why isn't the third argument protected as well? Is it not possible to overflow that one?
---Jedi Guardian of the Newbie Questions
---Masters of the Force Team Leader / Creator
---Open Jedi Project Lead Moderator / Co-Founder

|
|
you may:
quote & reply,
|
09-13-2006, 08:22 PM
|
#135
|
|
The Stig
Join Date: Nov 2004
Location: Sawtooth Cauldron
Posts: 1,242
Current Game: Borderlands 2
|
¿? hmm you mean in the trap call? well technically, i just looked at re.RemapShader in the engine and only the first parameter really needs it and the last object is really just a float as far as i can see.
See (this is the fixed version in the engine using a fail-safe checker for COM_StripExtension):
tr_shader.c:
Code:
void R_RemapShader(const char *shaderName, const char *newShaderName, const char *timeOffset) {
char strippedName[MAX_QPATH];
int hash;
shader_t *sh, *sh2;
qhandle_t h;
sh = R_FindShaderByName( shaderName );
if (sh == NULL || sh == tr.defaultShader) {
h = RE_RegisterShaderLightMap(shaderName, 0);
sh = R_GetShaderByHandle(h);
}
if (sh == NULL || sh == tr.defaultShader) {
ri.Printf( PRINT_WARNING, "WARNING: R_RemapShader: shader %s not found\n", shaderName );
return;
}
sh2 = R_FindShaderByName( newShaderName );
if (sh2 == NULL || sh2 == tr.defaultShader) {
h = RE_RegisterShaderLightMap(newShaderName, 0);
sh2 = R_GetShaderByHandle(h);
}
if (sh2 == NULL || sh2 == tr.defaultShader) {
ri.Printf( PRINT_WARNING, "WARNING: R_RemapShader: new shader %s not found\n", newShaderName );
return;
}
// remap all the shaders with the given name
// even tho they might have different lightmaps
COM_StripExtension(shaderName, strippedName, sizeof(strippedName));
hash = generateHashValue(strippedName, FILE_HASH_SIZE);
for (sh = hashTable[hash]; sh; sh = sh->next) {
if (Q_stricmp(sh->name, strippedName) == 0) {
if (sh != sh2) {
sh->remappedShader = sh2;
} else {
sh->remappedShader = NULL;
}
}
}
if (timeOffset) {
sh2->timeOffset = atof(timeOffset);
}
}
old version that exists in jka:
Code:
void R_RemapShader(const char *shaderName, const char *newShaderName, const char *timeOffset) {
char strippedName[MAX_QPATH];
int hash;
shader_t *sh, *sh2;
qhandle_t h;
sh = R_FindShaderByName( shaderName );
if (sh == NULL || sh == tr.defaultShader) {
h = RE_RegisterShaderLightMap(shaderName, 0);
sh = R_GetShaderByHandle(h);
}
if (sh == NULL || sh == tr.defaultShader) {
ri.Printf( PRINT_WARNING, "WARNING: R_RemapShader: shader %s not found\n", shaderName );
return;
}
sh2 = R_FindShaderByName( newShaderName );
if (sh2 == NULL || sh2 == tr.defaultShader) {
h = RE_RegisterShaderLightMap(newShaderName, 0);
sh2 = R_GetShaderByHandle(h);
}
if (sh2 == NULL || sh2 == tr.defaultShader) {
ri.Printf( PRINT_WARNING, "WARNING: R_RemapShader: new shader %s not found\n", newShaderName );
return;
}
// remap all the shaders with the given name
// even tho they might have different lightmaps
COM_StripExtension(shaderName, strippedName);
hash = generateHashValue(shaderName, FILE_HASH_SIZE);
for (sh = hashTable[hash]; sh; sh = sh->next) {
if (Q_stricmp(sh->name, strippedName) == 0) {
if (sh != sh2) {
sh->remappedShader = sh2;
} else {
sh->remappedShader = NULL;
}
}
}
if (timeOffset) {
sh2->timeOffset = atof(timeOffset);
}
}
note how in the fixed version com_stripextension takes into affect the newsize, and the jka one does not.
Code:
/*
============
COM_StripExtension
============
*/
void COM_StripExtension( const char *in, char *out ) {
while ( *in && *in != '.' ) {
*out++ = *in++;
}
*out = 0;
}
vs.
Code:
/*
============
COM_StripExtensionSafe
============
*/
void COM_StripExtensionSafe( const char *in, char *out, int destsize ) {
int length;
Q_strncpyz(out, in, destsize);
length = strlen(out)-1;
while (length > 0 && out[length] != '.')
{
length--;
if (out[length] == '/')
return; // no extension
}
if (length)
out[length] = 0;
}
i renamed it because i do not like to modify anything in the q_* files
|
|
you may:
quote & reply,
|
09-17-2006, 05:50 PM
|
#136
|
|
Impressive, Terran!
Join Date: May 2002
Posts: 9,153
|
There's a few typo bugs in the saberMoveData table that result in the wrong animations being played during bottom left/right broken parries, parries, and knockaways.
bg_saber.c, saberMoveData[]
Replace
Code:
// Broken parries
{"BParry Top", BOTH_H1_S1_T_, Q_T, Q_B, AFLAG_ACTIVE, 50, BLK_NO, LS_READY, LS_READY, 150 }, // LS_PARRY_UP,
{"BParry UR", BOTH_H1_S1_TR, Q_TR, Q_BL, AFLAG_ACTIVE, 50, BLK_NO, LS_READY, LS_READY, 150 }, // LS_PARRY_UR,
{"BParry UL", BOTH_H1_S1_TL, Q_TL, Q_BR, AFLAG_ACTIVE, 50, BLK_NO, LS_READY, LS_READY, 150 }, // LS_PARRY_UL,
{"BParry LR", BOTH_H1_S1_BL, Q_BL, Q_TR, AFLAG_ACTIVE, 50, BLK_NO, LS_READY, LS_READY, 150 }, // LS_PARRY_LR,
{"BParry Bot", BOTH_H1_S1_B_, Q_B, Q_T, AFLAG_ACTIVE, 50, BLK_NO, LS_READY, LS_READY, 150 }, // LS_PARRY_LL
{"BParry LL", BOTH_H1_S1_BR, Q_BR, Q_TL, AFLAG_ACTIVE, 50, BLK_NO, LS_READY, LS_READY, 150 }, // LS_PARRY_LL
// Knockaways
{"Knock Top", BOTH_K1_S1_T_, Q_R, Q_T, AFLAG_ACTIVE, 50, BLK_WIDE, LS_R_BL2TR, LS_T1_T__BR, 150 }, // LS_PARRY_UP,
{"Knock UR", BOTH_K1_S1_TR, Q_R, Q_TR, AFLAG_ACTIVE, 50, BLK_WIDE, LS_R_BL2TR, LS_T1_TR__R, 150 }, // LS_PARRY_UR,
{"Knock UL", BOTH_K1_S1_TL, Q_R, Q_TL, AFLAG_ACTIVE, 50, BLK_WIDE, LS_R_BR2TL, LS_T1_TL__L, 150 }, // LS_PARRY_UL,
{"Knock LR", BOTH_K1_S1_BL, Q_R, Q_BL, AFLAG_ACTIVE, 50, BLK_WIDE, LS_R_TL2BR, LS_T1_BL_TL, 150 }, // LS_PARRY_LR,
{"Knock LL", BOTH_K1_S1_BR, Q_R, Q_BR, AFLAG_ACTIVE, 50, BLK_WIDE, LS_R_TR2BL, LS_T1_BR_TR, 150 }, // LS_PARRY_LL
// Parry
{"Parry Top", BOTH_P1_S1_T_, Q_R, Q_T, AFLAG_ACTIVE, 50, BLK_WIDE, LS_R_BL2TR, LS_A_T2B, 150 }, // LS_PARRY_UP,
{"Parry UR", BOTH_P1_S1_TR, Q_R, Q_TL, AFLAG_ACTIVE, 50, BLK_WIDE, LS_R_BL2TR, LS_A_TR2BL, 150 }, // LS_PARRY_UR,
{"Parry UL", BOTH_P1_S1_TL, Q_R, Q_TR, AFLAG_ACTIVE, 50, BLK_WIDE, LS_R_BR2TL, LS_A_TL2BR, 150 }, // LS_PARRY_UL,
{"Parry LR", BOTH_P1_S1_BL, Q_R, Q_BR, AFLAG_ACTIVE, 50, BLK_WIDE, LS_R_TL2BR, LS_A_BR2TL, 150 }, // LS_PARRY_LR,
{"Parry LL", BOTH_P1_S1_BR, Q_R, Q_BL, AFLAG_ACTIVE, 50, BLK_WIDE, LS_R_TR2BL, LS_A_BL2TR, 150 }, // LS_PARRY_LL
with
Code:
// Broken parries
{"BParry Top", BOTH_H1_S1_T_, Q_T, Q_B, AFLAG_ACTIVE, 50, BLK_NO, LS_READY, LS_READY, 150 }, // LS_PARRY_UP,
{"BParry UR", BOTH_H1_S1_TR, Q_TR, Q_BL, AFLAG_ACTIVE, 50, BLK_NO, LS_READY, LS_READY, 150 }, // LS_PARRY_UR,
{"BParry UL", BOTH_H1_S1_TL, Q_TL, Q_BR, AFLAG_ACTIVE, 50, BLK_NO, LS_READY, LS_READY, 150 }, // LS_PARRY_UL,
{"BParry LR", BOTH_H1_S1_BR, Q_BL, Q_TR, AFLAG_ACTIVE, 50, BLK_NO, LS_READY, LS_READY, 150 }, // LS_PARRY_LR,
{"BParry Bot", BOTH_H1_S1_B_, Q_B, Q_T, AFLAG_ACTIVE, 50, BLK_NO, LS_READY, LS_READY, 150 }, // LS_PARRY_LR
{"BParry LL", BOTH_H1_S1_BL, Q_BR, Q_TL, AFLAG_ACTIVE, 50, BLK_NO, LS_READY, LS_READY, 150 }, // LS_PARRY_LL
// Knockaways
{"Knock Top", BOTH_K1_S1_T_, Q_R, Q_T, AFLAG_ACTIVE, 50, BLK_WIDE, LS_R_BL2TR, LS_T1_T__BR, 150 }, // LS_PARRY_UP,
{"Knock UR", BOTH_K1_S1_TR, Q_R, Q_TR, AFLAG_ACTIVE, 50, BLK_WIDE, LS_R_BL2TR, LS_T1_TR__R, 150 }, // LS_PARRY_UR,
{"Knock UL", BOTH_K1_S1_TL, Q_R, Q_TL, AFLAG_ACTIVE, 50, BLK_WIDE, LS_R_BR2TL, LS_T1_TL__L, 150 }, // LS_PARRY_UL,
{"Knock LR", BOTH_K1_S1_BR, Q_R, Q_BL, AFLAG_ACTIVE, 50, BLK_WIDE, LS_R_TL2BR, LS_T1_BL_TL, 150 }, // LS_PARRY_LR,
{"Knock LL", BOTH_K1_S1_BL, Q_R, Q_BR, AFLAG_ACTIVE, 50, BLK_WIDE, LS_R_TR2BL, LS_T1_BR_TR, 150 }, // LS_PARRY_LL
// Parry
{"Parry Top", BOTH_P1_S1_T_, Q_R, Q_T, AFLAG_ACTIVE, 50, BLK_WIDE, LS_R_BL2TR, LS_A_T2B, 150 }, // LS_PARRY_UP,
{"Parry UR", BOTH_P1_S1_TR, Q_R, Q_TL, AFLAG_ACTIVE, 50, BLK_WIDE, LS_R_BL2TR, LS_A_TR2BL, 150 }, // LS_PARRY_UR,
{"Parry UL", BOTH_P1_S1_TL, Q_R, Q_TR, AFLAG_ACTIVE, 50, BLK_WIDE, LS_R_BR2TL, LS_A_TL2BR, 150 }, // LS_PARRY_UL,
{"Parry LR", BOTH_P1_S1_BR, Q_R, Q_BR, AFLAG_ACTIVE, 50, BLK_WIDE, LS_R_TL2BR, LS_A_BR2TL, 150 }, // LS_PARRY_LR,
{"Parry LL", BOTH_P1_S1_BL, Q_R, Q_BL, AFLAG_ACTIVE, 50, BLK_WIDE, LS_R_TR2BL, LS_A_BL2TR, 150 }, // LS_PARRY_LL
---Jedi Guardian of the Newbie Questions
---Masters of the Force Team Leader / Creator
---Open Jedi Project Lead Moderator / Co-Founder

|
|
you may:
quote & reply,
|
09-20-2006, 04:12 PM
|
#137
|
|
The Stig
Join Date: Nov 2004
Location: Sawtooth Cauldron
Posts: 1,242
Current Game: Borderlands 2
|
Replacement for DeathmatchScoreboardMessage that comes from Enemy Territory with some enhancements and such so that it will not go over 1022 limit.
Note: if you use unlagged change the ping part to use pers.realPing instead of ps.ping.
Code:
// G_SendScore_Add
//
// Add score with clientNum at index i of level.sortedClients[]
// to the string buf.
//
// returns qtrue if the score was appended to buf, qfalse otherwise.
qboolean G_SendScore_Add(gentity_t *ent, int i, char *buf, int bufsize)
{
gclient_t *cl;
int ping, scoreFlags=0, accuracy, perfect;
char entry[256];
entry[0] = '\0';
cl = &level.clients[level.sortedClients[i]];
if ( cl->pers.connected == CON_CONNECTING ) {
ping = -1;
} else {
ping = cl->ps.ping < 999 ? cl->ps.ping : 999;
}
if( cl->accuracy_shots ) {
accuracy = cl->accuracy_hits * 100 / cl->accuracy_shots;
} else {
accuracy = 0;
}
perfect = ( cl->ps.persistant[PERS_RANK] == 0 && cl->ps.persistant[PERS_KILLED] == 0 ) ? 1 : 0;
Com_sprintf (entry, sizeof(entry),
" %i %i %i %i %i %i %i %i %i %i %i %i %i %i ",
level.sortedClients[i],
cl->ps.persistant[PERS_SCORE],
ping,
(level.time - cl->pers.enterTime)/60000,
scoreFlags,
g_entities[level.sortedClients[i]].s.powerups,
accuracy,
cl->ps.persistant[PERS_IMPRESSIVE_COUNT],
cl->ps.persistant[PERS_EXCELLENT_COUNT],
cl->ps.persistant[PERS_GAUNTLET_FRAG_COUNT],
cl->ps.persistant[PERS_DEFEND_COUNT],
cl->ps.persistant[PERS_ASSIST_COUNT],
perfect,
cl->ps.persistant[PERS_CAPTURES]);
if((strlen(buf) + strlen(entry) + 1) > bufsize) {
return qfalse;
}
Q_strcat(buf, bufsize, entry);
return qtrue;
}
/*
==================
G_SendScore
==================
*/
void G_SendScore( gentity_t *ent ) {
int i;
int numSorted;
int count;
// tjw: commands over 1022 will crash the client so they're
// pruned in trap_SendServerCommand()
// 1022 -32 for the startbuffer
char buffer[990];
char startbuffer[32];
numSorted = level.numConnectedClients;
if (numSorted > MAX_CLIENTS)
{
numSorted = MAX_CLIENTS;
}
count = 0;
*buffer = '\0';
*startbuffer = '\0';
Q_strncpyz(startbuffer, va(
"scores %i %i %i",
level.numConnectedClients,
level.teamScores[TEAM_RED],
level.teamScores[TEAM_BLUE]),
sizeof(startbuffer));
// tjw: keep adding scores to the scores command until we fill
// up the buffer.
for(i=0 ; i < numSorted ; i++) {
// tjw: the old version of SendScore() did this. I removed it
// originally because it seemed like an unneccessary hack.
// perhaps it is necessary for compat with CG_Argv()?
if(!G_SendScore_Add(ent, i, buffer, sizeof(buffer))) {
break;
}
count++;
}
if(!count) {
return;
}
trap_SendServerCommand(ent-g_entities, va(
"%s%s", startbuffer, buffer));
}
Now just replace all instances of DeathmatchScoreboardMessage with G_SendScore.
Client-Side fix to allow actually up to MAX_CLIENTS instead of only 20 clients to draw on scoreboard:
cg_servercmds.c:
Code:
/*
=================
CG_ParseScores
=================
*/
static void CG_ParseScores( void ) {
int i, powerups;
cg.numScores = atoi( CG_Argv( 1 ) );
if ( cg.numScores > MAX_CLIENTS ) {
cg.numScores = MAX_CLIENTS;
}
cg.teamScores[0] = atoi( CG_Argv( 2 ) );
cg.teamScores[1] = atoi( CG_Argv( 3 ) );
memset( cg.scores, 0, sizeof( cg.scores ) );
for ( i = 0 ; i < cg.numScores ; i++ ) {
//
cg.scores[i].client = atoi( CG_Argv( i * 14 + 4 ) );
cg.scores[i].score = atoi( CG_Argv( i * 14 + 5 ) );
cg.scores[i].ping = atoi( CG_Argv( i * 14 + 6 ) );
cg.scores[i].time = atoi( CG_Argv( i * 14 + 7 ) );
cg.scores[i].scoreFlags = atoi( CG_Argv( i * 14 + 8 ) );
powerups = atoi( CG_Argv( i * 14 + 9 ) );
cg.scores[i].accuracy = atoi(CG_Argv(i * 14 + 10));
cg.scores[i].impressiveCount = atoi(CG_Argv(i * 14 + 11));
cg.scores[i].excellentCount = atoi(CG_Argv(i * 14 + 12));
cg.scores[i].guantletCount = atoi(CG_Argv(i * 14 + 13));
cg.scores[i].defendCount = atoi(CG_Argv(i * 14 + 14));
cg.scores[i].assistCount = atoi(CG_Argv(i * 14 + 15));
cg.scores[i].perfect = atoi(CG_Argv(i * 14 + 16));
cg.scores[i].captures = atoi(CG_Argv(i * 14 + 17));
if ( cg.scores[i].client < 0 || cg.scores[i].client >= MAX_CLIENTS ) {
cg.scores[i].client = 0;
}
cgs.clientinfo[ cg.scores[i].client ].score = cg.scores[i].score;
cgs.clientinfo[ cg.scores[i].client ].powerups = powerups;
cg.scores[i].team = cgs.clientinfo[cg.scores[i].client].team;
}
}
Last edited by ensiform; 09-20-2006 at 04:40 PM.
|
|
you may:
quote & reply,
|
09-20-2006, 04:36 PM
|
#138
|
|
The Stig
Join Date: Nov 2004
Location: Sawtooth Cauldron
Posts: 1,242
Current Game: Borderlands 2
|
Now for an updated TeamplayInfoMessage.
This is going to be slightly longer because we need to add a new sorted client list to level_locals
add this to level_locals_t struct (g_local.h):
Code:
int sortedSlots[MAX_CLIENTS]; // sorted by clientnum
now above CalculateRanks add this function (g_main.c):
Code:
/*
=============
SortSlots
=============
*/
int QDECL SortSlots( const void *a, const void *b ) {
return *(int *)a - *(int *)b;
}
Okay now in CalculateRanks,
below this line:
Code:
level.sortedClients[level.numConnectedClients] = i;
add:
Code:
level.sortedSlots[level.numConnectedClients] = i;
now look for this line:
Code:
qsort( level.sortedClients, level.numConnectedClients,
sizeof(level.sortedClients[0]), SortRanks );
below it add:
Code:
qsort( level.sortedSlots, level.numConnectedClients,
sizeof(level.sortedSlots[0]), SortSlots );
now g_team.c
A replacement for TeamplayInfoMessage.
Code:
// G_SendTeamInfo_Add
//
// Add teaminfo with clientNum at index i of level.sortedSlots[]
// to the string buf.
//
// returns qtrue if the info was appended to buf, qfalse otherwise.
qboolean G_SendTeamInfo_Add(gentity_t *ent, gentity_t *player, int idnum, char *buf, int bufsize)
{
int h, a;
char entry[128];
entry[0] = '\0';
h = player->client->ps.stats[STAT_HEALTH];
a = player->client->ps.stats[STAT_ARMOR];
if (h < 0) h = 0;
if (a < 0) a = 0;
Com_sprintf (entry, sizeof(entry),
" %i %i %i %i %i %i",
idnum, player->client->pers.teamState.location, h, a,
player->client->ps.weapon, player->s.powerups);
if((strlen(buf) + strlen(entry) + 1) > bufsize) {
return qfalse;
}
Q_strcat(buf, bufsize, entry);
return qtrue;
}
/*
==================
G_SendTeamInfo
==================
*/
void G_SendTeamInfo( gentity_t *ent ) {
int i, idnum;
int numSorted;
int count;
gentity_t *player = NULL;
// tjw: commands over 1022 will crash the client so they're
// pruned in trap_SendServerCommand()
// 1022 -32 for the startbuffer
char buffer[990];
char startbuffer[32];
if ( !ent->client->pers.teamInfo )
return;
numSorted = level.numConnectedClients;
if (numSorted > MAX_CLIENTS)
{
numSorted = MAX_CLIENTS;
}
count = 0;
*buffer = '\0';
*startbuffer = '\0';
// tjw: keep adding teaminfos to the tinfo command until we fill
// up the buffer.
for(i=0 ; i < numSorted && count < TEAM_MAXOVERLAY; i++) {
// tjw: the old version of SendScore() did this. I removed it
// originally because it seemed like an unneccessary hack.
// perhaps it is necessary for compat with CG_Argv()?
idnum = level.sortedSlots[i];
player = g_entities + idnum;
if ( !player->inuse || player->client->sess.sessionTeam != ent->client->sess.sessionTeam )
continue;
if(!G_SendTeamInfo_Add(ent, player, idnum, buffer, sizeof(buffer))) {
break;
}
count++;
}
if(!count) {
return;
}
Q_strncpyz(startbuffer, va(
"tinfo %i",
count),
sizeof(startbuffer));
trap_SendServerCommand(ent-g_entities, va(
"%s%s", startbuffer, buffer));
}
Now just replace any instances of TeamplayInfoMessage with G_SendTeamInfo.
|
|
you may:
quote & reply,
|
09-20-2006, 05:55 PM
|
#139
|
|
The Stig
Join Date: Nov 2004
Location: Sawtooth Cauldron
Posts: 1,242
Current Game: Borderlands 2
|
Okay, here is a good vsnprintf that works (maybe not for mac but you will have to check) for jka since you dont use qvm:
q_shared.c (somewhere above Com_sprintf preferably):
(comes from idStr::vsnPrintf from Str.c and Str.h from D3/Q4 1.3 SDK)
Code:
/*
============
Q_vsnprintf
vsnprintf portability:
C99 standard: vsnprintf returns the number of characters (excluding the trailing
'\0') which would have been written to the final string if enough space had been available
snprintf and vsnprintf do not write more than size bytes (including the trailing '\0')
win32: _vsnprintf returns the number of characters written, not including the terminating null character,
or a negative value if an output error occurs. If the number of characters to write exceeds count, then count
characters are written and -1 is returned and no trailing '\0' is added.
Q_vsnprintf: always appends a trailing '\0', returns number of characters written (not including terminal \0)
or returns -1 on failure or if the buffer would be overflowed.
============
*/
int Q_vsnprintf( char *dest, int size, const char *fmt, va_list argptr ) {
int ret;
#ifdef _WIN32
ret = _vsnprintf( dest, size-1, fmt, argptr );
#else
ret = vsnprintf( dest, size, fmt, argptr );
#endif
dest[size-1] = '\0';
if ( ret < 0 || ret >= size ) {
return -1;
}
return ret;
}
q_shared.h
look for this code:
Code:
// strlen that discounts Quake color sequences
int Q_PrintStrlen( const char *string );
// removes color sequences from string
char *Q_CleanStr( char *string );
add this below it:
Code:
int Q_vsnprintf( char *dest, int size, const char *fmt, va_list argptr );
Use this for many things like, G_Printf, G_LogPrintf, G_Error, CG_Printf, and CG_Error that use vsprintf. However, leave va, and if you wish to use a cleaner Com_sprintf try something like this:
(comes from Enemy Territory)
Code:
void QDECL Com_sprintf( char *dest, int size, const char *fmt, ...) {
int ret;
va_list argptr;
va_start (argptr,fmt);
ret = Q_vsnprintf (dest, size, fmt, argptr);
va_end (argptr);
if (ret == -1) {
Com_Printf ("Com_sprintf: overflow of %i bytes buffer\n", size);
}
}
My updated G_LogPrintf with the time fix also:
Code:
/*
=================
G_LogPrintf
Print to the logfile with a time stamp if it is open
=================
*/
void QDECL G_LogPrintf( const char *fmt, ... ) {
va_list argptr;
char string[1024];
int mins, seconds, msec, l;
msec = level.time;
seconds = msec / 1000;
mins = seconds / 60;
seconds %= 60;
msec %= 1000;
Com_sprintf( string, sizeof(string), "%i:%02i ", mins, seconds );
l = strlen( string );
va_start( argptr, fmt );
Q_vsnprintf( string + l, sizeof( string ) - l, fmt, argptr );
va_end( argptr );
if ( g_dedicated.integer ) {
G_Printf( "%s", string + l );
}
if ( !level.logFile ) {
return;
}
trap_FS_Write( string, strlen( string ), level.logFile );
}
Last edited by ensiform; 12-02-2006 at 12:49 AM.
|
|
you may:
quote & reply,
|
09-30-2006, 03:11 PM
|
#140
|
|
The Stig
Join Date: Nov 2004
Location: Sawtooth Cauldron
Posts: 1,242
Current Game: Borderlands 2
|
possibly giving ammo to incorrect index in cg_predict.c.
Scroll to bottom of CG_TouchItem in cg_predict.c
replace these lines:
Code:
if ( !cg.predictedPlayerState.ammo[ item->giTag ] ) {
cg.predictedPlayerState.ammo[ item->giTag ] = 1;
with:
Code:
if ( !cg.predictedPlayerState.ammo[ weaponData[item->giTag].ammoIndex ] ) {
cg.predictedPlayerState.ammo[ weaponData[item->giTag].ammoIndex ] = 1;
|
|
you may:
quote & reply,
|
12-02-2006, 12:48 AM
|
#141
|
|
The Stig
Join Date: Nov 2004
Location: Sawtooth Cauldron
Posts: 1,242
Current Game: Borderlands 2
|
I've just found out that Slider's fix posted on a previous page in this thread about detpacks and siege objectives when a player changes teams/disconnects does not entirely work. I've tested it and it still seems to cause them to damage the objectives.
Better solution: Remove all detpacks, trip mines, and thermals from the player who switches teams or disconnects/reconnects.
Also: BugFix13 is only part of the problem with the siege bridge lame, a properly placed player or other objects can still block the bridge and make it go back in. Fix: in SP_func_door make ent->spawnflags be 5 (start_open and crusher) for that mover and set ent->damage to 9999 if it is on mp/siege_hoth and is func_door and has an ent->target of "droptheclip".
|
|
you may:
quote & reply,
|
12-02-2006, 03:10 PM
|
#142
|
|
Impressive, Terran!
Join Date: May 2002
Posts: 9,153
|
That's strange, I thought my fix made it so that the mover just instantly kills anything blocking it if it gets jammed...
---Jedi Guardian of the Newbie Questions
---Masters of the Force Team Leader / Creator
---Open Jedi Project Lead Moderator / Co-Founder

|
|
you may:
quote & reply,
|
12-02-2006, 04:02 PM
|
#143
|
|
The Stig
Join Date: Nov 2004
Location: Sawtooth Cauldron
Posts: 1,242
Current Game: Borderlands 2
|
Well I just looked and that specific mover itself is not set to be a crusher or do damage so it really wouldn't do much to players.
|
|
you may:
quote & reply,
|
12-02-2006, 07:36 PM
|
#144
|
|
Impressive, Terran!
Join Date: May 2002
Posts: 9,153
|
Point taken. Go ahead and impliment it for OJP if you want. 
---Jedi Guardian of the Newbie Questions
---Masters of the Force Team Leader / Creator
---Open Jedi Project Lead Moderator / Co-Founder

|
|
you may:
quote & reply,
|
12-02-2006, 08:11 PM
|
#145
|
|
The Stig
Join Date: Nov 2004
Location: Sawtooth Cauldron
Posts: 1,242
Current Game: Borderlands 2
|
Will do
I may implement my other fix for the detpacks/trips/thermals and a person changing teams or leaving server if that is alright with you.
|
|
you may:
quote & reply,
|
12-02-2006, 09:42 PM
|
#146
|
|
Impressive, Terran!
Join Date: May 2002
Posts: 9,153
|
Sure, go ahead. You don't need pre-approval for minor bugfixes. I just mainly want to know about things that majorly rewrite gameplay/code beforehand. 
---Jedi Guardian of the Newbie Questions
---Masters of the Force Team Leader / Creator
---Open Jedi Project Lead Moderator / Co-Founder

|
|
you may:
quote & reply,
|
12-22-2006, 03:46 PM
|
#147
|
Join Date: Apr 2002
Location: New York
Posts: 288
|
bot_honorableduelacceptance and bot laming.
In ai_main.c, replace
Code:
if (InFieldOfVision(bs->viewangles, 100, e_ang_vec))
{ //Our enemy has his saber holstered and has challenged us to a duel, so challenge him back
if (!bs->cur_ps.saberHolstered)
{
Cmd_ToggleSaber_f(&g_entities[bs->client]);
}
else
{
if (bs->currentEnemy->client->ps.duelIndex == bs->client &&
bs->currentEnemy->client->ps.duelTime > level.time &&
!bs->cur_ps.duelInProgress)
{
Cmd_EngageDuel_f(&g_entities[bs->client]);
}
}
with:
Code:
if (InFieldOfVision(bs->viewangles, 100, e_ang_vec) && !bs->cur_ps.duelInProgress &&
!bs->currentEnemy->client->ps.fd.forcePowersActive )
{ //Our enemy has his saber holstered and has challenged us to a duel, so challenge him back
if (!bs->cur_ps.saberHolstered && !bs->cur_ps.saberInFlight )
{
Cmd_ToggleSaber_f(&g_entities[bs->client]);
}
else
{
if (bs->currentEnemy->client->ps.duelIndex == bs->client &&
bs->currentEnemy->client->ps.duelTime > level.time &&
!bs->cur_ps.duelInProgress)
{
Cmd_EngageDuel_f(&g_entities[bs->client]);
}
}
This will prevent people from laming the bots when they have their guard down.
|
|
you may:
quote & reply,
|
01-07-2007, 12:12 PM
|
#148
|
|
Lurker
Join Date: Jun 2006
Location: France
Posts: 3
|
This is my first post here, but I've been reading this forum for a while and this thread was very useful to me while programming my mod, so it's time for me to contribute too
I have finally fixed the "speeder lag" bug ensiform talked about earlier in this thread (well, I think this is the same bug - and if it is, the code he provided didn't fix it). Here is exactly when it happens: you're for example the client 1, and you're a spectator following the client 0. The client 0 fires an event (like attacking, or jumping on a vehicle..) while you're watching him. You stop following him. He climbs on a vehicle, and this is when the bug happen: your view begins to shake/lag horribly when this player is in view (or almost) and on the vehicle. As soon as he gets off, your view comes back to normal.
The problem is client-side, and here is the reason: while you are following someone, you receive his events, which calls CG_CheckPlayerstateEvents with the address of cg.snap->ps in the first argument. So the "cent->playerState = ps;" line of this function replaces the cent's (here, client 0) playerState ADDRESS (which should always be in the cgSendPSPool array) with the ADDRESS of the snapshot's playerState. Now you can imagine what happens in CG_Player when the client 0 is attached to the vehicle: his playerState->origin is changed, which also changes the cg.snap->ps.origin, and your view is moved when it shouldn't. It's shaky simply because the cg.snap is alternatively in cg.activeSnapshots[0] and in cg.activeSnapshots[1], so sometimes the snapshot is not modified and the origin is correct.
To make it short: in cg_playerState.c in CG_CheckPlayerstateEvents, comment the line 242:
Code:
void CG_CheckPlayerstateEvents( playerState_t *ps, playerState_t *ops ) {
...
//JLF ADDED to hopefully mark events as player event
//cent->playerState = ps;
...
}
I think it's ok to simply comment it, because it seems completely stupid, and the comment above (//JLF ADDED to hopefully mark events as player event) shows it was probably meant to be used on Xbox only (the JLF comments are often related to Xbox stuff). I didn't notice anything weird after commenting it, anyway.
Sorry for the long explanation for a so simple bugfix (1 line to comment, but it took me hours to find it), but I don't think it was obvious it was related to the bug described 
|
|
you may:
quote & reply,
|
01-07-2007, 12:35 PM
|
#149
|
|
The Stig
Join Date: Nov 2004
Location: Sawtooth Cauldron
Posts: 1,242
Current Game: Borderlands 2
|
This is an interesting theory, and I really didn't think mine was going to fix it in the first place, though it does force spectators off that vehicle it still isn't right. Good find Soh Raun.
|
|
you may:
quote & reply,
|
01-07-2007, 03:02 PM
|
#150
|
|
Impressive, Terran!
Join Date: May 2002
Posts: 9,153
|
Nice find Sol Raun. Welcome to the community.
---Jedi Guardian of the Newbie Questions
---Masters of the Force Team Leader / Creator
---Open Jedi Project Lead Moderator / Co-Founder

|
|
you may:
quote & reply,
|
01-08-2007, 12:48 PM
|
#151
|
|
Ex-Angel
Join Date: Jul 2002
Posts: 929
|
If that fix works, he just made Kurgan's day.
|
|
you may:
quote & reply,
|
01-20-2007, 09:44 PM
|
#152
|
|
The Stig
Join Date: Nov 2004
Location: Sawtooth Cauldron
Posts: 1,242
Current Game: Borderlands 2
|
Sometimes vehicle missiles bounce off walls when they should explode right away (IE: atst rockets when ur at a certain angle up against a wall)
Sometimes the muzzle for vehicle weapons is not properly set so like if your in the ATST on siege_hoth and up against some of the relatively small boxes, they still somehow block your shots because the missiles are being created down towards the bottom of the vehicle sometimes.
Shields tend to block projectiles above their visual height and I don't see why they would...
Many times shields are made extremely tiny if placed in some areas like on the bridge on hoth sometimes, or just made with really retarded angles where things don't turn out so nice.
|
|
you may:
quote & reply,
|
01-31-2007, 08:06 PM
|
#153
|
|
The Stig
Join Date: Nov 2004
Location: Sawtooth Cauldron
Posts: 1,242
Current Game: Borderlands 2
|
*BUMP*
Big bug can be found in lots of places in JKA code especially the anim parsing:
http://www.quakesrc.org/forums/viewt...?p=47222#47222
Read the post below the one in link Timbo has some insight on why its bad  .
I believe where they have if ( !token || !token[0] ) is fine but having just if ( !token ) is not :S
|
|
you may:
quote & reply,
|
02-04-2007, 07:53 PM
|
#154
|
|
The Stig
Join Date: Nov 2004
Location: Sawtooth Cauldron
Posts: 1,242
Current Game: Borderlands 2
|
Ambient Sounds Seem To Get Lost After snd_restart and the imfamous Sound bug in siege.
|
|
you may:
quote & reply,
|
02-18-2007, 02:53 PM
|
#155
|
Join Date: Aug 2002
Location: ent->ps.get_loc();
Posts: 25
|
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?
-- Griswald, RKR Project Co-Leader
|
|
you may:
quote & reply,
|
02-19-2007, 03:44 PM
|
#156
|
|
The Stig
Join Date: Nov 2004
Location: Sawtooth Cauldron
Posts: 1,242
Current Game: Borderlands 2
|
I would suggest using an unused variable in centity_t such as vChatTime for the body and pimp the client number on it, then in CG_G2WeaponInstance you can have the client-info for the proper client.
|
|
you may:
quote & reply,
|
03-07-2007, 12:40 PM
|
#157
|
|
The Stig
Join Date: Nov 2004
Location: Sawtooth Cauldron
Posts: 1,242
Current Game: Borderlands 2
|
I've found that there is a bug with ClientBegin...
You must catch PERS_SPAWN_COUNT before the ps is cleared, and then copy it back in after being cleared.. Otherwise you will find CG_Respawn on the client is not called like it is supposed to on *every* spawn. This is mostly noticable in siege or if you are trying to call a script on client for every spawn such as I do with Lua.
so do something like
int spawn_count;
copy eflags...
spawn_count = client->ps.persistant[PERS_SPAWN_COUNT];
... clear ps ...
copy eflags back...
client->ps.persistant[PERS_SPAWN_COUNT] = spawn_count;
|
|
you may:
quote & reply,
|
03-07-2007, 06:25 PM
|
#158
|
|
Impressive, Terran!
Join Date: May 2002
Posts: 9,153
|
it's not copied as part of the normal persistant save?
---Jedi Guardian of the Newbie Questions
---Masters of the Force Team Leader / Creator
---Open Jedi Project Lead Moderator / Co-Founder

|
|
you may:
quote & reply,
|
03-07-2007, 06:55 PM
|
#159
|
|
The Stig
Join Date: Nov 2004
Location: Sawtooth Cauldron
Posts: 1,242
Current Game: Borderlands 2
|
no its in ps.persistant[] not client.pers->
and ClientBegin itself, doesn't actually save anything... I found this while inspecting Enemy Territory as to why CG_Respawn is called in ET but not Q3 or JK at ClientBegin.
|
|
you may:
quote & reply,
|
03-08-2007, 02:12 PM
|
#160
|
|
Impressive, Terran!
Join Date: May 2002
Posts: 9,153
|
Ah, gotcha. Mind adding that fix to the OJP code?
---Jedi Guardian of the Newbie Questions
---Masters of the Force Team Leader / Creator
---Open Jedi Project Lead Moderator / Co-Founder

|
|
you may:
quote & reply,
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Forum Jump
|
|
|
|
|
|