Open deathsythe47 opened 9 years ago
Why to post client-side issues on server-side mod repository?
I don't even know how to simulate this, except for hacking some saber files to get some sabers which should not be allowed otherways.
Siege classes can have SS_TAVION and SS_DESANN specified in the .scl file.
Alright, and how did you come to conclusion that it should say "TAVION" and "DESANN"?
Because those are the names of the saber styles.
saber_styles_t TranslateSaberStyle( const char *name )
{
if ( !Q_stricmp( name, "fast" ) )
{
return SS_FAST;
}
if ( !Q_stricmp( name, "medium" ) )
{
return SS_MEDIUM;
}
if ( !Q_stricmp( name, "strong" ) )
{
return SS_STRONG;
}
if ( !Q_stricmp( name, "desann" ) )
{
return SS_DESANN;
}
if ( !Q_stricmp( name, "tavion" ) )
{
return SS_TAVION;
}
if ( !Q_stricmp( name, "dual" ) )
{
return SS_DUAL;
}
if ( !Q_stricmp( name, "staff" ) )
{
return SS_STAFF;
}
return SS_NONE;
}
//now: if using dual sabers, only dual and tavion (if given with this saber) are allowed
//okay to use tavion style, first saber gave it to us
//okay to use tavion style, second saber gave it to us
//tavion style is not allowed because neither of the sabers we're using gave it to us
if ( anim >= BOTH_A4_T__B_ && anim <= BOTH_D4_B____ )
{//desann
return FORCE_LEVEL_4;
}
if ( anim >= BOTH_A5_T__B_ && anim <= BOTH_D5_B____ )
{//tavion
return FORCE_LEVEL_2;
}
if ( anim >= BOTH_A6_T__B_ && anim <= BOTH_D6_B____ )
{//dual
return FORCE_LEVEL_2;
}
if ( anim >= BOTH_A7_T__B_ && anim <= BOTH_D7_B____ )
{//staff
return FORCE_LEVEL_2;
}
This is already fixed in OpenJK. Just needs import to SMod. See cg_draw.c
static void CG_DrawSimpleSaberStyle( const centity_t *cent )
{
uint32_t calcColor;
char num[7] = { 0 };
int weapX = 16;
if ( !cent->currentState.weapon ) // We don't have a weapon right now
{
return;
}
if ( cent->currentState.weapon != WP_SABER )
{
return;
}
switch ( cg.predictedPlayerState.fd.saberDrawAnimLevel )
{
default:
case SS_FAST:
Com_sprintf( num, sizeof( num ), "FAST" );
calcColor = CT_ICON_BLUE;
weapX = 0;
break;
case SS_MEDIUM:
Com_sprintf( num, sizeof( num ), "MEDIUM" );
calcColor = CT_YELLOW;
break;
case SS_STRONG:
Com_sprintf( num, sizeof( num ), "STRONG" );
calcColor = CT_HUD_RED;
break;
case SS_DESANN:
Com_sprintf( num, sizeof( num ), "DESANN" );
calcColor = CT_HUD_RED;
break;
case SS_TAVION:
Com_sprintf( num, sizeof( num ), "TAVION" );
calcColor = CT_ICON_BLUE;
break;
case SS_DUAL:
Com_sprintf( num, sizeof( num ), "AKIMBO" );
calcColor = CT_HUD_ORANGE;
break;
case SS_STAFF:
Com_sprintf( num, sizeof( num ), "STAFF" );
calcColor = CT_HUD_ORANGE;
break;
}
Obviously clientside.
They display correctly if you have default cg_hudfiles -- Desann shows as red stance, Tavion shows as blue stance.
However with cg_hudfiles 1, they both display as "FAST"
Instead they should say "TAVION" and "DESANN"