mirror of
https://github.com/DrBeef/JKXR.git
synced 2024-11-21 19:51:33 +00:00
Add Sith Sword to the cheat menu
This commit is contained in:
parent
5b98fcfbd6
commit
b1a9ff3990
6 changed files with 76 additions and 19 deletions
|
@ -5868,7 +5868,7 @@ static void CG_DoSaber( vec3_t origin, vec3_t dir, float length, float lengthMax
|
|||
#define MAX_MARK_POINTS 768
|
||||
extern markPoly_t *CG_AllocMark();
|
||||
|
||||
static void CG_CreateSaberMarks( vec3_t start, vec3_t end, vec3_t normal )
|
||||
static void CG_CreateSaberMarks( centity_t *cent, vec3_t start, vec3_t end, vec3_t normal )
|
||||
{
|
||||
// byte colors[4];
|
||||
int i, j, numFragments;
|
||||
|
@ -5955,17 +5955,20 @@ static void CG_CreateSaberMarks( vec3_t start, vec3_t end, vec3_t normal )
|
|||
mark->color[0] = mark->color[1] = mark->color[2] = mark->color[3] = 255;
|
||||
memcpy( mark->verts, verts, mf->numPoints * sizeof( verts[0] ) );
|
||||
|
||||
// And now do a glow pass
|
||||
mark = CG_AllocMark();
|
||||
mark->time = cg.time - 8500 + glowExtraTime;
|
||||
mark->fadeTime = glowFadeTime;
|
||||
mark->alphaFade = qfalse;
|
||||
mark->markShader = cgi_R_RegisterShader("gfx/effects/saberDamageGlow" );
|
||||
mark->poly.numVerts = mf->numPoints;
|
||||
mark->color[0] = 215 + Q_flrand(0.0f, 1.0f) * 40.0f;
|
||||
mark->color[1] = 96 + Q_flrand(0.0f, 1.0f) * 32.0f;
|
||||
mark->color[2] = mark->color[3] = Q_flrand(0.0f, 1.0f)*15.0f;
|
||||
memcpy( mark->verts, verts, mf->numPoints * sizeof( verts[0] ) );
|
||||
if ( cent->gent->client->ps.saber[0].type != SABER_SITH_SWORD )
|
||||
{
|
||||
// And now do a glow pass
|
||||
mark = CG_AllocMark();
|
||||
mark->time = cg.time - 8500 + glowExtraTime;
|
||||
mark->fadeTime = glowFadeTime;
|
||||
mark->alphaFade = qfalse;
|
||||
mark->markShader = cgi_R_RegisterShader("gfx/effects/saberDamageGlow");
|
||||
mark->poly.numVerts = mf->numPoints;
|
||||
mark->color[0] = 215 + Q_flrand(0.0f, 1.0f) * 40.0f;
|
||||
mark->color[1] = 96 + Q_flrand(0.0f, 1.0f) * 32.0f;
|
||||
mark->color[2] = mark->color[3] = Q_flrand(0.0f, 1.0f) * 15.0f;
|
||||
memcpy(mark->verts, verts, mf->numPoints * sizeof(verts[0]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -6566,7 +6569,7 @@ Ghoul2 Insert End
|
|||
|| (WP_SaberBladeUseSecondBladeStyle( &client->ps.saber[saberNum], bladeNum ) && !(client->ps.saber[saberNum].saberFlags2&SFL2_NO_WALL_MARKS2)) )
|
||||
{
|
||||
// Let's do some cool burn/glowing mark bits!!!
|
||||
CG_CreateSaberMarks( client->ps.saber[saberNum].blade[bladeNum].trail.oldPos[i], trace.endpos, trace.plane.normal );
|
||||
CG_CreateSaberMarks( cent, client->ps.saber[saberNum].blade[bladeNum].trail.oldPos[i], trace.endpos, trace.plane.normal );
|
||||
|
||||
if ( Q_irand( 1, client->ps.saber[saberNum].numBlades ) == 1 )
|
||||
{
|
||||
|
|
|
@ -280,6 +280,12 @@ LANG_ENGLISH "Staff"
|
|||
REFERENCE CHEATS_SABER_STYLE_STAFF_DESC
|
||||
LANG_ENGLISH "Use double-bladed lightsaber."
|
||||
|
||||
REFERENCE CHEATS_SABER_STYLE_SITH_ITEM
|
||||
LANG_ENGLISH "Sith Sword"
|
||||
|
||||
REFERENCE CHEATS_SABER_STYLE_SITH_DESC
|
||||
LANG_ENGLISH "Use Sith Sword."
|
||||
|
||||
REFERENCE CHEATS_SABER_COLOR_TITLE
|
||||
LANG_ENGLISH "Lightsaber Color:"
|
||||
|
||||
|
|
|
@ -369,6 +369,14 @@ REFERENCE CHEATS_SABER_STYLE_STAFF_DESC
|
|||
LANG_ENGLISH "Use double-bladed lightsaber."
|
||||
LANG_FRENCH "#same"
|
||||
|
||||
REFERENCE CHEATS_SABER_STYLE_SITH_ITEM
|
||||
LANG_ENGLISH "Sith Sword"
|
||||
LANG_FRENCH "#same"
|
||||
|
||||
REFERENCE CHEATS_SABER_STYLE_SITH_DESC
|
||||
LANG_ENGLISH "Use Sith Sword."
|
||||
LANG_FRENCH "#same"
|
||||
|
||||
REFERENCE CHEATS_SABER_COLOR_TITLE
|
||||
LANG_ENGLISH "Lightsaber Color:"
|
||||
LANG_FRENCH "#same"
|
||||
|
|
|
@ -369,6 +369,14 @@ REFERENCE CHEATS_SABER_STYLE_STAFF_DESC
|
|||
LANG_ENGLISH "Use double-bladed lightsaber."
|
||||
LANG_GERMAN "#same"
|
||||
|
||||
REFERENCE CHEATS_SABER_STYLE_SITH_ITEM
|
||||
LANG_ENGLISH "Sith Sword"
|
||||
LANG_GERMAN "#same"
|
||||
|
||||
REFERENCE CHEATS_SABER_STYLE_SITH_DESC
|
||||
LANG_ENGLISH "Use Sith Sword."
|
||||
LANG_GERMAN "#same"
|
||||
|
||||
REFERENCE CHEATS_SABER_COLOR_TITLE
|
||||
LANG_ENGLISH "Lightsaber Color:"
|
||||
LANG_GERMAN "#same"
|
||||
|
|
|
@ -369,6 +369,14 @@ REFERENCE CHEATS_SABER_STYLE_STAFF_DESC
|
|||
LANG_ENGLISH "Use double-bladed lightsaber."
|
||||
LANG_SPANISH "#same"
|
||||
|
||||
REFERENCE CHEATS_SABER_STYLE_SITH_ITEM
|
||||
LANG_ENGLISH "Sith Sword"
|
||||
LANG_SPANISH "#same"
|
||||
|
||||
REFERENCE CHEATS_SABER_STYLE_SITH_DESC
|
||||
LANG_ENGLISH "Use Sith Sword."
|
||||
LANG_SPANISH "#same"
|
||||
|
||||
REFERENCE CHEATS_SABER_COLOR_TITLE
|
||||
LANG_ENGLISH "Lightsaber Color:"
|
||||
LANG_SPANISH "#same"
|
||||
|
|
|
@ -278,7 +278,7 @@
|
|||
group none
|
||||
style WINDOW_STYLE_EMPTY
|
||||
type ITEM_TYPE_BUTTON
|
||||
rect 230 155 50 20
|
||||
rect 210 155 50 20
|
||||
text @MENUS_VR_CHEATS_SABER_STYLE_SINGLE_ITEM
|
||||
descText @MENUS_VR_CHEATS_SABER_STYLE_SINGLE_DESC
|
||||
font 2
|
||||
|
@ -302,7 +302,7 @@
|
|||
group none
|
||||
style WINDOW_STYLE_EMPTY
|
||||
type ITEM_TYPE_BUTTON
|
||||
rect 288 155 50 20
|
||||
rect 268 155 50 20
|
||||
text @MENUS_VR_CHEATS_SABER_STYLE_DUAL_ITEM
|
||||
descText @MENUS_VR_CHEATS_SABER_STYLE_DUAL_DESC
|
||||
font 2
|
||||
|
@ -316,7 +316,7 @@
|
|||
action
|
||||
{
|
||||
play "sound/interface/button1.wav" ;
|
||||
exec "saber single 1; vstr set_saber_color"
|
||||
exec "saber single_1 single_1; vstr set_saber_color"
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -326,9 +326,9 @@
|
|||
group none
|
||||
style WINDOW_STYLE_EMPTY
|
||||
type ITEM_TYPE_BUTTON
|
||||
rect 350 155 50 20
|
||||
rect 330 155 50 20
|
||||
text @MENUS_VR_CHEATS_SABER_STYLE_STAFF_ITEM
|
||||
descText @MENUS_VR_CHEATS_SABER_STYLE_STAFF_DESC
|
||||
descText @MENUS_VR_CHEATS_SABER_STYLE_STAFF_DESC
|
||||
font 2
|
||||
textscale 1
|
||||
textalignx 25
|
||||
|
@ -340,7 +340,31 @@
|
|||
action
|
||||
{
|
||||
play "sound/interface/button1.wav" ;
|
||||
exec "saber dual_3; vstr set_saber_color"
|
||||
exec "saber dual_1; vstr set_saber_color"
|
||||
}
|
||||
}
|
||||
|
||||
itemDef
|
||||
{
|
||||
name none
|
||||
group none
|
||||
style WINDOW_STYLE_EMPTY
|
||||
type ITEM_TYPE_BUTTON
|
||||
rect 410 155 50 20
|
||||
text @MENUS_VR_CHEATS_SABER_STYLE_SITH_ITEM
|
||||
descText @MENUS_VR_CHEATS_SABER_STYLE_SITH_DESC
|
||||
font 2
|
||||
textscale 1
|
||||
textalignx 25
|
||||
textalign ITEM_ALIGN_CENTER
|
||||
forecolor .509 .609 .847 1
|
||||
appearance_slot 1
|
||||
visible 1
|
||||
|
||||
action
|
||||
{
|
||||
play "sound/interface/button1.wav" ;
|
||||
exec "saber sith_sword"
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue