Jedi Outcast v055
This commit is contained in:
parent
0c7c4bdee2
commit
ccbb2c0000
636 changed files with 19310 additions and 9565 deletions
5
CODE-mp/Splines/mssccprj.scc
Normal file
5
CODE-mp/Splines/mssccprj.scc
Normal file
|
@ -0,0 +1,5 @@
|
|||
SCC = This is a Source Code Control file
|
||||
|
||||
[Splines.dsp]
|
||||
SCC_Aux_Path = "\\ravend\vss_projects\jk2sof2MP"
|
||||
SCC_Project_Name = "$/General/code/Splines", GAAAAAAA
|
BIN
CODE-mp/Splines/vssver.scc
Normal file
BIN
CODE-mp/Splines/vssver.scc
Normal file
Binary file not shown.
|
@ -857,6 +857,8 @@ botlib_export_t *GetBotLibAPI(int apiVersion, botlib_import_t *import) {
|
|||
be_botlib_export.PC_FreeSourceHandle = PC_FreeSourceHandle;
|
||||
be_botlib_export.PC_ReadTokenHandle = PC_ReadTokenHandle;
|
||||
be_botlib_export.PC_SourceFileAndLine = PC_SourceFileAndLine;
|
||||
be_botlib_export.PC_LoadGlobalDefines = PC_LoadGlobalDefines;
|
||||
be_botlib_export.PC_RemoveAllGlobalDefines = PC_RemoveAllGlobalDefines;
|
||||
|
||||
be_botlib_export.BotLibStartFrame = Export_BotLibStartFrame;
|
||||
be_botlib_export.BotLibLoadMap = Export_BotLibLoadMap;
|
|
@ -101,7 +101,12 @@ token_t *freetokens; //free tokens from the heap
|
|||
*/
|
||||
|
||||
//list with global defines added to every source loaded
|
||||
define_t *globaldefines;
|
||||
#if DEFINEHASHING
|
||||
define_t **globaldefines = NULL;
|
||||
#else
|
||||
define_t *globaldefines = NULL;
|
||||
#endif
|
||||
qboolean addGlobalDefine = qfalse;
|
||||
|
||||
//============================================================================
|
||||
//
|
||||
|
@ -555,9 +560,21 @@ void PC_AddDefineToHash(define_t *define, define_t **definehash)
|
|||
{
|
||||
int hash;
|
||||
|
||||
|
||||
if ( addGlobalDefine )
|
||||
{
|
||||
definehash = globaldefines;
|
||||
define->flags |= DEFINE_GLOBAL;
|
||||
}
|
||||
|
||||
hash = PC_NameHash(define->name);
|
||||
define->hashnext = definehash[hash];
|
||||
definehash[hash] = define;
|
||||
|
||||
if ( addGlobalDefine )
|
||||
{
|
||||
define->globalnext = define->hashnext;
|
||||
}
|
||||
} //end of the function PC_AddDefineToHash
|
||||
//============================================================================
|
||||
//
|
||||
|
@ -1117,12 +1134,16 @@ int PC_Directive_undef(source_t *source)
|
|||
if (define->flags & DEFINE_FIXED)
|
||||
{
|
||||
SourceWarning(source, "can't undef %s", token.string);
|
||||
} //end if
|
||||
} //end if
|
||||
else
|
||||
{
|
||||
if (lastdefine) lastdefine->hashnext = define->hashnext;
|
||||
else source->definehash[hash] = define->hashnext;
|
||||
PC_FreeDefine(define);
|
||||
|
||||
if ( !(define->flags & DEFINE_GLOBAL ) )
|
||||
{
|
||||
PC_FreeDefine(define);
|
||||
}
|
||||
} //end else
|
||||
break;
|
||||
} //end if
|
||||
|
@ -1361,6 +1382,11 @@ int PC_AddDefine(source_t *source, char *string)
|
|||
{
|
||||
define_t *define;
|
||||
|
||||
if ( addGlobalDefine )
|
||||
{
|
||||
return PC_AddGlobalDefine ( string );
|
||||
}
|
||||
|
||||
define = PC_DefineFromString(string);
|
||||
if (!define) return qfalse;
|
||||
#if DEFINEHASHING
|
||||
|
@ -1380,12 +1406,14 @@ int PC_AddDefine(source_t *source, char *string)
|
|||
//============================================================================
|
||||
int PC_AddGlobalDefine(char *string)
|
||||
{
|
||||
#if !DEFINEHASHING
|
||||
define_t *define;
|
||||
|
||||
define = PC_DefineFromString(string);
|
||||
if (!define) return qfalse;
|
||||
define->next = globaldefines;
|
||||
globaldefines = define;
|
||||
#endif
|
||||
return qtrue;
|
||||
} //end of the function PC_AddGlobalDefine
|
||||
//============================================================================
|
||||
|
@ -1397,6 +1425,7 @@ int PC_AddGlobalDefine(char *string)
|
|||
//============================================================================
|
||||
int PC_RemoveGlobalDefine(char *name)
|
||||
{
|
||||
#if !DEFINEHASHING
|
||||
define_t *define;
|
||||
|
||||
define = PC_FindDefine(globaldefines, name);
|
||||
|
@ -1405,6 +1434,7 @@ int PC_RemoveGlobalDefine(char *name)
|
|||
PC_FreeDefine(define);
|
||||
return qtrue;
|
||||
} //end if
|
||||
#endif
|
||||
return qfalse;
|
||||
} //end of the function PC_RemoveGlobalDefine
|
||||
//============================================================================
|
||||
|
@ -1418,11 +1448,27 @@ void PC_RemoveAllGlobalDefines(void)
|
|||
{
|
||||
define_t *define;
|
||||
|
||||
#if DEFINEHASHING
|
||||
int i;
|
||||
if ( globaldefines )
|
||||
{
|
||||
for (i = 0; i < DEFINEHASHSIZE; i++)
|
||||
{
|
||||
while(globaldefines[i])
|
||||
{
|
||||
define = globaldefines[i];
|
||||
globaldefines[i] = globaldefines[i]->globalnext;
|
||||
PC_FreeDefine(define);
|
||||
}
|
||||
}
|
||||
}
|
||||
#else //DEFINEHASHING
|
||||
for (define = globaldefines; define; define = globaldefines)
|
||||
{
|
||||
globaldefines = globaldefines->next;
|
||||
PC_FreeDefine(define);
|
||||
} //end for
|
||||
#endif
|
||||
} //end of the function PC_RemoveAllGlobalDefines
|
||||
//============================================================================
|
||||
//
|
||||
|
@ -1475,18 +1521,33 @@ define_t *PC_CopyDefine(source_t *source, define_t *define)
|
|||
//============================================================================
|
||||
void PC_AddGlobalDefinesToSource(source_t *source)
|
||||
{
|
||||
define_t *define, *newdefine;
|
||||
define_t *define;
|
||||
|
||||
#if DEFINEHASHING
|
||||
int i;
|
||||
for (i = 0; i < DEFINEHASHSIZE; i++)
|
||||
{
|
||||
define = globaldefines[i];
|
||||
while(define)
|
||||
{
|
||||
define->hashnext = NULL;
|
||||
PC_AddDefineToHash(define, source->definehash);
|
||||
|
||||
define = define->globalnext;
|
||||
}
|
||||
}
|
||||
#else //DEFINEHASHING
|
||||
define_t* newdefine;
|
||||
for (define = globaldefines; define; define = define->next)
|
||||
{
|
||||
newdefine = PC_CopyDefine(source, define);
|
||||
#if DEFINEHASHING
|
||||
PC_AddDefineToHash(newdefine, source->definehash);
|
||||
#else //DEFINEHASHING
|
||||
|
||||
|
||||
|
||||
newdefine->next = source->defines;
|
||||
source->defines = newdefine;
|
||||
#endif //DEFINEHASHING
|
||||
} //end for
|
||||
}
|
||||
#endif
|
||||
} //end of the function PC_AddGlobalDefinesToSource
|
||||
//============================================================================
|
||||
//
|
||||
|
@ -2982,6 +3043,13 @@ source_t *LoadSourceFile(const char *filename)
|
|||
|
||||
PC_InitTokenHeap();
|
||||
|
||||
#if DEFINEHASHING
|
||||
if ( !globaldefines )
|
||||
{
|
||||
globaldefines = (struct define_s **)GetClearedMemory(DEFINEHASHSIZE * sizeof(define_t *));
|
||||
}
|
||||
#endif
|
||||
|
||||
script = LoadScriptFile(filename);
|
||||
if (!script) return NULL;
|
||||
|
||||
|
@ -3048,6 +3116,7 @@ void FreeSource(source_t *source)
|
|||
token_t *token;
|
||||
define_t *define;
|
||||
indent_t *indent;
|
||||
define_t *nextdefine;
|
||||
int i;
|
||||
|
||||
//PC_PrintDefineHashTable(source->definehash);
|
||||
|
@ -3068,12 +3137,20 @@ void FreeSource(source_t *source)
|
|||
#if DEFINEHASHING
|
||||
for (i = 0; i < DEFINEHASHSIZE; i++)
|
||||
{
|
||||
while(source->definehash[i])
|
||||
define = source->definehash[i];
|
||||
while(define)
|
||||
{
|
||||
define = source->definehash[i];
|
||||
source->definehash[i] = source->definehash[i]->hashnext;
|
||||
PC_FreeDefine(define);
|
||||
nextdefine = define->hashnext;
|
||||
|
||||
if ( !(define->flags & DEFINE_GLOBAL) )
|
||||
{
|
||||
PC_FreeDefine(define);
|
||||
}
|
||||
|
||||
define = nextdefine;
|
||||
} //end while
|
||||
|
||||
source->definehash[i] = NULL;
|
||||
} //end for
|
||||
#else //DEFINEHASHING
|
||||
//free all defines
|
||||
|
@ -3145,6 +3222,28 @@ int PC_FreeSourceHandle(int handle)
|
|||
sourceFiles[handle] = NULL;
|
||||
return qtrue;
|
||||
} //end of the function PC_FreeSourceHandle
|
||||
|
||||
int PC_LoadGlobalDefines ( const char* filename )
|
||||
{
|
||||
int handle;
|
||||
token_t token;
|
||||
|
||||
handle = PC_LoadSourceHandle ( filename );
|
||||
if ( handle < 1 )
|
||||
return qfalse;
|
||||
|
||||
addGlobalDefine = qtrue;
|
||||
|
||||
// Read all the token files which will add the defines globally
|
||||
while ( PC_ReadToken(sourceFiles[handle], &token) );
|
||||
|
||||
addGlobalDefine = qfalse;
|
||||
|
||||
PC_FreeSourceHandle ( handle );
|
||||
|
||||
return qtrue;
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
//
|
||||
// Parameter: -
|
|
@ -37,6 +37,7 @@
|
|||
|
||||
|
||||
#define DEFINE_FIXED 0x0001
|
||||
#define DEFINE_GLOBAL 0x0002
|
||||
|
||||
#define BUILTIN_LINE 1
|
||||
#define BUILTIN_FILE 2
|
||||
|
@ -61,6 +62,7 @@ typedef struct define_s
|
|||
token_t *tokens; //macro tokens (possibly containing parm tokens)
|
||||
struct define_s *next; //next defined macro in a list
|
||||
struct define_s *hashnext; //next define in the hash chain
|
||||
struct define_s *globalnext; //used to link up the globald defines
|
||||
} define_t;
|
||||
|
||||
//indents
|
||||
|
@ -161,3 +163,6 @@ int PC_FreeSourceHandle(int handle);
|
|||
int PC_ReadTokenHandle(int handle, pc_token_t *pc_token);
|
||||
int PC_SourceFileAndLine(int handle, char *filename, int *line);
|
||||
void PC_CheckOpenSourceHandles(void);
|
||||
int PC_LoadGlobalDefines ( const char* filename );
|
||||
void PC_RemoveAllGlobalDefines ( void );
|
||||
|
5
CODE-mp/botlib/mssccprj.scc
Normal file
5
CODE-mp/botlib/mssccprj.scc
Normal file
|
@ -0,0 +1,5 @@
|
|||
SCC = This is a Source Code Control file
|
||||
|
||||
[botlib.dsp]
|
||||
SCC_Aux_Path = "\\ravend\vss_projects\jk2sof2MP"
|
||||
SCC_Project_Name = "$/General/code/botlib", ACAAAAAA
|
BIN
CODE-mp/botlib/vssver.scc
Normal file
BIN
CODE-mp/botlib/vssver.scc
Normal file
Binary file not shown.
8
CODE-mp/buildvms.bat
Normal file
8
CODE-mp/buildvms.bat
Normal file
|
@ -0,0 +1,8 @@
|
|||
set include=
|
||||
cd game
|
||||
call game
|
||||
cd ..\cgame
|
||||
call cgame
|
||||
cd ..\ui
|
||||
call ui
|
||||
cd ..
|
|
@ -354,6 +354,11 @@ SOURCE=..\ghoul2\G2.h
|
|||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\JK2_cgame.def
|
||||
# PROP Exclude_From_Build 1
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\ui\keycodes.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
@ -387,12 +392,12 @@ SOURCE=..\ui\ui_shared.h
|
|||
# End Group
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cg_syscalls.asm
|
||||
SOURCE=.\cgame.bat
|
||||
# PROP Exclude_From_Build 1
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\JK2_cgame.def
|
||||
SOURCE=.\cgame.q3asm
|
||||
# PROP Exclude_From_Build 1
|
||||
# End Source File
|
||||
# End Target
|
|
@ -140,6 +140,8 @@ stringID_table_t animTable [MAX_ANIMATIONS+1] =
|
|||
ENUM2STRING(BOTH_MELEE4), //# Fourth melee attack
|
||||
ENUM2STRING(BOTH_MELEE5), //# Fifth melee attack
|
||||
ENUM2STRING(BOTH_MELEE6), //# Sixth melee attack
|
||||
ENUM2STRING(BOTH_THERMAL_READY), //# pull back with thermal
|
||||
ENUM2STRING(BOTH_THERMAL_THROW), //# throw thermal
|
||||
//* #sep ENUM2STRING(BOTH_ SABER ANIMS
|
||||
//Saber attack anims - power level 2
|
||||
ENUM2STRING(BOTH_A1_T__B_), //# Fast weak vertical attack top to bottom
|
||||
|
@ -637,7 +639,7 @@ stringID_table_t animTable [MAX_ANIMATIONS+1] =
|
|||
ENUM2STRING(BOTH_STAND1TOSTAND5), //# Transition from stand1 to stand5
|
||||
ENUM2STRING(BOTH_STAND5TOSTAND1), //# Transition from stand5 to stand1
|
||||
ENUM2STRING(BOTH_STAND5TOSTAND8), //# Transition from stand5 to stand8
|
||||
ENUM2STRING(BOTH_STAND8TOSTAND5), //# Transition from stand5 to stand8
|
||||
ENUM2STRING(BOTH_STAND8TOSTAND5), //# Transition from stand8 to stand5
|
||||
|
||||
ENUM2STRING(BOTH_CONSOLE1START), //# typing at a console
|
||||
ENUM2STRING(BOTH_CONSOLE1), //# typing at a console
|
||||
|
@ -652,48 +654,6 @@ stringID_table_t animTable [MAX_ANIMATIONS+1] =
|
|||
ENUM2STRING(BOTH_GESTURE1), //# Generic gesture), non-specific
|
||||
ENUM2STRING(BOTH_GESTURE2), //# Generic gesture), non-specific
|
||||
ENUM2STRING(BOTH_GESTURE3), //# Generic gesture), non-specific
|
||||
ENUM2STRING(BOTH_TALK1), //# Generic talk anim
|
||||
ENUM2STRING(BOTH_TALKCOMM1START), //# Start talking into a comm link
|
||||
ENUM2STRING(BOTH_TALKCOMM1), //# Talking into a comm link
|
||||
ENUM2STRING(BOTH_TALKCOMM1STOP), //# Stop talking into a comm link
|
||||
ENUM2STRING(BOTH_TALKGESTURE1), //# Generic talk anim
|
||||
ENUM2STRING(BOTH_TALKGESTURE2), //# Generic talk anim
|
||||
ENUM2STRING(BOTH_TALKGESTURE3), //# Generic talk anim
|
||||
|
||||
ENUM2STRING(BOTH_TALKGESTURE4START), //# Beginning talk anim 4
|
||||
ENUM2STRING(BOTH_TALKGESTURE4), //# Talk gesture 4
|
||||
ENUM2STRING(BOTH_TALKGESTURE4STOP), //# Ending talk anim 4
|
||||
ENUM2STRING(BOTH_TALKGESTURE5START), //# Start hand on chin
|
||||
ENUM2STRING(BOTH_TALKGESTURE5), //# Hand on chin
|
||||
ENUM2STRING(BOTH_TALKGESTURE5STOP), //# Stop hand on chin
|
||||
ENUM2STRING(BOTH_TALKGESTURE6START), //# Starting Motions to self
|
||||
ENUM2STRING(BOTH_TALKGESTURE6), //# Pointing at self
|
||||
ENUM2STRING(BOTH_TALKGESTURE6STOP), //# Ending Motions to self
|
||||
ENUM2STRING(BOTH_TALKGESTURE7START), //# Start touches Kyle on shoulder
|
||||
ENUM2STRING(BOTH_TALKGESTURE7), //# Hold touches Kyle on shoulder
|
||||
ENUM2STRING(BOTH_TALKGESTURE7STOP), //# Ending touches Kyle on shoulder
|
||||
ENUM2STRING(BOTH_TALKGESTURE8START), //# Lando's chin hold
|
||||
ENUM2STRING(BOTH_TALKGESTURE8), //# Lando's chin hold
|
||||
ENUM2STRING(BOTH_TALKGESTURE8STOP), //# Lando's chin hold
|
||||
ENUM2STRING(BOTH_TALKGESTURE9), //# Same as gesture 2 but with the right hand
|
||||
ENUM2STRING(BOTH_TALKGESTURE10), //# Shoulder shrug
|
||||
ENUM2STRING(BOTH_TALKGESTURE11START), //# Arms folded across chest
|
||||
ENUM2STRING(BOTH_TALKGESTURE11STOP), //# Arms folded across chest
|
||||
ENUM2STRING(BOTH_TALKGESTURE12), //# Tavion taunting Kyle
|
||||
ENUM2STRING(BOTH_TALKGESTURE13START), //# Luke warning Kyle
|
||||
ENUM2STRING(BOTH_TALKGESTURE13), //# Luke warning Kyle
|
||||
ENUM2STRING(BOTH_TALKGESTURE13STOP), //# Luke warning Kyle
|
||||
ENUM2STRING(BOTH_TALKGESTURE14), //# Luke gesturing to Kyle
|
||||
|
||||
ENUM2STRING(BOTH_TALKGESTURE15START), //# Desann taunting Kyle
|
||||
ENUM2STRING(BOTH_TALKGESTURE15), //# Desann taunting Kyle
|
||||
ENUM2STRING(BOTH_TALKGESTURE15STOP), //# Desann taunting Kyle
|
||||
ENUM2STRING(BOTH_TALKGESTURE16), //# Bartender gesture cin #15
|
||||
ENUM2STRING(BOTH_TALKGESTURE17), //# Bartender gesture cin #15
|
||||
ENUM2STRING(BOTH_TALKGESTURE18), //# Bartender gesture cin #15
|
||||
ENUM2STRING(BOTH_TALKGESTURE19START), //# Desann lifting his arm "Join me" (cin #34)
|
||||
ENUM2STRING(BOTH_TALKGESTURE19STOP), //# Desann lifting his arm "Join me" (cin #34)
|
||||
ENUM2STRING(BOTH_TALKGESTURE20START), //# Kyle lifting his arm "Join us" (cin #34)
|
||||
ENUM2STRING(BOTH_PAUSE1START), //# Luke pauses to warn Kyle (cin #24) start
|
||||
ENUM2STRING(BOTH_PAUSE1STOP), //# Luke pauses to warn Kyle (cin #24) stop
|
||||
|
||||
|
@ -748,10 +708,14 @@ stringID_table_t animTable [MAX_ANIMATIONS+1] =
|
|||
ENUM2STRING(BOTH_SILENCEGESTURE1), //# Luke silencing Kyle with a raised hand (cin #37)
|
||||
ENUM2STRING(BOTH_REACHFORSABER1), //# Luke holding hand out for Kyle's saber (cin #37)
|
||||
ENUM2STRING(BOTH_PUNCHER1), //# Jan punching Kyle in the shoulder (cin #37)
|
||||
ENUM2STRING(BOTH_CONSTRAINER1HOLD), //# Static pose of starting Tavion constraining Jan (cin #9)
|
||||
ENUM2STRING(BOTH_CONSTRAINEE1HOLD), //# Static pose of starting Jan being constrained by Tavion (cin #9)
|
||||
ENUM2STRING(BOTH_CONSTRAINER1STAND), //# Tavion constraining Jan in a stand pose (cin #9)
|
||||
ENUM2STRING(BOTH_CONSTRAINEE1STAND), //# Jan being constrained in a stand pose (cin #9)
|
||||
ENUM2STRING(BOTH_CONSTRAINER1WALK), //# Tavion constraining Jan in a walking loop (cin #9)
|
||||
ENUM2STRING(BOTH_CONSTRAINEE1WALK), //# Jan being constrained in a walking loop (cin #9)
|
||||
ENUM2STRING(BOTH_CONSTRAINER1WALK), //# Tavion shoving jan forward (cin #9)
|
||||
ENUM2STRING(BOTH_CONSTRAINEE1WALK), //# Jan being shoved forward by Tavion (cin #9)
|
||||
ENUM2STRING(BOTH_CONSTRAINER1LOOP), //# Tavion walking with Jan in a loop (cin #9)
|
||||
ENUM2STRING(BOTH_CONSTRAINEE1LOOP), //# Jan walking with Tavion in a loop (cin #9)
|
||||
ENUM2STRING(BOTH_SABERKILLER1), //# Tavion about to strike Jan with saber (cin #9)
|
||||
ENUM2STRING(BOTH_SABERKILLEE1), //# Jan about to be struck by Tavion with saber (cin #9)
|
||||
ENUM2STRING(BOTH_HANDSHAKER1START), //# Luke shaking Kyle's hand (cin #37)
|
||||
|
@ -762,26 +726,6 @@ stringID_table_t animTable [MAX_ANIMATIONS+1] =
|
|||
ENUM2STRING(BOTH_LAUGH1STOP), //# Reelo laughing (cin #18)
|
||||
ENUM2STRING(BOTH_ESCAPEPOD_LEAVE1), //# Kyle leaving escape pod (cin #33)
|
||||
ENUM2STRING(BOTH_ESCAPEPOD_LEAVE2), //# Jan leaving escape pod (cin #33)
|
||||
ENUM2STRING(BOTH_HUGGER1), //# Kyle hugging Jan (cin #29)
|
||||
ENUM2STRING(BOTH_HUGGERSTOP1), //# Kyle stop hugging Jan but don't let her go (cin #29)
|
||||
ENUM2STRING(BOTH_HUGGERSTOP2), //# Kyle let go of Jan and step back (cin #29)
|
||||
ENUM2STRING(BOTH_HUGGEE1), //# Jan being hugged (cin #29)
|
||||
ENUM2STRING(BOTH_HUGGEESTOP1), //# Jan stop being hugged but don't let go (cin #29)
|
||||
ENUM2STRING(BOTH_HUGGEESTOP2), //# Jan released from hug (cin #29)
|
||||
ENUM2STRING(BOTH_KISSER1), //# Temp until the Kiss anim gets split up
|
||||
ENUM2STRING(BOTH_KISSER1START1), //# Kyle start kissing Jan
|
||||
ENUM2STRING(BOTH_KISSER1START2), //# Kyle start kissing Jan
|
||||
ENUM2STRING(BOTH_KISSER1LOOP), //# Kyle loop kissing Jan
|
||||
ENUM2STRING(BOTH_KISSER1STOP), //# Temp until the Kiss anim gets split up
|
||||
ENUM2STRING(BOTH_KISSER1STOP1), //# Kyle stop kissing but don't let go
|
||||
ENUM2STRING(BOTH_KISSER1STOP2), //# Kyle step back from Jan
|
||||
ENUM2STRING(BOTH_KISSEE1), //# Temp until the Kiss anim gets split up
|
||||
ENUM2STRING(BOTH_KISSEE1START1), //# Jan start being kissed
|
||||
ENUM2STRING(BOTH_KISSEE1START2), //# Jan start2 being kissed
|
||||
ENUM2STRING(BOTH_KISSEE1LOOP), //# Jan loop being kissed
|
||||
ENUM2STRING(BOTH_KISSEE1STOP), //# Temp until the Kiss anim gets split up
|
||||
ENUM2STRING(BOTH_KISSEE1STOP1), //# Jan stop being kissed but don't let go
|
||||
ENUM2STRING(BOTH_KISSEE1STOP2), //# Jan wait for Kyle to step back
|
||||
ENUM2STRING(BOTH_BARTENDER_IDLE1), //# Bartender idle in cin #15
|
||||
ENUM2STRING(BOTH_BARTENDER_THROW1), //# Bartender throws glass in cin #15
|
||||
ENUM2STRING(BOTH_BARTENDER_COWERSTART), //# Start of Bartender raising both hands up in surrender (cin #16)
|
||||
|
@ -867,6 +811,7 @@ stringID_table_t animTable [MAX_ANIMATIONS+1] =
|
|||
ENUM2STRING(BOTH_WALK4), //# Walk cycle goes to a stand4
|
||||
ENUM2STRING(BOTH_WALK5), //# Tavion taunting Kyle (cin 22)
|
||||
ENUM2STRING(BOTH_WALK6), //# Slow walk for Luke (cin 12)
|
||||
ENUM2STRING(BOTH_WALK7), //# Fast walk
|
||||
ENUM2STRING(BOTH_WALKTORUN1), //# transition from walk to run
|
||||
ENUM2STRING(BOTH_RUN1), //# Full run
|
||||
ENUM2STRING(BOTH_RUN1START), //# Start into full run1
|
||||
|
@ -953,15 +898,21 @@ stringID_table_t animTable [MAX_ANIMATIONS+1] =
|
|||
|
||||
ENUM2STRING(BOTH_DIVE1), //# Dive!
|
||||
|
||||
ENUM2STRING(BOTH_SABERFAST_STANCE),
|
||||
ENUM2STRING(BOTH_SABERSLOW_STANCE),
|
||||
ENUM2STRING(BOTH_ENGAGETAUNT),
|
||||
ENUM2STRING(BOTH_A2_STABBACK1), //# Stab saber backward
|
||||
ENUM2STRING(BOTH_ATTACK_BACK), //# Swing around backwards and attack
|
||||
ENUM2STRING(BOTH_FJSS_TR_BL), //# jump spin slash tr to bl
|
||||
ENUM2STRING(BOTH_FJSS_TL_BR), //# jump spin slash bl to tr
|
||||
ENUM2STRING(BOTH_JUMPFLIPSLASHDOWN1),//#
|
||||
ENUM2STRING(BOTH_JUMPFLIPSTABDOWN),//#
|
||||
ENUM2STRING(BOTH_FORCELEAP2_T__B_),//#
|
||||
ENUM2STRING(BOTH_LUNGE2_B__T_),//#
|
||||
ENUM2STRING(BOTH_CROUCHATTACKBACK1),//#
|
||||
ENUM2STRING(BOTH_ARIAL_LEFT), //#
|
||||
ENUM2STRING(BOTH_ARIAL_RIGHT), //#
|
||||
ENUM2STRING(BOTH_CARTWHEEL_LEFT), //#
|
||||
ENUM2STRING(BOTH_CARTWHEEL_RIGHT), //#
|
||||
ENUM2STRING(BOTH_FLIP_LEFT), //#
|
||||
ENUM2STRING(BOTH_FLIP_LEFT), //#
|
||||
ENUM2STRING(BOTH_FLIP_BACK1), //#
|
||||
ENUM2STRING(BOTH_FLIP_BACK2), //#
|
||||
ENUM2STRING(BOTH_FLIP_BACK3), //#
|
||||
|
@ -970,17 +921,17 @@ stringID_table_t animTable [MAX_ANIMATIONS+1] =
|
|||
ENUM2STRING(BOTH_WALL_RUN_RIGHT), //#
|
||||
ENUM2STRING(BOTH_WALL_RUN_RIGHT_FLIP),//#
|
||||
ENUM2STRING(BOTH_WALL_RUN_RIGHT_STOP),//#
|
||||
ENUM2STRING(BOTH_WALL_RUN_LEFT), //#
|
||||
ENUM2STRING(BOTH_WALL_RUN_LEFT), //#
|
||||
ENUM2STRING(BOTH_WALL_RUN_LEFT_FLIP),//#
|
||||
ENUM2STRING(BOTH_WALL_RUN_LEFT_STOP),//#
|
||||
ENUM2STRING(BOTH_WALL_FLIP_RIGHT), //#
|
||||
ENUM2STRING(BOTH_WALL_FLIP_LEFT), //#
|
||||
ENUM2STRING(BOTH_WALL_FLIP_FWD), //#
|
||||
ENUM2STRING(BOTH_KNOCKDOWN1), //#
|
||||
ENUM2STRING(BOTH_KNOCKDOWN2), //#
|
||||
ENUM2STRING(BOTH_KNOCKDOWN3), //#
|
||||
ENUM2STRING(BOTH_KNOCKDOWN4), //#
|
||||
ENUM2STRING(BOTH_KNOCKDOWN5), //#
|
||||
ENUM2STRING(BOTH_WALL_FLIP_FWD), //#
|
||||
ENUM2STRING(BOTH_KNOCKDOWN1), //# knocked backwards
|
||||
ENUM2STRING(BOTH_KNOCKDOWN2), //# knocked backwards hard
|
||||
ENUM2STRING(BOTH_KNOCKDOWN3), //# knocked forwards
|
||||
ENUM2STRING(BOTH_KNOCKDOWN4), //# knocked backwards from crouch
|
||||
ENUM2STRING(BOTH_KNOCKDOWN5), //# dupe of 3 - will be removed
|
||||
ENUM2STRING(BOTH_GETUP1), //#
|
||||
ENUM2STRING(BOTH_GETUP2), //#
|
||||
ENUM2STRING(BOTH_GETUP3), //#
|
||||
|
@ -998,21 +949,24 @@ stringID_table_t animTable [MAX_ANIMATIONS+1] =
|
|||
ENUM2STRING(BOTH_FORCE_GETUP_B6), //#
|
||||
ENUM2STRING(BOTH_WALL_FLIP_BACK1), //#
|
||||
ENUM2STRING(BOTH_WALL_FLIP_BACK2), //#
|
||||
ENUM2STRING(BOTH_SPIN1), //#
|
||||
ENUM2STRING(BOTH_SPIN1), //#
|
||||
ENUM2STRING(BOTH_CEILING_CLING), //# clinging to ceiling
|
||||
ENUM2STRING(BOTH_CEILING_DROP), //# dropping from ceiling cling
|
||||
|
||||
//TESTING
|
||||
ENUM2STRING(BOTH_FJSS_TR_BL), //# jump spin slash tr to bl
|
||||
ENUM2STRING(BOTH_FJSS_TL_BR), //# jump spin slash bl to tr
|
||||
ENUM2STRING(BOTH_DEATHFROMBACKSLASH),//#
|
||||
ENUM2STRING(BOTH_DEFLECTSLASH__R__L_FIN),//#
|
||||
ENUM2STRING(BOTH_RIGHTHANDCHOPPEDOFF),//#
|
||||
ENUM2STRING(BOTH_JUMPFLIPSLASHDOWN1),//#
|
||||
ENUM2STRING(BOTH_JUMPFLIPSTABDOWN),//#
|
||||
ENUM2STRING(BOTH_FORCELEAP2_T__B_),//#
|
||||
ENUM2STRING(BOTH_LUNGE2_B__T_),//#
|
||||
ENUM2STRING(BOTH_DEFLECTSLASH__R__L_FIN),//#
|
||||
ENUM2STRING(BOTH_BASHED1),//#
|
||||
ENUM2STRING(BOTH_ARIAL_F1),//#
|
||||
ENUM2STRING(BOTH_BUTTERFLY_FR1),//#
|
||||
ENUM2STRING(BOTH_BUTTERFLY_FL1),//#
|
||||
ENUM2STRING(BOTH_CROUCHATTACKBACK1),//#
|
||||
ENUM2STRING(BOTH_POSE1),//#
|
||||
ENUM2STRING(BOTH_POSE2),//#
|
||||
ENUM2STRING(BOTH_POSE3),//#
|
||||
ENUM2STRING(BOTH_POSE4),//#
|
||||
|
||||
//# #sep BOTH_ MISC MOVEMENT
|
||||
ENUM2STRING(BOTH_HIT1), //# Kyle hit by crate in cin #9
|
||||
|
@ -1073,28 +1027,9 @@ stringID_table_t animTable [MAX_ANIMATIONS+1] =
|
|||
ENUM2STRING(BOTH_INJURED6POINT), //# Chang points to door while in injured state
|
||||
ENUM2STRING(BOTH_INJUREDTOSTAND1), //# Runinjured to stand1
|
||||
|
||||
ENUM2STRING(BOTH_PROPUP1), //# Kyle getting up from having been knocked down (cin #9 end)
|
||||
ENUM2STRING(BOTH_CRAWLBACK1), //# Lying on back), crawling backwards with elbows
|
||||
ENUM2STRING(BOTH_SITWALL1), //# Sitting against a wall
|
||||
ENUM2STRING(BOTH_SLEEP1), //# laying on back-rknee up-rhand on torso
|
||||
ENUM2STRING(BOTH_SLEEP2), //# on floor-back against wall-arms crossed
|
||||
ENUM2STRING(BOTH_SLEEP3), //# Sleeping in a chair
|
||||
ENUM2STRING(BOTH_SLEEP4), //# Sleeping slumped over table
|
||||
ENUM2STRING(BOTH_SLEEP5), //# Laying on side sleeping on flat sufrace
|
||||
ENUM2STRING(BOTH_SLEEP6START), //# Kyle leaning back to sleep (cin 20)
|
||||
ENUM2STRING(BOTH_SLEEP6STOP), //# Kyle waking up and shaking his head (cin 21)
|
||||
ENUM2STRING(BOTH_SLEEP1GETUP), //# alarmed and getting up out of sleep1 pose to stand
|
||||
ENUM2STRING(BOTH_SLEEP1GETUP2), //#
|
||||
ENUM2STRING(BOTH_SLEEP2GETUP), //# alarmed and getting up out of sleep2 pose to stand
|
||||
ENUM2STRING(BOTH_SLEEP3GETUP), //# alarmed and getting up out of sleep3 pose to stand
|
||||
ENUM2STRING(BOTH_SLEEP3DEATH), //# death in chair), from sleep3 idle
|
||||
ENUM2STRING(BOTH_SLEEP3DEAD), //# death in chair), from sleep3 idle
|
||||
|
||||
ENUM2STRING(BOTH_SLEEP_IDLE1), //# rub face and nose while asleep from sleep pose 1
|
||||
ENUM2STRING(BOTH_SLEEP_IDLE2), //# shift position while asleep - stays in sleep2
|
||||
ENUM2STRING(BOTH_SLEEP_IDLE3), //# Idle anim from sleep pose 3
|
||||
ENUM2STRING(BOTH_SLEEP_IDLE4), //# Idle anim from sleep pose 4
|
||||
ENUM2STRING(BOTH_SLEEP1_NOSE), //# Scratch nose from SLEEP1 pose
|
||||
ENUM2STRING(BOTH_SLEEP2_SHIFT), //# Shift in sleep from SLEEP2 pose
|
||||
ENUM2STRING(BOTH_RESTRAINED1), //# Telsia tied to medical table
|
||||
ENUM2STRING(BOTH_RESTRAINED1POINT), //# Telsia tied to medical table pointing at Munro
|
||||
ENUM2STRING(BOTH_LIFTED1), //# Fits with ENUM2STRING(BOTH_LIFT1), lifted on shoulder
|
||||
|
@ -1115,6 +1050,8 @@ stringID_table_t animTable [MAX_ANIMATIONS+1] =
|
|||
ENUM2STRING(BOTH_TURNOFF), //# Protocol Droid shuts off
|
||||
ENUM2STRING(BOTH_BUTTON1), //# Single button push with right hand
|
||||
ENUM2STRING(BOTH_BUTTON2), //# Single button push with left finger
|
||||
ENUM2STRING(BOTH_BUTTON_HOLD), //# Single button hold with left hand
|
||||
ENUM2STRING(BOTH_BUTTON_RELEASE), //# Single button release with left hand
|
||||
|
||||
//# JEDI-SPECIFIC
|
||||
ENUM2STRING(BOTH_RESISTPUSH), //# plant yourself to resist force push/pulls.
|
||||
|
@ -1123,11 +1060,17 @@ stringID_table_t animTable [MAX_ANIMATIONS+1] =
|
|||
ENUM2STRING(BOTH_MINDTRICK1), //# Use off-hand to do mind trick
|
||||
ENUM2STRING(BOTH_MINDTRICK2), //# Use off-hand to do distraction
|
||||
ENUM2STRING(BOTH_FORCELIGHTNING), //# Use off-hand to do lightning
|
||||
ENUM2STRING(BOTH_FORCELIGHTNING_HOLD), //# Use off-hand to do lightning - hold
|
||||
ENUM2STRING(BOTH_FORCELIGHTNING_RELEASE),//# Use off-hand to do lightning - release
|
||||
ENUM2STRING(BOTH_FORCEHEAL_START), //# Healing meditation pose start
|
||||
ENUM2STRING(BOTH_FORCEHEAL_STOP), //# Healing meditation pose end
|
||||
ENUM2STRING(BOTH_FORCEHEAL_QUICK), //# Healing meditation gesture
|
||||
ENUM2STRING(BOTH_SABERPULL), //# Use off-hand to do force power.
|
||||
ENUM2STRING(BOTH_FORCEGRIP3), //# force-gripping
|
||||
ENUM2STRING(BOTH_FORCEGRIP1), //# force-gripping (no anim?)
|
||||
ENUM2STRING(BOTH_FORCEGRIP2), //# force-gripping (?)
|
||||
ENUM2STRING(BOTH_FORCEGRIP3), //# force-gripping (right-hand)
|
||||
ENUM2STRING(BOTH_FORCEGRIP_HOLD), //# Use off-hand to do grip - hold
|
||||
ENUM2STRING(BOTH_FORCEGRIP_RELEASE),//# Use off-hand to do grip - release
|
||||
ENUM2STRING(BOTH_TOSS1), //# throwing to left after force gripping
|
||||
ENUM2STRING(BOTH_TOSS2), //# throwing to right after force gripping
|
||||
|
||||
|
@ -1205,8 +1148,6 @@ stringID_table_t animTable [MAX_ANIMATIONS+1] =
|
|||
|
||||
ENUM2STRING(TORSO_SURRENDER_START), //# arms up
|
||||
ENUM2STRING(TORSO_SURRENDER_STOP), //# arms back down
|
||||
ENUM2STRING(TORSO_FORCEGRIP1), //# force-gripping
|
||||
ENUM2STRING(TORSO_FORCEGRIP2), //# force-gripping
|
||||
ENUM2STRING(TORSO_CHOKING1), //# TEMP
|
||||
|
||||
|
||||
|
@ -1237,6 +1178,46 @@ stringID_table_t animTable [MAX_ANIMATIONS+1] =
|
|||
ENUM2STRING(LEGS_RIGHTUP3), //# On a slope with RIGHT foot 12 higher than left
|
||||
ENUM2STRING(LEGS_RIGHTUP4), //# On a slope with RIGHT foot 16 higher than left
|
||||
ENUM2STRING(LEGS_RIGHTUP5), //# On a slope with RIGHT foot 20 higher than left
|
||||
ENUM2STRING(LEGS_S1_LUP1),
|
||||
ENUM2STRING(LEGS_S1_LUP2),
|
||||
ENUM2STRING(LEGS_S1_LUP3),
|
||||
ENUM2STRING(LEGS_S1_LUP4),
|
||||
ENUM2STRING(LEGS_S1_LUP5),
|
||||
ENUM2STRING(LEGS_S1_RUP1),
|
||||
ENUM2STRING(LEGS_S1_RUP2),
|
||||
ENUM2STRING(LEGS_S1_RUP3),
|
||||
ENUM2STRING(LEGS_S1_RUP4),
|
||||
ENUM2STRING(LEGS_S1_RUP5),
|
||||
ENUM2STRING(LEGS_S3_LUP1),
|
||||
ENUM2STRING(LEGS_S3_LUP2),
|
||||
ENUM2STRING(LEGS_S3_LUP3),
|
||||
ENUM2STRING(LEGS_S3_LUP4),
|
||||
ENUM2STRING(LEGS_S3_LUP5),
|
||||
ENUM2STRING(LEGS_S3_RUP1),
|
||||
ENUM2STRING(LEGS_S3_RUP2),
|
||||
ENUM2STRING(LEGS_S3_RUP3),
|
||||
ENUM2STRING(LEGS_S3_RUP4),
|
||||
ENUM2STRING(LEGS_S3_RUP5),
|
||||
ENUM2STRING(LEGS_S4_LUP1),
|
||||
ENUM2STRING(LEGS_S4_LUP2),
|
||||
ENUM2STRING(LEGS_S4_LUP3),
|
||||
ENUM2STRING(LEGS_S4_LUP4),
|
||||
ENUM2STRING(LEGS_S4_LUP5),
|
||||
ENUM2STRING(LEGS_S4_RUP1),
|
||||
ENUM2STRING(LEGS_S4_RUP2),
|
||||
ENUM2STRING(LEGS_S4_RUP3),
|
||||
ENUM2STRING(LEGS_S4_RUP4),
|
||||
ENUM2STRING(LEGS_S4_RUP5),
|
||||
ENUM2STRING(LEGS_S5_LUP1),
|
||||
ENUM2STRING(LEGS_S5_LUP2),
|
||||
ENUM2STRING(LEGS_S5_LUP3),
|
||||
ENUM2STRING(LEGS_S5_LUP4),
|
||||
ENUM2STRING(LEGS_S5_LUP5),
|
||||
ENUM2STRING(LEGS_S5_RUP1),
|
||||
ENUM2STRING(LEGS_S5_RUP2),
|
||||
ENUM2STRING(LEGS_S5_RUP3),
|
||||
ENUM2STRING(LEGS_S5_RUP4),
|
||||
ENUM2STRING(LEGS_S5_RUP5),
|
||||
|
||||
//=================================================
|
||||
//HEAD ANIMS
|
|
@ -94,25 +94,6 @@ static void CG_ScoresUp_f( void ) {
|
|||
extern menuDef_t *menuScoreboard;
|
||||
void Menu_Reset(); // FIXME: add to right include file
|
||||
|
||||
static void CG_LoadHud_f( void) {
|
||||
char buff[1024];
|
||||
const char *hudSet;
|
||||
memset(buff, 0, sizeof(buff));
|
||||
|
||||
String_Init();
|
||||
Menu_Reset();
|
||||
|
||||
trap_Cvar_VariableStringBuffer("cg_hudFiles", buff, sizeof(buff));
|
||||
hudSet = buff;
|
||||
if (hudSet[0] == '\0') {
|
||||
hudSet = "ui/hud.txt";
|
||||
}
|
||||
|
||||
CG_LoadMenus(hudSet);
|
||||
menuScoreboard = NULL;
|
||||
}
|
||||
|
||||
|
||||
static void CG_scrollScoresDown_f( void) {
|
||||
if (menuScoreboard && cg.scoreBoardShowing) {
|
||||
Menu_ScrollFeeder(menuScoreboard, FEEDER_SCOREBOARD, qtrue);
|
||||
|
@ -430,6 +411,7 @@ static consoleCommand_t commands[] = {
|
|||
{ "nextskin", CG_TestModelNextSkin_f },
|
||||
{ "prevskin", CG_TestModelPrevSkin_f },
|
||||
{ "viewpos", CG_Viewpos_f },
|
||||
{ "datapad", CG_ScoresDown_f }, //SP compatibility for default.cfg
|
||||
{ "+scores", CG_ScoresDown_f },
|
||||
{ "-scores", CG_ScoresUp_f },
|
||||
// { "+zoom", CG_ZoomDown_f },
|
||||
|
@ -444,7 +426,6 @@ static consoleCommand_t commands[] = {
|
|||
{ "vtell_target", CG_VoiceTellTarget_f },
|
||||
{ "vtell_attacker", CG_VoiceTellAttacker_f },
|
||||
{ "tcmd", CG_TargetCommand_f },
|
||||
{ "loadhud", CG_LoadHud_f },
|
||||
{ "nextTeamMember", CG_NextTeamMember_f },
|
||||
{ "prevTeamMember", CG_PrevTeamMember_f },
|
||||
{ "nextOrder", CG_NextOrder_f },
|
|
@ -1429,14 +1429,9 @@ void CG_DrawInvenSelect( void )
|
|||
|
||||
if (bg_itemlist[BG_GetItemIndexByTag(cg.itemSelect, IT_HOLDABLE)].pickup_name)
|
||||
{
|
||||
// FIXME :this has to use the bg_itemlist pickup name
|
||||
// tag = FindInventoryItemTag(cg.inventorySelect);
|
||||
vec4_t textColor = { .312f, .75f, .621f, 1.0f };
|
||||
|
||||
// if (tag)
|
||||
// {
|
||||
UI_DrawProportionalString(320, y+48, bg_itemlist[BG_GetItemIndexByTag(cg.itemSelect, IT_HOLDABLE)].pickup_name, UI_CENTER | UI_SMALLFONT, colorTable[CT_ICON_BLUE]);
|
||||
// CG_DrawProportionalString(320, y + 53, bg_itemlist[i].pickup_name, CG_CENTER | CG_SMALLFONT, colorTable[CT_ICON_BLUE]);
|
||||
// }
|
||||
UI_DrawProportionalString(320, y+48, bg_itemlist[BG_GetItemIndexByTag(cg.itemSelect, IT_HOLDABLE)].pickup_name, UI_CENTER | UI_SMALLFONT, textColor);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2614,6 +2609,12 @@ static void CG_DrawActivePowers(void)
|
|||
|
||||
i++;
|
||||
}
|
||||
|
||||
//additionally, draw an icon force force rage recovery
|
||||
if (cg.snap->ps.fd.forceRageRecoveryTime > cg.time)
|
||||
{
|
||||
CG_DrawPic( startx, starty, endx, endy, cgs.media.rageRecShader);
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------
|
||||
|
@ -3799,15 +3800,6 @@ static void CG_Draw2D( void ) {
|
|||
CG_DrawRocketLocking( cg.snap->ps.rocketLockIndex, cg.snap->ps.rocketLockTime );
|
||||
}
|
||||
|
||||
if (cg.snap->ps.holocronBits)
|
||||
{
|
||||
CG_DrawHolocronIcons();
|
||||
}
|
||||
if (cg.snap->ps.fd.forcePowersActive)
|
||||
{
|
||||
CG_DrawActivePowers();
|
||||
}
|
||||
|
||||
if (BG_HasYsalimari(cgs.gametype, &cg.snap->ps))
|
||||
{
|
||||
if (!cgYsalTime)
|
||||
|
@ -3886,7 +3878,7 @@ static void CG_Draw2D( void ) {
|
|||
{
|
||||
CG_DrawHolocronIcons();
|
||||
}
|
||||
if (cg.snap->ps.fd.forcePowersActive)
|
||||
if (cg.snap->ps.fd.forcePowersActive || cg.snap->ps.fd.forceRageRecoveryTime > cg.time)
|
||||
{
|
||||
CG_DrawActivePowers();
|
||||
}
|
|
@ -1085,7 +1085,7 @@ Ghoul2 Insert End
|
|||
//refEntity_t sRef;
|
||||
//memcpy( &sRef, &ent, sizeof( sRef ) );
|
||||
|
||||
ent.customShader = trap_R_RegisterShader( "gfx/effects/solidWhite_cull" );
|
||||
ent.customShader = cgs.media.solidWhite;
|
||||
ent.renderfx = RF_RGB_TINT;
|
||||
wv = sin( cg.time * 0.003f ) * 0.08f + 0.1f;
|
||||
ent.shaderRGBA[0] = wv * 255;
|
||||
|
@ -1107,7 +1107,7 @@ Ghoul2 Insert End
|
|||
fxSArgs.rotation = 0.0f;
|
||||
fxSArgs.bounce = 0.0f;
|
||||
fxSArgs.life = 1.0f;
|
||||
fxSArgs.shader = cgs.media.yellowSaberGlowShader;
|
||||
fxSArgs.shader = cgs.media.yellowDroppedSaberShader;
|
||||
fxSArgs.flags = 0x08000000;
|
||||
|
||||
//trap_FX_AddSprite( org, NULL, NULL, 5.5f, 5.5f, wv, wv, 0.0f, 0.0f, 1.0f, cgs.media.yellowSaberGlowShader, 0x08000000 );
|
||||
|
@ -1122,27 +1122,27 @@ Ghoul2 Insert End
|
|||
//refEntity_t sRef;
|
||||
//memcpy( &sRef, &ent, sizeof( sRef ) );
|
||||
|
||||
ent.customShader = trap_R_RegisterShader( "gfx/effects/solidWhite_cull" );
|
||||
ent.customShader = cgs.media.solidWhite;
|
||||
ent.renderfx = RF_RGB_TINT;
|
||||
wv = sin( cg.time * 0.005f ) * 0.08f + 0.1f; //* 0.08f + 0.1f;
|
||||
|
||||
if (cent->currentState.trickedentindex3 == 1)
|
||||
{ //dark
|
||||
ent.shaderRGBA[0] = wv * 255;
|
||||
ent.shaderRGBA[1] = wv * 0;
|
||||
ent.shaderRGBA[2] = wv * 0;
|
||||
ent.shaderRGBA[0] = wv*255;
|
||||
ent.shaderRGBA[1] = 0;
|
||||
ent.shaderRGBA[2] = 0;
|
||||
}
|
||||
else if (cent->currentState.trickedentindex3 == 2)
|
||||
{ //light
|
||||
ent.shaderRGBA[0] = wv * 255;
|
||||
ent.shaderRGBA[1] = wv * 255;
|
||||
ent.shaderRGBA[2] = wv * 255;
|
||||
ent.shaderRGBA[0] = wv*255;
|
||||
ent.shaderRGBA[1] = wv*255;
|
||||
ent.shaderRGBA[2] = wv*255;
|
||||
}
|
||||
else
|
||||
{ //neutral
|
||||
ent.shaderRGBA[0] = wv * 0;
|
||||
ent.shaderRGBA[1] = wv * 255;
|
||||
ent.shaderRGBA[2] = wv * 255;
|
||||
ent.shaderRGBA[0] = 0;
|
||||
ent.shaderRGBA[1] = wv*255;
|
||||
ent.shaderRGBA[2] = wv*255;
|
||||
}
|
||||
|
||||
ent.modelScale[0] = 1.1;
|
||||
|
@ -1153,7 +1153,6 @@ Ghoul2 Insert End
|
|||
ScaleModelAxis(&ent);
|
||||
|
||||
trap_R_AddRefEntityToScene (&ent);
|
||||
|
||||
|
||||
VectorMA( ent.origin, 1, ent.axis[2], org );
|
||||
|
||||
|
@ -1208,7 +1207,7 @@ Ghoul2 Insert End
|
|||
int i = 0;
|
||||
|
||||
VectorMA( ent.origin, 6.6f, ent.axis[0], beamOrg );// forward
|
||||
beamID = trap_FX_RegisterEffect("tripMine/laserMP.efx");
|
||||
beamID = cgs.effects.tripmineLaserFX;
|
||||
|
||||
if (cg.snap->ps.fd.forcePowersActive & (1 << FP_SEE))
|
||||
{
|
||||
|
@ -1324,7 +1323,8 @@ Ghoul2 Insert Start
|
|||
item = &bg_itemlist[ es->modelindex ];
|
||||
|
||||
if ((item->giType == IT_WEAPON || item->giType == IT_POWERUP) &&
|
||||
!(cent->currentState.eFlags & EF_DROPPEDWEAPON))
|
||||
!(cent->currentState.eFlags & EF_DROPPEDWEAPON) &&
|
||||
!cg_simpleItems.integer)
|
||||
{
|
||||
vec3_t uNorm;
|
||||
qboolean doGrey;
|
||||
|
@ -1379,16 +1379,46 @@ Ghoul2 Insert End
|
|||
ent.shaderRGBA[1] = 255;
|
||||
ent.shaderRGBA[2] = 255;
|
||||
|
||||
if ( es->eFlags & EF_ITEMPLACEHOLDER )
|
||||
ent.origin[2] += 16;
|
||||
|
||||
if (item->giType != IT_POWERUP || item->giTag != PW_FORCE_BOON)
|
||||
{
|
||||
ent.renderfx |= RF_FORCE_ENT_ALPHA;
|
||||
ent.shaderRGBA[3] = 50 + sin(cg.time*0.01)*30;
|
||||
}
|
||||
|
||||
if ( es->eFlags & EF_ITEMPLACEHOLDER )
|
||||
{
|
||||
if (item->giType == IT_POWERUP && item->giTag == PW_FORCE_BOON)
|
||||
{
|
||||
return;
|
||||
}
|
||||
ent.shaderRGBA[0] = 200;
|
||||
ent.shaderRGBA[1] = 200;
|
||||
ent.shaderRGBA[2] = 200;
|
||||
ent.shaderRGBA[3] = 150 + sin(cg.time*0.01)*30;
|
||||
}
|
||||
else
|
||||
{
|
||||
ent.shaderRGBA[3] = 255;
|
||||
}
|
||||
|
||||
if (CG_GreyItem(item->giType, item->giTag, cg.snap->ps.fd.forceSide))
|
||||
{
|
||||
ent.shaderRGBA[0] = 100;
|
||||
ent.shaderRGBA[1] = 100;
|
||||
ent.shaderRGBA[2] = 100;
|
||||
|
||||
ent.shaderRGBA[3] = 200;
|
||||
|
||||
if (item->giTag == PW_FORCE_ENLIGHTENED_LIGHT)
|
||||
{
|
||||
ent.customShader = trap_R_RegisterShader("gfx/misc/mp_light_enlight_disable");
|
||||
}
|
||||
else
|
||||
{
|
||||
ent.customShader = trap_R_RegisterShader("gfx/misc/mp_dark_enlight_disable");
|
||||
}
|
||||
}
|
||||
trap_R_AddRefEntityToScene(&ent);
|
||||
return;
|
||||
}
|
||||
|
@ -1648,6 +1678,14 @@ Ghoul2 Insert End
|
|||
}
|
||||
else
|
||||
{ // add to refresh list -- normal item
|
||||
if (item->giType == IT_TEAM &&
|
||||
(item->giTag == PW_REDFLAG || item->giTag == PW_BLUEFLAG))
|
||||
{
|
||||
ent.modelScale[0] = 0.7;
|
||||
ent.modelScale[1] = 0.7;
|
||||
ent.modelScale[2] = 0.7;
|
||||
ScaleModelAxis(&ent);
|
||||
}
|
||||
trap_R_AddRefEntityToScene(&ent);
|
||||
}
|
||||
|
||||
|
@ -1884,7 +1922,7 @@ Ghoul2 Insert End
|
|||
//refEntity_t sRef;
|
||||
//memcpy( &sRef, &ent, sizeof( sRef ) );
|
||||
|
||||
ent.customShader = trap_R_RegisterShader( "gfx/effects/solidWhite_cull" );
|
||||
ent.customShader = cgs.media.solidWhite;
|
||||
ent.renderfx = RF_RGB_TINT;
|
||||
wv = sin( cg.time * 0.003f ) * 0.08f + 0.1f;
|
||||
ent.shaderRGBA[0] = wv * 255;
|
||||
|
@ -1906,12 +1944,24 @@ Ghoul2 Insert End
|
|||
fxSArgs.rotation = 0.0f;
|
||||
fxSArgs.bounce = 0.0f;
|
||||
fxSArgs.life = 1.0f;
|
||||
fxSArgs.shader = cgs.media.yellowSaberGlowShader;
|
||||
fxSArgs.shader = cgs.media.yellowDroppedSaberShader;
|
||||
fxSArgs.flags = 0x08000000;
|
||||
|
||||
//trap_FX_AddSprite( org, NULL, NULL, 5.5f, 5.5f, wv, wv, 0.0f, 0.0f, 1.0f, cgs.media.yellowSaberGlowShader, 0x08000000 );
|
||||
trap_FX_AddSprite(&fxSArgs);
|
||||
}
|
||||
|
||||
if (cgs.gametype == GT_JEDIMASTER)
|
||||
{
|
||||
ent.shaderRGBA[0] = 255;
|
||||
ent.shaderRGBA[1] = 255;
|
||||
ent.shaderRGBA[2] = 0;
|
||||
|
||||
ent.renderfx |= RF_DEPTHHACK;
|
||||
ent.customShader = cgs.media.forceSightBubble;
|
||||
|
||||
trap_R_AddRefEntityToScene( &ent );
|
||||
}
|
||||
}
|
||||
|
||||
if ( s1->eFlags & EF_FIRING )
|
|
@ -204,9 +204,26 @@ clientkilled:
|
|||
char *s;
|
||||
|
||||
if ( cgs.gametype < GT_TEAM ) {
|
||||
s = va("%s %s\n%s place with %i", (char *)CG_GetStripEdString("INGAMETEXT", "KILLED_MESSAGE"), targetName,
|
||||
CG_PlaceString( cg.snap->ps.persistant[PERS_RANK] + 1 ),
|
||||
cg.snap->ps.persistant[PERS_SCORE] );
|
||||
if (cgs.gametype == GT_JEDIMASTER &&
|
||||
attacker < MAX_CLIENTS &&
|
||||
!ent->isJediMaster &&
|
||||
!cg.snap->ps.isJediMaster)
|
||||
{
|
||||
char part1[512];
|
||||
char part2[512];
|
||||
const char *kmsg1 = CG_GetStripEdString("INGAMETEXT", "KILLED_MESSAGE");
|
||||
strcpy(part1, kmsg1);
|
||||
kmsg1 = CG_GetStripEdString("INGAMETEXT", "JMKILLED_NOTJM");
|
||||
strcpy(part2, kmsg1);
|
||||
|
||||
s = va("%s %s %s\n", part1, targetName, part2);
|
||||
}
|
||||
else
|
||||
{
|
||||
s = va("%s %s.\n%s place with %i.", (char *)CG_GetStripEdString("INGAMETEXT", "KILLED_MESSAGE"), targetName,
|
||||
CG_PlaceString( cg.snap->ps.persistant[PERS_RANK] + 1 ),
|
||||
cg.snap->ps.persistant[PERS_SCORE] );
|
||||
}
|
||||
} else {
|
||||
s = va("%s %s", (char *)CG_GetStripEdString("INGAMETEXT", "KILLED_MESSAGE"), targetName );
|
||||
}
|
||||
|
@ -1041,7 +1058,7 @@ void CG_EntityEvent( centity_t *cent, vec3_t position ) {
|
|||
}
|
||||
else
|
||||
{
|
||||
trap_S_StartBackgroundTrack( "music/prototype/Duel.mp3", "music/prototype/Duel.mp3", qfalse );
|
||||
trap_S_StartBackgroundTrack( "music/mp/duel.mp3", "music/mp/duel.mp3", qfalse );
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -1128,13 +1145,14 @@ void CG_EntityEvent( centity_t *cent, vec3_t position ) {
|
|||
if (index < 1)
|
||||
{ //a holocron most likely
|
||||
index = cg_entities[es->eventParm].currentState.trickedentindex4;
|
||||
trap_S_StartSound (NULL, es->number, CHAN_AUTO, trap_S_RegisterSound( "sound/player/holocron.wav" ) );
|
||||
trap_S_StartSound (NULL, es->number, CHAN_AUTO, cgs.media.holocronPickup );
|
||||
|
||||
if (es->number == cg.snap->ps.clientNum && showPowersName[index])
|
||||
{
|
||||
const char *strText = CG_GetStripEdString("INGAMETEXT", "PICKUPLINE");
|
||||
|
||||
Com_Printf("%s %s\n", strText, showPowersName[index]);
|
||||
//Com_Printf("%s %s\n", strText, showPowersName[index]);
|
||||
CG_CenterPrint( va("%s %s\n", strText, showPowersName[index]), SCREEN_HEIGHT * 0.30, BIGCHAR_WIDTH );
|
||||
}
|
||||
|
||||
//Show the player their force selection bar in case picking the holocron up changed the current selection
|
||||
|
@ -1336,13 +1354,25 @@ void CG_EntityEvent( centity_t *cent, vec3_t position ) {
|
|||
DEBUGNAME("EV_SABER_HIT");
|
||||
if (es->eventParm)
|
||||
{ //hit a person
|
||||
vec3_t fxDir;
|
||||
VectorCopy(es->angles, fxDir);
|
||||
if (!fxDir[0] && !fxDir[1] && !fxDir[2])
|
||||
{
|
||||
fxDir[1] = 1;
|
||||
}
|
||||
trap_S_StartSound(es->origin, es->number, CHAN_AUTO, trap_S_RegisterSound("sound/weapons/saber/saberhit.wav"));
|
||||
trap_FX_PlayEffectID( trap_FX_RegisterEffect("saber/blood_sparks.efx"), es->origin, es->angles );
|
||||
trap_FX_PlayEffectID( trap_FX_RegisterEffect("saber/blood_sparks.efx"), es->origin, fxDir );
|
||||
}
|
||||
else
|
||||
{ //hit something else
|
||||
vec3_t fxDir;
|
||||
VectorCopy(es->angles, fxDir);
|
||||
if (!fxDir[0] && !fxDir[1] && !fxDir[2])
|
||||
{
|
||||
fxDir[1] = 1;
|
||||
}
|
||||
trap_S_StartSound(es->origin, es->number, CHAN_AUTO, trap_S_RegisterSound("sound/weapons/saber/saberhit.wav"));
|
||||
trap_FX_PlayEffectID( trap_FX_RegisterEffect("saber/spark.efx"), es->origin, es->angles );
|
||||
trap_FX_PlayEffectID( trap_FX_RegisterEffect("saber/spark.efx"), es->origin, fxDir );
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -1351,15 +1381,27 @@ void CG_EntityEvent( centity_t *cent, vec3_t position ) {
|
|||
|
||||
if (es->eventParm)
|
||||
{ //saber block
|
||||
vec3_t fxDir;
|
||||
VectorCopy(es->angles, fxDir);
|
||||
if (!fxDir[0] && !fxDir[1] && !fxDir[2])
|
||||
{
|
||||
fxDir[1] = 1;
|
||||
}
|
||||
trap_S_StartSound(es->origin, es->number, CHAN_AUTO, trap_S_RegisterSound(va( "sound/weapons/saber/saberblock%d.wav", Q_irand(1, 9) )));
|
||||
trap_FX_PlayEffectID( trap_FX_RegisterEffect("saber/saber_block.efx"), es->origin, es->angles );
|
||||
trap_FX_PlayEffectID( trap_FX_RegisterEffect("saber/saber_block.efx"), es->origin, fxDir );
|
||||
|
||||
g_saberFlashTime = cg.time-50;
|
||||
VectorCopy( es->origin, g_saberFlashPos );
|
||||
}
|
||||
else
|
||||
{ //projectile block
|
||||
trap_FX_PlayEffectID(trap_FX_RegisterEffect("blaster/deflect.efx"), es->origin, es->angles);
|
||||
vec3_t fxDir;
|
||||
VectorCopy(es->angles, fxDir);
|
||||
if (!fxDir[0] && !fxDir[1] && !fxDir[2])
|
||||
{
|
||||
fxDir[1] = 1;
|
||||
}
|
||||
trap_FX_PlayEffectID(trap_FX_RegisterEffect("blaster/deflect.efx"), es->origin, fxDir);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -1389,9 +1431,14 @@ void CG_EntityEvent( centity_t *cent, vec3_t position ) {
|
|||
{
|
||||
break;
|
||||
}
|
||||
trap_FX_PlayEffectID(trap_FX_RegisterEffect("mp/spawn.efx"), pos, ang);
|
||||
trap_FX_PlayEffectID(trap_FX_RegisterEffect("mp/jedispawn.efx"), pos, ang);
|
||||
|
||||
trap_S_StartSound (NULL, es->number, CHAN_AUTO, trap_S_RegisterSound( "sound/weapons/saber/saberon.wav" ) );
|
||||
|
||||
if (cg.snap->ps.clientNum == es->number)
|
||||
{
|
||||
trap_S_StartLocalSound(cgs.media.happyMusic, CHAN_LOCAL);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -1814,19 +1861,47 @@ void CG_EntityEvent( centity_t *cent, vec3_t position ) {
|
|||
//CG_AddBufferedSound( cgs.media.blueScoredSound );
|
||||
break;
|
||||
case GTS_RED_RETURN: // CTF: blue flag returned, 1FCTF: never used
|
||||
CG_AddBufferedSound( cgs.media.blueFlagReturnedSound );
|
||||
if (cgs.gametype == GT_CTY)
|
||||
{
|
||||
CG_AddBufferedSound( cgs.media.blueYsalReturnedSound );
|
||||
}
|
||||
else
|
||||
{
|
||||
CG_AddBufferedSound( cgs.media.blueFlagReturnedSound );
|
||||
}
|
||||
break;
|
||||
case GTS_BLUE_RETURN: // CTF red flag returned, 1FCTF: neutral flag returned
|
||||
CG_AddBufferedSound( cgs.media.redFlagReturnedSound );
|
||||
if (cgs.gametype == GT_CTY)
|
||||
{
|
||||
CG_AddBufferedSound( cgs.media.redYsalReturnedSound );
|
||||
}
|
||||
else
|
||||
{
|
||||
CG_AddBufferedSound( cgs.media.redFlagReturnedSound );
|
||||
}
|
||||
break;
|
||||
|
||||
case GTS_RED_TAKEN: // CTF: red team took blue flag, 1FCTF: blue team took the neutral flag
|
||||
// if this player picked up the flag then a sound is played in CG_CheckLocalSounds
|
||||
CG_AddBufferedSound( cgs.media.redTookFlagSound );
|
||||
if (cgs.gametype == GT_CTY)
|
||||
{
|
||||
CG_AddBufferedSound( cgs.media.redTookYsalSound );
|
||||
}
|
||||
else
|
||||
{
|
||||
CG_AddBufferedSound( cgs.media.redTookFlagSound );
|
||||
}
|
||||
break;
|
||||
case GTS_BLUE_TAKEN: // CTF: blue team took the red flag, 1FCTF red team took the neutral flag
|
||||
// if this player picked up the flag then a sound is played in CG_CheckLocalSounds
|
||||
CG_AddBufferedSound( cgs.media.blueTookFlagSound );
|
||||
if (cgs.gametype == GT_CTY)
|
||||
{
|
||||
CG_AddBufferedSound( cgs.media.blueTookYsalSound );
|
||||
}
|
||||
else
|
||||
{
|
||||
CG_AddBufferedSound( cgs.media.blueTookFlagSound );
|
||||
}
|
||||
break;
|
||||
case GTS_REDTEAM_SCORED:
|
||||
CG_AddBufferedSound(cgs.media.redScoredSound);
|
||||
|
@ -1921,6 +1996,10 @@ void CG_EntityEvent( centity_t *cent, vec3_t position ) {
|
|||
DEBUGNAME("EV_DEATHx");
|
||||
trap_S_StartSound( NULL, es->number, CHAN_VOICE,
|
||||
CG_CustomSound( es->number, va("*death%i.wav", event - EV_DEATH1 + 1) ) );
|
||||
if (es->eventParm && es->number == cg.snap->ps.clientNum)
|
||||
{
|
||||
trap_S_StartLocalSound(cgs.media.dramaticFailure, CHAN_LOCAL);
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
@ -230,6 +230,8 @@ typedef struct centity_s {
|
|||
int frame_hold_time;
|
||||
int frame_hold_refreshed;
|
||||
|
||||
refEntity_t grip_arm;
|
||||
|
||||
int trickAlpha;
|
||||
int trickAlphaTime;
|
||||
} centity_t;
|
||||
|
@ -873,6 +875,9 @@ typedef struct cgscreffects_s
|
|||
float shake_intensity;
|
||||
int shake_duration;
|
||||
int shake_start;
|
||||
|
||||
float music_volume_mulitplier;
|
||||
int music_volume_time;
|
||||
} cgscreffects_t;
|
||||
|
||||
extern cgscreffects_t cgScreenEffects;
|
||||
|
@ -934,6 +939,8 @@ typedef struct {
|
|||
qhandle_t purpleSaberCoreShader;
|
||||
qhandle_t saberBlurShader;
|
||||
|
||||
qhandle_t yellowDroppedSaberShader;
|
||||
|
||||
qhandle_t rivetMarkShader;
|
||||
|
||||
qhandle_t teamRedShader;
|
||||
|
@ -1019,6 +1026,8 @@ typedef struct {
|
|||
|
||||
qhandle_t disruptorShader;
|
||||
|
||||
qhandle_t solidWhite;
|
||||
|
||||
qhandle_t heartShader;
|
||||
|
||||
#ifdef JK2AWARDS
|
||||
|
@ -1038,6 +1047,7 @@ typedef struct {
|
|||
sfxHandle_t winnerSound;
|
||||
sfxHandle_t loserSound;
|
||||
|
||||
sfxHandle_t crackleSound;
|
||||
|
||||
sfxHandle_t grenadeBounce1;
|
||||
sfxHandle_t grenadeBounce2;
|
||||
|
@ -1091,6 +1101,15 @@ typedef struct {
|
|||
sfxHandle_t redTookFlagSound;
|
||||
sfxHandle_t blueTookFlagSound;
|
||||
|
||||
sfxHandle_t redYsalReturnedSound;
|
||||
sfxHandle_t blueYsalReturnedSound;
|
||||
sfxHandle_t redTookYsalSound;
|
||||
sfxHandle_t blueTookYsalSound;
|
||||
|
||||
//music blips
|
||||
sfxHandle_t happyMusic;
|
||||
sfxHandle_t dramaticFailure;
|
||||
|
||||
// tournament sounds
|
||||
sfxHandle_t count3Sound;
|
||||
sfxHandle_t count2Sound;
|
||||
|
@ -1128,6 +1147,8 @@ typedef struct {
|
|||
//force power icons
|
||||
qhandle_t forcePowerIcons[NUM_FORCE_POWERS];
|
||||
|
||||
qhandle_t rageRecShader;
|
||||
|
||||
//other HUD parts
|
||||
qhandle_t HUDLeftFrame;
|
||||
qhandle_t HUDArmor1;
|
||||
|
@ -1152,6 +1173,8 @@ typedef struct {
|
|||
|
||||
qhandle_t HUDInnerLeft;
|
||||
|
||||
sfxHandle_t holocronPickup;
|
||||
|
||||
// Zoom
|
||||
sfxHandle_t zoomStart;
|
||||
sfxHandle_t zoomLoop;
|
||||
|
@ -1218,6 +1241,9 @@ typedef struct
|
|||
fxHandle_t thermalExplosionEffect;
|
||||
fxHandle_t thermalShockwaveEffect;
|
||||
|
||||
// TRIPMINE
|
||||
fxHandle_t tripmineLaserFX;
|
||||
|
||||
//FORCE
|
||||
fxHandle_t forceLightning;
|
||||
fxHandle_t forceLightningWide;
|
|
@ -563,7 +563,7 @@ static cvarTable_t cvarTable[] = { // bk001129
|
|||
{ &cg_teamChatHeight, "cg_teamChatHeight", "0", CVAR_ARCHIVE },
|
||||
{ &cg_forceModel, "cg_forceModel", "0", CVAR_ARCHIVE },
|
||||
{ &cg_predictItems, "cg_predictItems", "1", CVAR_ARCHIVE },
|
||||
{ &cg_deferPlayers, "cg_deferPlayers", "0", CVAR_ARCHIVE },
|
||||
{ &cg_deferPlayers, "cg_deferPlayers", "1", CVAR_ARCHIVE },
|
||||
{ &cg_drawTeamOverlay, "cg_drawTeamOverlay", "0", CVAR_ARCHIVE },
|
||||
{ &cg_teamOverlayUserinfo, "teamoverlay", "0", CVAR_ROM | CVAR_USERINFO },
|
||||
{ &cg_stats, "cg_stats", "0", 0 },
|
||||
|
@ -588,7 +588,6 @@ static cvarTable_t cvarTable[] = { // bk001129
|
|||
{ &cg_singlePlayerActive, "ui_singlePlayerActive", "0", CVAR_USERINFO},
|
||||
{ &cg_recordSPDemo, "ui_recordSPDemo", "0", CVAR_ARCHIVE},
|
||||
{ &cg_recordSPDemoName, "ui_recordSPDemoName", "", CVAR_ARCHIVE},
|
||||
{ &cg_hudFiles, "cg_hudFiles", "ui/hud.txt", CVAR_ARCHIVE},
|
||||
|
||||
{ &cg_cameraOrbit, "cg_cameraOrbit", "0", CVAR_CHEAT},
|
||||
{ &cg_cameraOrbitDelay, "cg_cameraOrbitDelay", "50", CVAR_ARCHIVE},
|
||||
|
@ -644,6 +643,18 @@ void CG_RegisterCvars( void ) {
|
|||
trap_Cvar_Register(NULL, "team_model", DEFAULT_TEAM_MODEL, CVAR_USERINFO | CVAR_ARCHIVE );
|
||||
trap_Cvar_Register(NULL, "team_headmodel", DEFAULT_TEAM_HEAD, CVAR_USERINFO | CVAR_ARCHIVE );
|
||||
trap_Cvar_Register(NULL, "forcepowers", DEFAULT_FORCEPOWERS, CVAR_USERINFO | CVAR_ARCHIVE );
|
||||
|
||||
// Cvars uses for transferring data between client and server
|
||||
trap_Cvar_Register(NULL, "ui_about_gametype", "0", CVAR_ROM|CVAR_INTERNAL );
|
||||
trap_Cvar_Register(NULL, "ui_about_fraglimit", "0", CVAR_ROM|CVAR_INTERNAL );
|
||||
trap_Cvar_Register(NULL, "ui_about_capturelimit", "0", CVAR_ROM|CVAR_INTERNAL );
|
||||
trap_Cvar_Register(NULL, "ui_about_timelimit", "0", CVAR_ROM|CVAR_INTERNAL );
|
||||
trap_Cvar_Register(NULL, "ui_about_maxclients", "0", CVAR_ROM|CVAR_INTERNAL );
|
||||
trap_Cvar_Register(NULL, "ui_about_dmflags", "0", CVAR_ROM|CVAR_INTERNAL );
|
||||
trap_Cvar_Register(NULL, "ui_about_mapname", "0", CVAR_ROM|CVAR_INTERNAL );
|
||||
trap_Cvar_Register(NULL, "ui_about_hostname", "0", CVAR_ROM|CVAR_INTERNAL );
|
||||
trap_Cvar_Register(NULL, "ui_about_needpass", "0", CVAR_ROM|CVAR_INTERNAL );
|
||||
trap_Cvar_Register(NULL, "ui_about_botminplayers", "0", CVAR_ROM|CVAR_INTERNAL );
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -879,6 +890,8 @@ static void CG_RegisterSounds( void ) {
|
|||
cgs.media.purpleSaberCoreShader = trap_R_RegisterShader( "gfx/effects/sabers/purple_line" );
|
||||
cgs.media.saberBlurShader = trap_R_RegisterShader( "gfx/effects/sabers/saberBlur" );
|
||||
|
||||
cgs.media.yellowDroppedSaberShader = trap_R_RegisterShader("gfx/effects/yellow_glow");
|
||||
|
||||
cgs.media.rivetMarkShader = trap_R_RegisterShader( "gfx/damage/rivetmark" );
|
||||
|
||||
trap_R_RegisterShader( "gfx/effects/saberFlare" );
|
||||
|
@ -984,9 +997,23 @@ static void CG_RegisterSounds( void ) {
|
|||
cgs.media.blueFlagReturnedSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM041" );
|
||||
cgs.media.redTookFlagSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM040" );
|
||||
cgs.media.blueTookFlagSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM039" );
|
||||
|
||||
cgs.media.redYsalReturnedSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM050" );
|
||||
cgs.media.blueYsalReturnedSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM049" );
|
||||
cgs.media.redTookYsalSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM048" );
|
||||
cgs.media.blueTookYsalSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM047" );
|
||||
}
|
||||
}
|
||||
|
||||
cgs.media.happyMusic = trap_S_RegisterSound("music/goodsmall.mp3");
|
||||
cgs.media.dramaticFailure = trap_S_RegisterSound("music/badsmall.mp3");
|
||||
|
||||
//PRECACHE ALL MUSIC HERE (don't need to precache normally because it's streamed off the disk)
|
||||
if (cg_buildScript.integer)
|
||||
{
|
||||
trap_S_StartBackgroundTrack( "music/mp/duel.mp3", "music/mp/duel.mp3", qfalse );
|
||||
}
|
||||
|
||||
cg.loadLCARSStage = 1;
|
||||
|
||||
cgs.media.selectSound = trap_S_RegisterSound( "sound/weapons/change.wav" );
|
||||
|
@ -1001,6 +1028,7 @@ static void CG_RegisterSounds( void ) {
|
|||
cgs.media.landSound = trap_S_RegisterSound( "sound/player/land1.wav");
|
||||
cgs.media.fallSound = trap_S_RegisterSound( "sound/player/fallsplat.wav");
|
||||
|
||||
cgs.media.crackleSound = trap_S_RegisterSound( "sound/effects/energy_crackle.wav" );
|
||||
#ifdef JK2AWARDS
|
||||
cgs.media.impressiveSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM025" );
|
||||
cgs.media.excellentSound = trap_S_RegisterSound( "sound/chars/mothma/misc/40MOM053" );
|
||||
|
@ -1026,16 +1054,19 @@ static void CG_RegisterSounds( void ) {
|
|||
|
||||
if (cg_buildScript.integer)
|
||||
{
|
||||
trap_R_RegisterShader( "gfx/effects/solidWhite_cull" );
|
||||
trap_R_RegisterShader( "gfx/effects/turretflashdie" );
|
||||
|
||||
trap_R_RegisterShader("gfx/misc/mp_light_enlight_disable");
|
||||
trap_R_RegisterShader("gfx/misc/mp_dark_enlight_disable");
|
||||
}
|
||||
|
||||
cgs.media.solidWhite = trap_R_RegisterShader( "gfx/effects/solidWhite_cull" );
|
||||
|
||||
trap_R_RegisterShader("gfx/misc/mp_light_enlight_disable");
|
||||
trap_R_RegisterShader("gfx/misc/mp_dark_enlight_disable");
|
||||
|
||||
trap_R_RegisterModel ( "models/map_objects/mp/sphere.md3" );
|
||||
trap_R_RegisterModel("models/items/remote.md3");
|
||||
|
||||
cgs.media.holocronPickup = trap_S_RegisterSound( "sound/player/holocron.wav" );
|
||||
|
||||
// Zoom
|
||||
cgs.media.zoomStart = trap_S_RegisterSound( "sound/interface/zoomstart.wav" );
|
||||
cgs.media.zoomLoop = trap_S_RegisterSound( "sound/interface/zoomloop.wav" );
|
||||
|
@ -1221,6 +1252,7 @@ static void CG_RegisterGraphics( void ) {
|
|||
trap_FX_RegisterEffect("effects/blaster/deflect.efx");
|
||||
|
||||
trap_FX_RegisterEffect("emplaced/dead_smoke.efx");
|
||||
trap_FX_RegisterEffect("emplaced/explode.efx");
|
||||
|
||||
if (cg_buildScript.integer)
|
||||
{
|
||||
|
@ -1231,6 +1263,7 @@ static void CG_RegisterGraphics( void ) {
|
|||
trap_FX_RegisterEffect("effects/turret/muzzle_flash.efx");
|
||||
trap_FX_RegisterEffect("saber/spark.efx");
|
||||
trap_FX_RegisterEffect("mp/spawn.efx");
|
||||
trap_FX_RegisterEffect("mp/jedispawn.efx");
|
||||
trap_FX_RegisterEffect("mp/itemcone.efx");
|
||||
trap_FX_RegisterEffect("blaster/deflect.efx");
|
||||
trap_FX_RegisterEffect("saber/saber_block.efx");
|
||||
|
@ -1834,77 +1867,6 @@ qboolean CG_Load_Menu(char **p) {
|
|||
}
|
||||
|
||||
|
||||
|
||||
void CG_LoadMenus(const char *menuFile) {
|
||||
char *token;
|
||||
char *p;
|
||||
int len, start;
|
||||
fileHandle_t f;
|
||||
static char buf[MAX_MENUDEFFILE];
|
||||
|
||||
start = trap_Milliseconds();
|
||||
|
||||
len = trap_FS_FOpenFile( menuFile, &f, FS_READ );
|
||||
if ( !f ) {
|
||||
// do NOT do this, or it doesn't get a chance to look at the default menu below -ste
|
||||
//trap_Error( va( S_COLOR_YELLOW "menu file not found: %s, using default\n", menuFile ) );
|
||||
len = trap_FS_FOpenFile( "ui/hud.txt", &f, FS_READ );
|
||||
if (!f) {
|
||||
trap_Error( va( S_COLOR_RED "default menu file not found: ui/hud.txt, unable to continue!\n", menuFile ) );
|
||||
}
|
||||
}
|
||||
|
||||
if ( len >= MAX_MENUDEFFILE ) {
|
||||
trap_Error( va( S_COLOR_RED "menu file too large: %s is %i, max allowed is %i", menuFile, len, MAX_MENUDEFFILE ) );
|
||||
trap_FS_FCloseFile( f );
|
||||
return;
|
||||
}
|
||||
|
||||
trap_FS_Read( buf, len, f );
|
||||
buf[len] = 0;
|
||||
trap_FS_FCloseFile( f );
|
||||
|
||||
COM_Compress(buf);
|
||||
|
||||
Menu_Reset();
|
||||
|
||||
p = buf;
|
||||
|
||||
while ( 1 ) {
|
||||
token = COM_ParseExt( (const char **)&p, qtrue );
|
||||
if( !token || token[0] == 0 || token[0] == '}') {
|
||||
break;
|
||||
}
|
||||
|
||||
//if ( Q_stricmp( token, "{" ) ) {
|
||||
// Com_Printf( "Missing { in menu file\n" );
|
||||
// break;
|
||||
//}
|
||||
|
||||
//if ( menuCount == MAX_MENUS ) {
|
||||
// Com_Printf( "Too many menus!\n" );
|
||||
// break;
|
||||
//}
|
||||
|
||||
if ( Q_stricmp( token, "}" ) == 0 ) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (Q_stricmp(token, "loadmenu") == 0) {
|
||||
if (CG_Load_Menu(&p)) {
|
||||
continue;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Com_Printf("UI menu load time = %d milli seconds\n", trap_Milliseconds() - start);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
static qboolean CG_OwnerDrawHandleKey(int ownerDraw, int flags, float *special, int key) {
|
||||
return qfalse;
|
||||
}
|
||||
|
@ -2149,10 +2111,8 @@ CG_LoadHudMenu();
|
|||
|
||||
=================
|
||||
*/
|
||||
void CG_LoadHudMenu() {
|
||||
char buff[1024];
|
||||
const char *hudSet;
|
||||
|
||||
void CG_LoadHudMenu()
|
||||
{
|
||||
cgDC.registerShaderNoMip = &trap_R_RegisterShaderNoMip;
|
||||
cgDC.setColor = &trap_R_SetColor;
|
||||
cgDC.drawHandlePic = &CG_DrawPic;
|
||||
|
@ -2211,14 +2171,6 @@ void CG_LoadHudMenu() {
|
|||
Init_Display(&cgDC);
|
||||
|
||||
Menu_Reset();
|
||||
|
||||
trap_Cvar_VariableStringBuffer("cg_hudFiles", buff, sizeof(buff));
|
||||
hudSet = buff;
|
||||
if (hudSet[0] == '\0') {
|
||||
hudSet = "ui/hud.txt";
|
||||
}
|
||||
|
||||
CG_LoadMenus(hudSet);
|
||||
}
|
||||
|
||||
void CG_AssetCache() {
|
||||
|
@ -2451,6 +2403,7 @@ Ghoul2 Insert End
|
|||
|
||||
i++;
|
||||
}
|
||||
cgs.media.rageRecShader = trap_R_RegisterShaderNoMip("gfx/mp/f_icon_ragerec");
|
||||
|
||||
//rww - precache other HUD graphics
|
||||
cgs.media.HUDLeftFrame = trap_R_RegisterShaderNoMip( "gfx/hud/static_test" );
|
|
@ -1013,7 +1013,7 @@ static void CG_DrawAreaChat(rectDef_t *rect, float scale, vec4_t color, qhandle_
|
|||
const char *CG_GetKillerText(void) {
|
||||
const char *s = "";
|
||||
if ( cg.killerName[0] ) {
|
||||
s = va("Fragged by %s", cg.killerName );
|
||||
s = va("%s %s", CG_GetStripEdString("INGAMETEXT", "KILLEDBY"), cg.killerName );
|
||||
}
|
||||
return s;
|
||||
}
|
|
@ -427,7 +427,7 @@ retryModel:
|
|||
{ // Didn't find any slashes, this is a raw filename right in base (whish isn't a good thing)
|
||||
return qfalse;
|
||||
}
|
||||
|
||||
/*
|
||||
// Try to load the animation.cfg for this model then.
|
||||
if ( !BG_ParseAnimationFile( afilename, ci->animations ) )
|
||||
{ // The GLA's animations failed
|
||||
|
@ -437,6 +437,19 @@ retryModel:
|
|||
return qfalse;
|
||||
}
|
||||
}
|
||||
*/
|
||||
//rww - For now, we'll just ignore what animation file it wants. In theory all multiplayer-supported models
|
||||
//should want _humanoid/animation.cfg, so if it doesn't want that then throw it away
|
||||
if (Q_stricmp(afilename, "models/players/_humanoid/animation.cfg"))
|
||||
{
|
||||
Com_Printf( "Model does not use supported animation config.\n");
|
||||
return qfalse;
|
||||
}
|
||||
else if (!BG_ParseAnimationFile("models/players/_humanoid/animation.cfg", ci->animations))
|
||||
{
|
||||
Com_Printf( "Failed to load animation file models/players/_humanoid/animation.cfg\n" );
|
||||
return qfalse;
|
||||
}
|
||||
else if (!retriedAlready)
|
||||
{
|
||||
int i;
|
||||
|
@ -549,11 +562,13 @@ retryModel:
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
if (cg_entities[clientNum].ghoul2 && trap_G2_HaveWeGhoul2Models(cg_entities[clientNum].ghoul2))
|
||||
{
|
||||
trap_G2API_CleanGhoul2Models(&(cg_entities[clientNum].ghoul2));
|
||||
}
|
||||
trap_G2API_DuplicateGhoul2Instance(ci->ghoul2Model, &cg_entities[clientNum].ghoul2);
|
||||
*/
|
||||
|
||||
cg_entities[clientNum].ghoul2weapon = NULL;
|
||||
}
|
||||
|
@ -613,6 +628,35 @@ void CG_LoadClientInfo( clientInfo_t *ci ) {
|
|||
qboolean isFemale = qfalse;
|
||||
fileHandle_t f;
|
||||
|
||||
clientNum = ci - cgs.clientinfo;
|
||||
|
||||
if (clientNum < 0 || clientNum >= MAX_CLIENTS)
|
||||
{
|
||||
clientNum = -1;
|
||||
}
|
||||
|
||||
ci->deferred = qfalse;
|
||||
|
||||
if (ci->team == TEAM_SPECTATOR)
|
||||
{
|
||||
// reset any existing players and bodies, because they might be in bad
|
||||
// frames for this new model
|
||||
clientNum = ci - cgs.clientinfo;
|
||||
for ( i = 0 ; i < MAX_GENTITIES ; i++ ) {
|
||||
if ( cg_entities[i].currentState.clientNum == clientNum
|
||||
&& cg_entities[i].currentState.eType == ET_PLAYER ) {
|
||||
CG_ResetPlayerEntity( &cg_entities[i] );
|
||||
}
|
||||
}
|
||||
|
||||
if (ci->ghoul2Model && trap_G2_HaveWeGhoul2Models(ci->ghoul2Model))
|
||||
{
|
||||
trap_G2API_CleanGhoul2Models(&ci->ghoul2Model);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
teamname[0] = 0;
|
||||
if( cgs.gametype >= GT_TEAM) {
|
||||
if( ci->team == TEAM_BLUE ) {
|
||||
|
@ -625,8 +669,8 @@ void CG_LoadClientInfo( clientInfo_t *ci ) {
|
|||
strcat( teamname, "/" );
|
||||
}
|
||||
modelloaded = qtrue;
|
||||
if ( !CG_RegisterClientModelname( ci, ci->modelName, ci->skinName, ci->headModelName, ci->headSkinName, teamname, -1 ) ) {
|
||||
if ( cg_buildScript.integer ) {
|
||||
if ( !CG_RegisterClientModelname( ci, ci->modelName, ci->skinName, ci->headModelName, ci->headSkinName, teamname, clientNum ) ) {
|
||||
if ( cg_buildScript.integer && ci->team != TEAM_SPECTATOR ) {
|
||||
CG_Error( "CG_RegisterClientModelname( %s, %s, %s, %s %s ) failed", ci->modelName, ci->skinName, ci->headModelName, ci->headSkinName, teamname );
|
||||
}
|
||||
|
||||
|
@ -649,6 +693,15 @@ void CG_LoadClientInfo( clientInfo_t *ci ) {
|
|||
modelloaded = qfalse;
|
||||
}
|
||||
|
||||
if (clientNum != -1 && ci->ghoul2Model && trap_G2_HaveWeGhoul2Models(ci->ghoul2Model))
|
||||
{
|
||||
if (cg_entities[clientNum].ghoul2 && trap_G2_HaveWeGhoul2Models(cg_entities[clientNum].ghoul2))
|
||||
{
|
||||
trap_G2API_CleanGhoul2Models(&cg_entities[clientNum].ghoul2);
|
||||
}
|
||||
trap_G2API_DuplicateGhoul2Instance(ci->ghoul2Model, &cg_entities[clientNum].ghoul2);
|
||||
}
|
||||
|
||||
ci->newAnims = qfalse;
|
||||
if ( ci->torsoModel ) {
|
||||
orientation_t tag;
|
||||
|
@ -689,6 +742,15 @@ void CG_LoadClientInfo( clientInfo_t *ci ) {
|
|||
trap_FS_FCloseFile(f);
|
||||
}
|
||||
|
||||
if (isFemale)
|
||||
{
|
||||
ci->gender = GENDER_FEMALE;
|
||||
}
|
||||
else
|
||||
{
|
||||
ci->gender = GENDER_MALE;
|
||||
}
|
||||
|
||||
for ( i = 0 ; i < MAX_CUSTOM_SOUNDS ; i++ ) {
|
||||
s = cg_customSoundNames[i];
|
||||
if ( !s ) {
|
||||
|
@ -703,15 +765,7 @@ void CG_LoadClientInfo( clientInfo_t *ci ) {
|
|||
// if the model didn't load use the sounds of the default model
|
||||
if (soundpath[0])
|
||||
{
|
||||
if (CG_FileExists(va("sound/%s/%s.wav", soundpath, soundName)) ||
|
||||
CG_FileExists(va("sound/%s/%s.mp3", soundpath, soundName)))
|
||||
{
|
||||
ci->sounds[i] = trap_S_RegisterSound( va("sound/%s/%s", soundpath, soundName) );
|
||||
}
|
||||
else
|
||||
{
|
||||
ci->sounds[i] = 0;
|
||||
}
|
||||
ci->sounds[i] = trap_S_RegisterSound( va("sound/%s/%s", soundpath, soundName) );
|
||||
|
||||
if (!ci->sounds[i])
|
||||
{
|
||||
|
@ -729,15 +783,7 @@ void CG_LoadClientInfo( clientInfo_t *ci ) {
|
|||
{
|
||||
if (modelloaded)
|
||||
{
|
||||
if (CG_FileExists(va("sound/chars/%s/misc/%s.wav", dir, soundName)) ||
|
||||
CG_FileExists(va("sound/chars/%s/misc/%s.mp3", dir, soundName)))
|
||||
{
|
||||
ci->sounds[i] = trap_S_RegisterSound( va("sound/chars/%s/misc/%s", dir, soundName) );
|
||||
}
|
||||
else
|
||||
{
|
||||
ci->sounds[i] = 0;
|
||||
}
|
||||
ci->sounds[i] = trap_S_RegisterSound( va("sound/chars/%s/misc/%s", dir, soundName) );
|
||||
}
|
||||
|
||||
if ( !ci->sounds[i] )
|
||||
|
@ -783,8 +829,16 @@ static void CG_CopyClientInfoModel( clientInfo_t *from, clientInfo_t *to ) {
|
|||
|
||||
to->newAnims = from->newAnims;
|
||||
|
||||
// rww - was duplicating instance, now just reassigning pointer to same memory
|
||||
to->ghoul2Model = from->ghoul2Model;
|
||||
//to->ghoul2Model = from->ghoul2Model;
|
||||
//rww - Trying to use the same ghoul2 pointer for two seperate clients == DISASTER
|
||||
if (to->ghoul2Model && trap_G2_HaveWeGhoul2Models(to->ghoul2Model))
|
||||
{
|
||||
trap_G2API_CleanGhoul2Models(&to->ghoul2Model);
|
||||
}
|
||||
if (from->ghoul2Model && trap_G2_HaveWeGhoul2Models(from->ghoul2Model))
|
||||
{
|
||||
trap_G2API_DuplicateGhoul2Instance(from->ghoul2Model, &to->ghoul2Model);
|
||||
}
|
||||
|
||||
to->bolt_head = from->bolt_head;
|
||||
to->bolt_lhand = from->bolt_lhand;
|
||||
|
@ -1086,6 +1140,20 @@ void CG_NewClientInfo( int clientNum, qboolean entitiesInitialized ) {
|
|||
|
||||
newInfo.ATST = wasATST;
|
||||
|
||||
if (cgs.gametype >= GT_TEAM)
|
||||
{
|
||||
if (newInfo.team == TEAM_RED)
|
||||
{
|
||||
strcpy(newInfo.skinName, "red");
|
||||
strcpy(newInfo.headSkinName, "red");
|
||||
}
|
||||
if (newInfo.team == TEAM_BLUE)
|
||||
{
|
||||
strcpy(newInfo.skinName, "blue");
|
||||
strcpy(newInfo.headSkinName, "blue");
|
||||
}
|
||||
}
|
||||
|
||||
// scan for an existing clientinfo that matches this modelname
|
||||
// so we can avoid loading checks if possible
|
||||
if ( !CG_ScanForExistingClientInfo( &newInfo ) ) {
|
||||
|
@ -1123,11 +1191,7 @@ void CG_NewClientInfo( int clientNum, qboolean entitiesInitialized ) {
|
|||
{ // Copy the new ghoul2 model to the centity.
|
||||
animation_t *anim;
|
||||
// First check if we have a ghoul2 model on the client entity.
|
||||
if (cg_entities[clientNum].ghoul2 && trap_G2_HaveWeGhoul2Models(cg_entities[clientNum].ghoul2))
|
||||
{
|
||||
trap_G2API_CleanGhoul2Models(&cg_entities[clientNum].ghoul2);
|
||||
}
|
||||
|
||||
|
||||
anim = &ci->animations[ (cg_entities[clientNum].currentState.legsAnim & ~ANIM_TOGGLEBIT) ];
|
||||
|
||||
if (anim)
|
||||
|
@ -1166,35 +1230,42 @@ void CG_NewClientInfo( int clientNum, qboolean entitiesInitialized ) {
|
|||
cg_entities[clientNum].currentState.torsoAnim = 0;
|
||||
}
|
||||
|
||||
trap_G2API_DuplicateGhoul2Instance(ci->ghoul2Model, &cg_entities[clientNum].ghoul2);
|
||||
//rww - FIXME: Perhaps I'm missing something, but if we're duplicating the instance from ci instead of pointing the cent g2 instance to it, can't we clean one up? (no reason to have
|
||||
// the same instance duplicated in memory) I'm not touching this at the moment because I don't want to unknowingly break something horribly if I'm wrong
|
||||
|
||||
if (cg_entities[clientNum].weapon > WP_NONE)
|
||||
if (cg_entities[clientNum].ghoul2 && trap_G2_HaveWeGhoul2Models(cg_entities[clientNum].ghoul2))
|
||||
{
|
||||
CG_CopyG2WeaponInstance(cg_entities[clientNum].weapon, cg_entities[clientNum].ghoul2);
|
||||
trap_G2API_CleanGhoul2Models(&cg_entities[clientNum].ghoul2);
|
||||
}
|
||||
trap_G2API_DuplicateGhoul2Instance(ci->ghoul2Model, &cg_entities[clientNum].ghoul2);
|
||||
|
||||
/*
|
||||
if (cg_entities[clientNum].currentState.weapon > WP_NONE)
|
||||
{
|
||||
CG_CopyG2WeaponInstance(cg_entities[clientNum].currentState.weapon, cg_entities[clientNum].ghoul2);
|
||||
}
|
||||
*/
|
||||
//It should catch this next update anyway. We just set all ghoul2weapon's to NULL above.
|
||||
}
|
||||
else if (ci->team == TEAM_SPECTATOR && cg_entities[clientNum].ghoul2 && trap_G2_HaveWeGhoul2Models(cg_entities[clientNum].ghoul2))
|
||||
{ //rww - not doing this seems to allow .ghoul2 to become an invalid pointer. And as we all know, invalid pointers make baby Carmack cry.
|
||||
{ //this shouldn't actually happen now because we are not trying to register models for spectators. But just in case.
|
||||
trap_G2API_CleanGhoul2Models(&cg_entities[clientNum].ghoul2);
|
||||
trap_G2API_DuplicateGhoul2Instance(ci->ghoul2Model, &cg_entities[clientNum].ghoul2);
|
||||
if (ci->ghoul2Model && trap_G2_HaveWeGhoul2Models(ci->ghoul2Model))
|
||||
{
|
||||
trap_G2API_DuplicateGhoul2Instance(ci->ghoul2Model, &cg_entities[clientNum].ghoul2);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
qboolean cgQueueLoad = qfalse;
|
||||
/*
|
||||
======================
|
||||
CG_LoadDeferredPlayers
|
||||
CG_ActualLoadDeferredPlayers
|
||||
|
||||
Called each frame when a player is dead
|
||||
and the scoreboard is up
|
||||
so deferred players can be loaded
|
||||
Called at the beginning of CG_Player if cgQueueLoad is set.
|
||||
======================
|
||||
*/
|
||||
void CG_LoadDeferredPlayers( void ) {
|
||||
void CG_ActualLoadDeferredPlayers( void )
|
||||
{
|
||||
int i;
|
||||
clientInfo_t *ci;
|
||||
|
||||
|
@ -1213,6 +1284,19 @@ void CG_LoadDeferredPlayers( void ) {
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
======================
|
||||
CG_LoadDeferredPlayers
|
||||
|
||||
Called each frame when a player is dead
|
||||
and the scoreboard is up
|
||||
so deferred players can be loaded
|
||||
======================
|
||||
*/
|
||||
void CG_LoadDeferredPlayers( void ) {
|
||||
cgQueueLoad = qtrue;
|
||||
}
|
||||
|
||||
/*
|
||||
=============================================================================
|
||||
|
||||
|
@ -1223,37 +1307,6 @@ PLAYER ANIMATION
|
|||
|
||||
static qboolean CG_FirstAnimFrame(clientInfo_t *ci, lerpFrame_t *lf, qboolean torsoOnly, float speedScale);
|
||||
|
||||
qboolean CG_DeathAnim( int anim )
|
||||
{
|
||||
switch((anim&~ANIM_TOGGLEBIT))
|
||||
{
|
||||
case BOTH_DIVE1:
|
||||
case BOTH_DEATHBACKWARD1:
|
||||
case BOTH_DEATHBACKWARD2:
|
||||
case BOTH_DEATHFORWARD1:
|
||||
case BOTH_DEATHFORWARD2:
|
||||
case BOTH_DEATH1:
|
||||
case BOTH_DEATH2:
|
||||
case BOTH_DEATH3:
|
||||
case BOTH_DEATH4:
|
||||
case BOTH_DEATH5:
|
||||
case BOTH_DEATH6:
|
||||
case BOTH_DEATH7:
|
||||
|
||||
case BOTH_DEATH1IDLE:
|
||||
case BOTH_LYINGDEATH1:
|
||||
case BOTH_STUMBLEDEATH1:
|
||||
case BOTH_FALLDEATH1:
|
||||
case BOTH_FALLDEATH1INAIR:
|
||||
case BOTH_FALLDEATH1LAND:
|
||||
return qtrue;
|
||||
break;
|
||||
default:
|
||||
return qfalse;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
qboolean CG_InRoll( centity_t *cent )
|
||||
{
|
||||
switch ( (cent->currentState.legsAnim&~ANIM_TOGGLEBIT) )
|
||||
|
@ -1271,9 +1324,6 @@ qboolean CG_InRoll( centity_t *cent )
|
|||
return qfalse;
|
||||
}
|
||||
|
||||
qboolean PM_SaberInSpecial( int move );
|
||||
qboolean PM_SaberInSpecialAttack( int anim );
|
||||
|
||||
/*
|
||||
===============
|
||||
CG_SetLerpFrameAnimation
|
||||
|
@ -1486,12 +1536,12 @@ static void CG_SetLerpFrameAnimation( centity_t *cent, clientInfo_t *ci, lerpFra
|
|||
|
||||
if (!cent->isATST)
|
||||
{
|
||||
if (BG_FlippingAnim(newAnimation) || CG_DeathAnim(newAnimation))
|
||||
if (BG_FlippingAnim(newAnimation) || BG_InDeathAnim(newAnimation))
|
||||
{
|
||||
flags &= ~BONE_ANIM_BLEND;
|
||||
}
|
||||
else if ( oldAnim != -1 &&
|
||||
(BG_FlippingAnim(oldAnim) || CG_DeathAnim(oldAnim)) )
|
||||
(BG_FlippingAnim(oldAnim) || BG_InDeathAnim(oldAnim)) )
|
||||
{
|
||||
flags &= ~BONE_ANIM_BLEND;
|
||||
}
|
||||
|
@ -1538,12 +1588,12 @@ static void CG_SetLerpFrameAnimation( centity_t *cent, clientInfo_t *ci, lerpFra
|
|||
!BG_SpinningSaberAnim( cent->currentState.torsoAnim ) &&
|
||||
!BG_InSpecialJump( cent->currentState.legsAnim ) &&
|
||||
!BG_InSpecialJump( cent->currentState.torsoAnim ) &&
|
||||
!CG_DeathAnim(cent->currentState.legsAnim) &&
|
||||
!CG_DeathAnim(cent->currentState.torsoAnim) &&
|
||||
!BG_InDeathAnim(cent->currentState.legsAnim) &&
|
||||
!BG_InDeathAnim(cent->currentState.torsoAnim) &&
|
||||
!CG_InRoll(cent) &&
|
||||
!PM_SaberInSpecial(cent->currentState.saberMove) &&
|
||||
!PM_SaberInSpecialAttack(cent->currentState.torsoAnim) &&
|
||||
!PM_SaberInSpecialAttack(cent->currentState.legsAnim) )
|
||||
!BG_SaberInSpecial(cent->currentState.saberMove) &&
|
||||
!BG_SaberInSpecialAttack(cent->currentState.torsoAnim) &&
|
||||
!BG_SaberInSpecialAttack(cent->currentState.legsAnim) )
|
||||
{
|
||||
trap_G2API_SetBoneAnim(cent->ghoul2, 0, "Motion", anim->firstFrame, anim->firstFrame + anim->numFrames, flags, animSpeed, lf->frameTime, -1, 150);
|
||||
}
|
||||
|
@ -2316,19 +2366,19 @@ void CG_G2ClientSpineAngles( centity_t *cent, vec3_t viewAngles, const vec3_t an
|
|||
!BG_SpinningSaberAnim( cent->currentState.torsoAnim ) &&
|
||||
!BG_InSpecialJump( cent->currentState.legsAnim ) &&
|
||||
!BG_InSpecialJump( cent->currentState.torsoAnim ) &&
|
||||
!CG_DeathAnim(cent->currentState.legsAnim) &&
|
||||
!CG_DeathAnim(cent->currentState.torsoAnim) &&
|
||||
!BG_InDeathAnim(cent->currentState.legsAnim) &&
|
||||
!BG_InDeathAnim(cent->currentState.torsoAnim) &&
|
||||
!CG_InRoll(cent) &&
|
||||
!PM_SaberInSpecial(cent->currentState.saberMove) &&
|
||||
!PM_SaberInSpecialAttack(cent->currentState.torsoAnim) &&
|
||||
!PM_SaberInSpecialAttack(cent->currentState.legsAnim) &&
|
||||
!BG_SaberInSpecial(cent->currentState.saberMove) &&
|
||||
!BG_SaberInSpecialAttack(cent->currentState.torsoAnim) &&
|
||||
!BG_SaberInSpecialAttack(cent->currentState.legsAnim) &&
|
||||
|
||||
/*
|
||||
!BG_FlippingAnim( cent->rootBone ) &&
|
||||
!BG_SpinningSaberAnim( cent->rootBone ) &&
|
||||
!BG_InSpecialJump( cent->rootBone ) &&
|
||||
!CG_DeathAnim(cent->rootBone) &&
|
||||
!PM_SaberInSpecialAttack(cent->rootBone) &&
|
||||
!BG_InDeathAnim(cent->rootBone) &&
|
||||
!BG_SaberInSpecialAttack(cent->rootBone) &&
|
||||
*/
|
||||
|
||||
!(cent->currentState.eFlags & EF_DEAD) )
|
||||
|
@ -2911,118 +2961,63 @@ static void CG_TrailItem( centity_t *cent, qhandle_t hModel ) {
|
|||
CG_PlayerFlag
|
||||
===============
|
||||
*/
|
||||
static void CG_PlayerFlag( centity_t *cent, qhandle_t hSkin, refEntity_t *torso ) {
|
||||
#if 0
|
||||
clientInfo_t *ci;
|
||||
refEntity_t pole;
|
||||
refEntity_t flag;
|
||||
vec3_t angles, dir;
|
||||
int legsAnim, /*flagAnim,*/ updateangles;
|
||||
float angle, d;
|
||||
static void CG_PlayerFlag( centity_t *cent, qhandle_t hModel ) {
|
||||
refEntity_t ent;
|
||||
vec3_t angles;
|
||||
vec3_t axis[3];
|
||||
vec3_t boltOrg, tAng, getAng, right;
|
||||
mdxaBone_t boltMatrix;
|
||||
|
||||
// show the flag pole model
|
||||
memset( &pole, 0, sizeof(pole) );
|
||||
pole.hModel = cgs.media.flagPoleModel;
|
||||
VectorCopy( torso->lightingOrigin, pole.lightingOrigin );
|
||||
pole.shadowPlane = torso->shadowPlane;
|
||||
pole.renderfx = torso->renderfx;
|
||||
CG_PositionEntityOnTag( &pole, torso, torso->hModel, "tag_flag" );
|
||||
trap_R_AddRefEntityToScene( &pole );
|
||||
|
||||
// show the flag model
|
||||
memset( &flag, 0, sizeof(flag) );
|
||||
flag.hModel = cgs.media.flagFlapModel;
|
||||
flag.customSkin = hSkin;
|
||||
VectorCopy( torso->lightingOrigin, flag.lightingOrigin );
|
||||
flag.shadowPlane = torso->shadowPlane;
|
||||
flag.renderfx = torso->renderfx;
|
||||
|
||||
VectorClear(angles);
|
||||
|
||||
updateangles = qfalse;
|
||||
legsAnim = cent->currentState.legsAnim & ~ANIM_TOGGLEBIT;
|
||||
/*
|
||||
if( legsAnim == TORSO_WEAPONREADY3 || legsAnim == BOTH_CROUCH1IDLE ) {
|
||||
flagAnim = FLAG_STAND;
|
||||
} else if ( legsAnim == BOTH_WALK1 || legsAnim == BOTH_CROUCH1WALK ) {
|
||||
flagAnim = FLAG_STAND;
|
||||
updateangles = qtrue;
|
||||
} else {
|
||||
flagAnim = FLAG_RUN;
|
||||
updateangles = qtrue;
|
||||
}
|
||||
*/
|
||||
if ( updateangles ) {
|
||||
|
||||
VectorCopy( cent->currentState.pos.trDelta, dir );
|
||||
// add gravity
|
||||
dir[2] += 100;
|
||||
VectorNormalize( dir );
|
||||
d = DotProduct(pole.axis[2], dir);
|
||||
// if there is anough movement orthogonal to the flag pole
|
||||
if (fabs(d) < 0.9) {
|
||||
//
|
||||
d = DotProduct(pole.axis[0], dir);
|
||||
if (d > 1.0f) {
|
||||
d = 1.0f;
|
||||
}
|
||||
else if (d < -1.0f) {
|
||||
d = -1.0f;
|
||||
}
|
||||
angle = acos(d);
|
||||
|
||||
d = DotProduct(pole.axis[1], dir);
|
||||
if (d < 0) {
|
||||
angles[YAW] = 360 - angle * 180 / M_PI;
|
||||
}
|
||||
else {
|
||||
angles[YAW] = angle * 180 / M_PI;
|
||||
}
|
||||
if (angles[YAW] < 0)
|
||||
angles[YAW] += 360;
|
||||
if (angles[YAW] > 360)
|
||||
angles[YAW] -= 360;
|
||||
|
||||
//vectoangles( cent->currentState.pos.trDelta, tmpangles );
|
||||
//angles[YAW] = tmpangles[YAW] + 45 - cent->pe.torso.yawAngle;
|
||||
// change the yaw angle
|
||||
CG_SwingAngles( angles[YAW], 25, 90, 0.15f, ¢->pe.flag.yawAngle, ¢->pe.flag.yawing );
|
||||
}
|
||||
|
||||
/*
|
||||
d = DotProduct(pole.axis[2], dir);
|
||||
angle = Q_acos(d);
|
||||
|
||||
d = DotProduct(pole.axis[1], dir);
|
||||
if (d < 0) {
|
||||
angle = 360 - angle * 180 / M_PI;
|
||||
}
|
||||
else {
|
||||
angle = angle * 180 / M_PI;
|
||||
}
|
||||
if (angle > 340 && angle < 20) {
|
||||
flagAnim = FLAG_RUNUP;
|
||||
}
|
||||
if (angle > 160 && angle < 200) {
|
||||
flagAnim = FLAG_RUNDOWN;
|
||||
}
|
||||
*/
|
||||
if (!cent->ghoul2)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// set the yaw angle
|
||||
angles[YAW] = cent->pe.flag.yawAngle;
|
||||
// lerp the flag animation frames
|
||||
ci = &cgs.clientinfo[ cent->currentState.clientNum ];
|
||||
// CG_RunLerpFrame( ci, ¢->pe.flag, flagAnim, 1 );
|
||||
flag.oldframe = cent->pe.flag.oldFrame;
|
||||
flag.frame = cent->pe.flag.frame;
|
||||
flag.backlerp = cent->pe.flag.backlerp;
|
||||
VectorSet( tAng, cent->turAngles[PITCH], cent->turAngles[YAW], cent->turAngles[ROLL] );
|
||||
|
||||
AnglesToAxis( angles, flag.axis );
|
||||
CG_PositionRotatedEntityOnTag( &flag, &pole, pole.hModel, "tag_flag" );
|
||||
trap_G2API_GetBoltMatrix(cent->ghoul2, 0, cgs.clientinfo[cent->currentState.number].bolt_llumbar, &boltMatrix, tAng, cent->lerpOrigin, cg.time, cgs.gameModels, cent->modelScale);
|
||||
trap_G2API_GiveMeVectorFromMatrix(&boltMatrix, ORIGIN, boltOrg);
|
||||
|
||||
trap_R_AddRefEntityToScene( &flag );
|
||||
#endif
|
||||
trap_G2API_GiveMeVectorFromMatrix(&boltMatrix, POSITIVE_X, tAng);
|
||||
vectoangles(tAng, tAng);
|
||||
|
||||
VectorCopy(cent->lerpAngles, angles);
|
||||
|
||||
boltOrg[2] -= 12;
|
||||
VectorSet(getAng, 0, cent->lerpAngles[1], 0);
|
||||
AngleVectors(getAng, 0, right, 0);
|
||||
boltOrg[0] += right[0]*8;
|
||||
boltOrg[1] += right[1]*8;
|
||||
boltOrg[2] += right[2]*8;
|
||||
|
||||
angles[PITCH] = -cent->lerpAngles[PITCH]/2-30;
|
||||
angles[YAW] = tAng[YAW]+270;
|
||||
|
||||
AnglesToAxis(angles, axis);
|
||||
|
||||
memset( &ent, 0, sizeof( ent ) );
|
||||
VectorMA( boltOrg, 24, axis[0], ent.origin );
|
||||
|
||||
angles[ROLL] += 20;
|
||||
AnglesToAxis( angles, ent.axis );
|
||||
|
||||
ent.hModel = hModel;
|
||||
|
||||
ent.modelScale[0] = 0.5;
|
||||
ent.modelScale[1] = 0.5;
|
||||
ent.modelScale[2] = 0.5;
|
||||
ScaleModelAxis(&ent);
|
||||
|
||||
/*
|
||||
if (cent->currentState.number == cg.snap->ps.clientNum)
|
||||
{ //If we're the current client (in third person), render the flag on our back transparently
|
||||
ent.renderfx |= RF_FORCE_ENT_ALPHA;
|
||||
ent.shaderRGBA[3] = 100;
|
||||
}
|
||||
*/
|
||||
//FIXME: Not doing this at the moment because sorting totally messes up
|
||||
|
||||
trap_R_AddRefEntityToScene( &ent );
|
||||
}
|
||||
|
||||
|
||||
|
@ -3048,34 +3043,18 @@ static void CG_PlayerPowerups( centity_t *cent, refEntity_t *torso ) {
|
|||
ci = &cgs.clientinfo[ cent->currentState.clientNum ];
|
||||
// redflag
|
||||
if ( powerups & ( 1 << PW_REDFLAG ) ) {
|
||||
if (ci->newAnims) {
|
||||
CG_PlayerFlag( cent, cgs.media.redFlagFlapSkin, torso );
|
||||
}
|
||||
else {
|
||||
CG_TrailItem( cent, cgs.media.redFlagModel );
|
||||
}
|
||||
CG_PlayerFlag( cent, cgs.media.redFlagModel );
|
||||
trap_R_AddLightToScene( cent->lerpOrigin, 200 + (rand()&31), 1.0, 0.2f, 0.2f );
|
||||
}
|
||||
|
||||
// blueflag
|
||||
if ( powerups & ( 1 << PW_BLUEFLAG ) ) {
|
||||
if (ci->newAnims){
|
||||
CG_PlayerFlag( cent, cgs.media.blueFlagFlapSkin, torso );
|
||||
}
|
||||
else {
|
||||
CG_TrailItem( cent, cgs.media.blueFlagModel );
|
||||
}
|
||||
CG_PlayerFlag( cent, cgs.media.blueFlagModel );
|
||||
trap_R_AddLightToScene( cent->lerpOrigin, 200 + (rand()&31), 0.2f, 0.2f, 1.0 );
|
||||
}
|
||||
|
||||
// neutralflag
|
||||
if ( powerups & ( 1 << PW_NEUTRALFLAG ) ) {
|
||||
if (ci->newAnims) {
|
||||
CG_PlayerFlag( cent, cgs.media.neutralFlagFlapSkin, torso );
|
||||
}
|
||||
else {
|
||||
CG_TrailItem( cent, cgs.media.neutralFlagModel );
|
||||
}
|
||||
trap_R_AddLightToScene( cent->lerpOrigin, 200 + (rand()&31), 1.0, 1.0, 1.0 );
|
||||
}
|
||||
|
||||
|
@ -3407,6 +3386,56 @@ void CG_ForcePushBlur( vec3_t org )
|
|||
ex->refEntity.customShader = trap_R_RegisterShader( "gfx/effects/forcePush" );
|
||||
}
|
||||
|
||||
void CG_ForceGripEffect( vec3_t org )
|
||||
{
|
||||
localEntity_t *ex;
|
||||
float wv = sin( cg.time * 0.004f ) * 0.08f + 0.1f;
|
||||
|
||||
ex = CG_AllocLocalEntity();
|
||||
ex->leType = LE_PUFF;
|
||||
ex->refEntity.reType = RT_SPRITE;
|
||||
ex->radius = 2.0f;
|
||||
ex->startTime = cg.time;
|
||||
ex->endTime = ex->startTime + 120;
|
||||
VectorCopy( org, ex->pos.trBase );
|
||||
ex->pos.trTime = cg.time;
|
||||
ex->pos.trType = TR_LINEAR;
|
||||
VectorScale( cg.refdef.viewaxis[1], 55, ex->pos.trDelta );
|
||||
|
||||
ex->color[0] = 200+((wv*255));
|
||||
if (ex->color[0] > 255)
|
||||
{
|
||||
ex->color[0] = 255;
|
||||
}
|
||||
ex->color[1] = 0;
|
||||
ex->color[2] = 0;
|
||||
ex->refEntity.customShader = trap_R_RegisterShader( "gfx/effects/forcePush" );
|
||||
|
||||
ex = CG_AllocLocalEntity();
|
||||
ex->leType = LE_PUFF;
|
||||
ex->refEntity.reType = RT_SPRITE;
|
||||
ex->refEntity.rotation = 180.0f;
|
||||
ex->radius = 2.0f;
|
||||
ex->startTime = cg.time;
|
||||
ex->endTime = ex->startTime + 120;
|
||||
VectorCopy( org, ex->pos.trBase );
|
||||
ex->pos.trTime = cg.time;
|
||||
ex->pos.trType = TR_LINEAR;
|
||||
VectorScale( cg.refdef.viewaxis[1], -55, ex->pos.trDelta );
|
||||
|
||||
/*
|
||||
ex->color[0] = 200+((wv*255));
|
||||
if (ex->color[0] > 255)
|
||||
{
|
||||
ex->color[0] = 255;
|
||||
}
|
||||
*/
|
||||
ex->color[0] = 255;
|
||||
ex->color[1] = 255;
|
||||
ex->color[2] = 255;
|
||||
ex->refEntity.customShader = cgs.media.redSaberGlowShader;//trap_R_RegisterShader( "gfx/effects/forcePush" );
|
||||
}
|
||||
|
||||
static void CG_ForcePushBodyBlur( centity_t *cent, vec3_t origin, vec3_t tempAngles )
|
||||
{
|
||||
vec3_t eyePos;
|
||||
|
@ -3966,7 +3995,13 @@ Ghoul2 Insert Start
|
|||
|
||||
if ( trace.fraction < 1.0f )
|
||||
{
|
||||
trap_FX_PlayEffectID( trap_FX_RegisterEffect("saber/spark.efx"), trace.endpos, trace.plane.normal );
|
||||
vec3_t trDir;
|
||||
VectorCopy(trace.plane.normal, trDir);
|
||||
if (!trDir[0] && !trDir[1] && !trDir[2])
|
||||
{
|
||||
trDir[1] = 1;
|
||||
}
|
||||
trap_FX_PlayEffectID( trap_FX_RegisterEffect("saber/spark.efx"), trace.endpos, trDir );
|
||||
|
||||
//Stop saber? (it wouldn't look right if it was stuck through a thin wall and unable to hurt players on the other side)
|
||||
VectorSubtract(org_, trace.endpos, v);
|
||||
|
@ -4036,7 +4071,14 @@ Ghoul2 Insert Start
|
|||
|
||||
if ( trace.fraction < 1.0f )
|
||||
{
|
||||
trap_FX_PlayEffectID( trap_FX_RegisterEffect("saber/spark.efx"), trace.endpos, trace.plane.normal );
|
||||
vec3_t trDir;
|
||||
VectorCopy(trace.plane.normal, trDir);
|
||||
if (!trDir[0] && !trDir[1] && !trDir[2])
|
||||
{
|
||||
trDir[1] = 1;
|
||||
}
|
||||
|
||||
trap_FX_PlayEffectID( trap_FX_RegisterEffect("saber/spark.efx"), trace.endpos, trDir );
|
||||
|
||||
//Stop saber? (it wouldn't look right if it was stuck through a thin wall and unable to hurt players on the other side)
|
||||
VectorSubtract(otherPos, trace.endpos, v);
|
||||
|
@ -4601,6 +4643,8 @@ void CG_AddRandomLightning(vec3_t start, vec3_t end)
|
|||
CG_AddLightningBeam(inOrg, outOrg);
|
||||
}
|
||||
|
||||
extern char *forceHolocronModels[];
|
||||
|
||||
/*
|
||||
===============
|
||||
CG_Player
|
||||
|
@ -4632,6 +4676,12 @@ void CG_Player( centity_t *cent ) {
|
|||
int effectTimeLayer = 0;
|
||||
qboolean gotLHandMatrix = qfalse;
|
||||
|
||||
if (cgQueueLoad)
|
||||
{
|
||||
CG_ActualLoadDeferredPlayers();
|
||||
cgQueueLoad = qfalse;
|
||||
}
|
||||
|
||||
// the client number is stored in clientNum. It can't be derived
|
||||
// from the entity number, because a single client may have
|
||||
// multiple corpses on the level using the same clientinfo
|
||||
|
@ -4647,6 +4697,8 @@ void CG_Player( centity_t *cent ) {
|
|||
return;
|
||||
}
|
||||
|
||||
cent->ghoul2 = cg_entities[cent->currentState.number].ghoul2;
|
||||
|
||||
if (!cent->ghoul2)
|
||||
{ //not ready yet?
|
||||
return;
|
||||
|
@ -4893,6 +4945,15 @@ void CG_Player( centity_t *cent ) {
|
|||
CG_DrawYsalimariSphere(cent, cent->lerpOrigin, efColors);
|
||||
}
|
||||
|
||||
if (cent->currentState.eFlags & EF_INVULNERABLE)
|
||||
{
|
||||
vec3_t efColors;
|
||||
efColors[0] = 0;
|
||||
efColors[1] = 255;
|
||||
efColors[2] = 0;
|
||||
CG_DrawYsalimariSphere(cent, cent->lerpOrigin, efColors);
|
||||
}
|
||||
|
||||
// add the shadow
|
||||
shadow = CG_PlayerShadow( cent, &shadowPlane );
|
||||
|
||||
|
@ -4965,6 +5026,139 @@ void CG_Player( centity_t *cent ) {
|
|||
trap_R_AddRefEntityToScene( &seeker );
|
||||
}
|
||||
|
||||
if (cgs.gametype == GT_HOLOCRON && cent->currentState.time2 && (cg.renderingThirdPerson || cg.snap->ps.clientNum != cent->currentState.number))
|
||||
{
|
||||
int i = 0;
|
||||
int renderedHolos = 0;
|
||||
refEntity_t holoRef;
|
||||
|
||||
while (i < NUM_FORCE_POWERS && renderedHolos < 3)
|
||||
{
|
||||
if (cent->currentState.time2 & (1 << i))
|
||||
{
|
||||
memset( &holoRef, 0, sizeof(holoRef) );
|
||||
|
||||
VectorCopy(cent->lerpOrigin, elevated);
|
||||
elevated[2] += 8;
|
||||
|
||||
VectorCopy( elevated, holoRef.lightingOrigin );
|
||||
holoRef.shadowPlane = shadowPlane;
|
||||
holoRef.renderfx = 0;//RF_THIRD_PERSON;
|
||||
|
||||
if (renderedHolos == 0)
|
||||
{
|
||||
angle = ((cg.time / 8) & 255) * (M_PI * 2) / 255;
|
||||
dir[0] = cos(angle) * 20;
|
||||
dir[1] = sin(angle) * 20;
|
||||
dir[2] = cos(angle) * 20;
|
||||
VectorAdd(elevated, dir, holoRef.origin);
|
||||
|
||||
angles[0] = sin(angle) * 30;
|
||||
angles[1] = (angle * 180 / M_PI) + 90;
|
||||
if (angles[1] > 360)
|
||||
angles[1] -= 360;
|
||||
angles[2] = 0;
|
||||
AnglesToAxis( angles, holoRef.axis );
|
||||
}
|
||||
else if (renderedHolos == 1)
|
||||
{
|
||||
angle = ((cg.time / 8) & 255) * (M_PI * 2) / 255 + M_PI;
|
||||
if (angle > M_PI * 2)
|
||||
angle -= (float)M_PI * 2;
|
||||
dir[0] = sin(angle) * 20;
|
||||
dir[1] = cos(angle) * 20;
|
||||
dir[2] = cos(angle) * 20;
|
||||
VectorAdd(elevated, dir, holoRef.origin);
|
||||
|
||||
angles[0] = cos(angle - 0.5 * M_PI) * 30;
|
||||
angles[1] = 360 - (angle * 180 / M_PI);
|
||||
if (angles[1] > 360)
|
||||
angles[1] -= 360;
|
||||
angles[2] = 0;
|
||||
AnglesToAxis( angles, holoRef.axis );
|
||||
}
|
||||
else
|
||||
{
|
||||
angle = ((cg.time / 6) & 255) * (M_PI * 2) / 255 + 0.5 * M_PI;
|
||||
if (angle > M_PI * 2)
|
||||
angle -= (float)M_PI * 2;
|
||||
dir[0] = sin(angle) * 20;
|
||||
dir[1] = cos(angle) * 20;
|
||||
dir[2] = 0;
|
||||
VectorAdd(elevated, dir, holoRef.origin);
|
||||
|
||||
VectorCopy(dir, holoRef.axis[1]);
|
||||
VectorNormalize(holoRef.axis[1]);
|
||||
VectorSet(holoRef.axis[2], 0, 0, 1);
|
||||
CrossProduct(holoRef.axis[1], holoRef.axis[2], holoRef.axis[0]);
|
||||
}
|
||||
|
||||
holoRef.modelScale[0] = 0.5;
|
||||
holoRef.modelScale[1] = 0.5;
|
||||
holoRef.modelScale[2] = 0.5;
|
||||
ScaleModelAxis(&holoRef);
|
||||
|
||||
{
|
||||
float wv;
|
||||
addspriteArgStruct_t fxSArgs;
|
||||
vec3_t holoCenter;
|
||||
|
||||
holoCenter[0] = holoRef.origin[0] + holoRef.axis[2][0]*18;
|
||||
holoCenter[1] = holoRef.origin[1] + holoRef.axis[2][1]*18;
|
||||
holoCenter[2] = holoRef.origin[2] + holoRef.axis[2][2]*18;
|
||||
|
||||
wv = sin( cg.time * 0.004f ) * 0.08f + 0.1f;
|
||||
|
||||
VectorCopy(holoCenter, fxSArgs.origin);
|
||||
VectorClear(fxSArgs.vel);
|
||||
VectorClear(fxSArgs.accel);
|
||||
fxSArgs.scale = wv*60;
|
||||
fxSArgs.dscale = wv*60;
|
||||
fxSArgs.sAlpha = wv*12;
|
||||
fxSArgs.eAlpha = wv*12;
|
||||
fxSArgs.rotation = 0.0f;
|
||||
fxSArgs.bounce = 0.0f;
|
||||
fxSArgs.life = 1.0f;
|
||||
|
||||
fxSArgs.flags = 0x08000000|0x00000001;
|
||||
|
||||
if (forcePowerDarkLight[i] == FORCE_DARKSIDE)
|
||||
{ //dark
|
||||
fxSArgs.sAlpha *= 2;
|
||||
fxSArgs.eAlpha *= 2;
|
||||
fxSArgs.shader = cgs.media.redSaberGlowShader;
|
||||
trap_FX_AddSprite(&fxSArgs);
|
||||
}
|
||||
else if (forcePowerDarkLight[i] == FORCE_LIGHTSIDE)
|
||||
{ //light
|
||||
fxSArgs.sAlpha *= 1.5;
|
||||
fxSArgs.eAlpha *= 1.5;
|
||||
fxSArgs.shader = cgs.media.redSaberGlowShader;
|
||||
trap_FX_AddSprite(&fxSArgs);
|
||||
fxSArgs.shader = cgs.media.greenSaberGlowShader;
|
||||
trap_FX_AddSprite(&fxSArgs);
|
||||
fxSArgs.shader = cgs.media.blueSaberGlowShader;
|
||||
trap_FX_AddSprite(&fxSArgs);
|
||||
}
|
||||
else
|
||||
{ //neutral
|
||||
fxSArgs.sAlpha *= 0.5;
|
||||
fxSArgs.eAlpha *= 0.5;
|
||||
fxSArgs.shader = cgs.media.greenSaberGlowShader;
|
||||
trap_FX_AddSprite(&fxSArgs);
|
||||
fxSArgs.shader = cgs.media.blueSaberGlowShader;
|
||||
trap_FX_AddSprite(&fxSArgs);
|
||||
}
|
||||
}
|
||||
|
||||
holoRef.hModel = trap_R_RegisterModel(forceHolocronModels[i]);
|
||||
trap_R_AddRefEntityToScene( &holoRef );
|
||||
|
||||
renderedHolos++;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
}
|
||||
doEssentialOne:
|
||||
// add a water splash if partially in and out of water
|
||||
CG_PlayerSplash( cent );
|
||||
|
@ -5279,7 +5473,87 @@ doEssentialTwo:
|
|||
efOrg[1] = lHandMatrix.matrix[1][3];
|
||||
efOrg[2] = lHandMatrix.matrix[2][3];
|
||||
|
||||
CG_ForcePushBlur( efOrg );
|
||||
if ( (cent->currentState.forcePowersActive & (1 << FP_GRIP)) &&
|
||||
(cg.renderingThirdPerson || cent->currentState.number != cg.snap->ps.clientNum) )
|
||||
{
|
||||
vec3_t boltDir;
|
||||
vec3_t origBolt;
|
||||
VectorCopy(efOrg, origBolt);
|
||||
trap_G2API_GiveMeVectorFromMatrix( &lHandMatrix, NEGATIVE_Y, boltDir );
|
||||
|
||||
CG_ForceGripEffect( efOrg );
|
||||
CG_ForceGripEffect( efOrg );
|
||||
|
||||
//Render a scaled version of the model's hand with a n337 looking shader
|
||||
{
|
||||
const char *rotateBone;
|
||||
char *limbName;
|
||||
char *limbCapName;
|
||||
vec3_t armAng;
|
||||
float wv = sin( cg.time * 0.003f ) * 0.08f + 0.1f;
|
||||
|
||||
rotateBone = "lradius";
|
||||
limbName = "l_arm";
|
||||
limbCapName = "l_arm_cap_torso_off";
|
||||
|
||||
if (cent->grip_arm.ghoul2 && trap_G2_HaveWeGhoul2Models(cent->grip_arm.ghoul2))
|
||||
{
|
||||
trap_G2API_CleanGhoul2Models(&(cent->grip_arm.ghoul2));
|
||||
}
|
||||
|
||||
memset( ¢->grip_arm, 0, sizeof(cent->grip_arm) );
|
||||
|
||||
VectorCopy(origBolt, efOrg);
|
||||
trap_G2API_GiveMeVectorFromMatrix( &lHandMatrix, NEGATIVE_Y, boltDir );
|
||||
efOrg[0] += boltDir[0]*8;
|
||||
efOrg[1] += boltDir[1]*8;
|
||||
efOrg[2] += boltDir[2]*8;
|
||||
trap_G2API_GiveMeVectorFromMatrix( &lHandMatrix, NEGATIVE_X, boltDir );
|
||||
efOrg[0] -= boltDir[0]*4;
|
||||
efOrg[1] -= boltDir[1]*4;
|
||||
efOrg[2] -= boltDir[2]*4;
|
||||
|
||||
VectorCopy(efOrg, cent->grip_arm.origin);
|
||||
VectorCopy(cent->grip_arm.origin, cent->grip_arm.lightingOrigin);
|
||||
|
||||
VectorCopy(cent->lerpAngles, armAng);
|
||||
armAng[ROLL] = -90;
|
||||
AnglesToAxis(armAng, cent->grip_arm.axis);
|
||||
|
||||
trap_G2API_DuplicateGhoul2Instance(cent->ghoul2, ¢->grip_arm.ghoul2);
|
||||
|
||||
trap_G2API_SetRootSurface(cent->grip_arm.ghoul2, 0, limbName);
|
||||
trap_G2API_SetNewOrigin(cent->grip_arm.ghoul2, trap_G2API_AddBolt(cent->grip_arm.ghoul2, 0, rotateBone));
|
||||
trap_G2API_SetSurfaceOnOff(cent->grip_arm.ghoul2, limbCapName, 0);
|
||||
|
||||
cent->grip_arm.modelScale[0] = 1;//+(wv*6);
|
||||
cent->grip_arm.modelScale[1] = 1;//+(wv*6);
|
||||
cent->grip_arm.modelScale[2] = 1;//+(wv*6);
|
||||
ScaleModelAxis(¢->grip_arm);
|
||||
|
||||
cent->grip_arm.radius = 64;
|
||||
|
||||
cent->grip_arm.customShader = trap_R_RegisterShader( "gfx/misc/red_portashield" );
|
||||
|
||||
cent->grip_arm.renderfx |= RF_RGB_TINT;
|
||||
cent->grip_arm.shaderRGBA[0] = 255 - (wv*900);
|
||||
if (cent->grip_arm.shaderRGBA[0] < 30)
|
||||
{
|
||||
cent->grip_arm.shaderRGBA[0] = 30;
|
||||
}
|
||||
if (cent->grip_arm.shaderRGBA[0] > 255)
|
||||
{
|
||||
cent->grip_arm.shaderRGBA[0] = 255;
|
||||
}
|
||||
cent->grip_arm.shaderRGBA[1] = cent->grip_arm.shaderRGBA[2] = cent->grip_arm.shaderRGBA[0];
|
||||
|
||||
trap_R_AddRefEntityToScene( ¢->grip_arm );
|
||||
}
|
||||
}
|
||||
else if (!(cent->currentState.forcePowersActive & (1 << FP_GRIP)))
|
||||
{
|
||||
CG_ForcePushBlur( efOrg );
|
||||
}
|
||||
}
|
||||
|
||||
if (cent->currentState.weapon == WP_STUN_BATON && (cent->currentState.eFlags & EF_FIRING))
|
||||
|
@ -5483,7 +5757,7 @@ stillDoSaber:
|
|||
fxSArgs.rotation = 0.0f;
|
||||
fxSArgs.bounce = 0.0f;
|
||||
fxSArgs.life = 1.0f;
|
||||
fxSArgs.shader = cgs.media.yellowSaberGlowShader;
|
||||
fxSArgs.shader = cgs.media.yellowDroppedSaberShader;
|
||||
fxSArgs.flags = 0x08000000;
|
||||
trap_FX_AddSprite(&fxSArgs);
|
||||
}
|
||||
|
@ -5787,12 +6061,12 @@ doEssentialThree:
|
|||
|
||||
legs.renderfx &= ~RF_RGB_TINT;
|
||||
legs.renderfx &= ~RF_FORCE_ENT_ALPHA;
|
||||
legs.renderfx |= RF_DEPTHHACK;
|
||||
legs.renderfx |= RF_NODEPTH;
|
||||
legs.customShader = cgs.media.forceSightBubble;
|
||||
|
||||
trap_R_AddRefEntityToScene( &legs );
|
||||
|
||||
legs.renderfx &= ~RF_DEPTHHACK;
|
||||
legs.renderfx &= ~RF_NODEPTH;
|
||||
}
|
||||
|
||||
if ((cg.snap->ps.fd.forcePowersActive & (1 << FP_SEE)) && cg.snap->ps.clientNum != cent->currentState.number && cg_auraShell.integer)
|
||||
|
@ -5832,11 +6106,11 @@ doEssentialThree:
|
|||
}
|
||||
else
|
||||
*/ { // See through walls.
|
||||
legs.renderfx |= RF_MINLIGHT | RF_DEPTHHACK;
|
||||
legs.renderfx |= RF_MINLIGHT | RF_NODEPTH;
|
||||
|
||||
if (cg.snap->ps.fd.forcePowerLevel[FP_SEE] < FORCE_LEVEL_2)
|
||||
{ //only level 2+ can see players through walls
|
||||
legs.renderfx &= ~RF_DEPTHHACK;
|
||||
legs.renderfx &= ~RF_NODEPTH;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5882,7 +6156,7 @@ doEssentialThree:
|
|||
trap_R_AddRefEntityToScene( &legs );
|
||||
|
||||
if ( random() > 0.9f )
|
||||
trap_S_StartSound ( NULL, cent->currentState.number, CHAN_AUTO, trap_S_RegisterSound( "sound/effects/energy_crackle.wav" ) );
|
||||
trap_S_StartSound ( NULL, cent->currentState.number, CHAN_AUTO, cgs.media.crackleSound );
|
||||
}
|
||||
}
|
||||
|
|
@ -283,6 +283,8 @@ static void pushReward(sfxHandle_t sfx, qhandle_t shader, int rewardCount) {
|
|||
}
|
||||
}
|
||||
|
||||
int cgAnnouncerTime = 0; //to prevent announce sounds from playing on top of each other
|
||||
|
||||
/*
|
||||
==================
|
||||
CG_CheckLocalSounds
|
||||
|
@ -392,7 +394,7 @@ void CG_CheckLocalSounds( playerState_t *ps, playerState_t *ops ) {
|
|||
reward = qfalse;
|
||||
#endif
|
||||
// lead changes
|
||||
if (!reward) {
|
||||
if (!reward && cgAnnouncerTime < cg.time) {
|
||||
//
|
||||
if ( !cg.warmup ) {
|
||||
// never play lead changes during warmup
|
||||
|
@ -400,10 +402,12 @@ void CG_CheckLocalSounds( playerState_t *ps, playerState_t *ops ) {
|
|||
if ( cgs.gametype < GT_TEAM) {
|
||||
if ( ps->persistant[PERS_RANK] == 0 ) {
|
||||
CG_AddBufferedSound(cgs.media.takenLeadSound);
|
||||
cgAnnouncerTime = cg.time + 3000;
|
||||
} else if ( ps->persistant[PERS_RANK] == RANK_TIED_FLAG ) {
|
||||
//CG_AddBufferedSound(cgs.media.tiedLeadSound);
|
||||
} else if ( ( ops->persistant[PERS_RANK] & ~RANK_TIED_FLAG ) == 0 ) {
|
||||
CG_AddBufferedSound(cgs.media.lostLeadSound);
|
||||
cgAnnouncerTime = cg.time + 3000;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -411,7 +415,7 @@ void CG_CheckLocalSounds( playerState_t *ps, playerState_t *ops ) {
|
|||
}
|
||||
|
||||
// timelimit warnings
|
||||
if ( cgs.timelimit > 0 ) {
|
||||
if ( cgs.timelimit > 0 && cgAnnouncerTime < cg.time ) {
|
||||
int msec;
|
||||
|
||||
msec = cg.time - cgs.levelStartTime;
|
||||
|
@ -422,27 +426,32 @@ void CG_CheckLocalSounds( playerState_t *ps, playerState_t *ops ) {
|
|||
else if ( !( cg.timelimitWarnings & 2 ) && msec > (cgs.timelimit - 1) * 60 * 1000 ) {
|
||||
cg.timelimitWarnings |= 1 | 2;
|
||||
trap_S_StartLocalSound( cgs.media.oneMinuteSound, CHAN_ANNOUNCER );
|
||||
cgAnnouncerTime = cg.time + 3000;
|
||||
}
|
||||
else if ( cgs.timelimit > 5 && !( cg.timelimitWarnings & 1 ) && msec > (cgs.timelimit - 5) * 60 * 1000 ) {
|
||||
cg.timelimitWarnings |= 1;
|
||||
trap_S_StartLocalSound( cgs.media.fiveMinuteSound, CHAN_ANNOUNCER );
|
||||
cgAnnouncerTime = cg.time + 3000;
|
||||
}
|
||||
}
|
||||
|
||||
// fraglimit warnings
|
||||
if ( cgs.fraglimit > 0 && cgs.gametype < GT_CTF && cgs.gametype != GT_TOURNAMENT) {
|
||||
if ( cgs.fraglimit > 0 && cgs.gametype < GT_CTF && cgs.gametype != GT_TOURNAMENT && cgAnnouncerTime < cg.time) {
|
||||
highScore = cgs.scores1;
|
||||
if ( !( cg.fraglimitWarnings & 4 ) && highScore == (cgs.fraglimit - 1) ) {
|
||||
cg.fraglimitWarnings |= 1 | 2 | 4;
|
||||
CG_AddBufferedSound(cgs.media.oneFragSound);
|
||||
cgAnnouncerTime = cg.time + 3000;
|
||||
}
|
||||
else if ( cgs.fraglimit > 2 && !( cg.fraglimitWarnings & 2 ) && highScore == (cgs.fraglimit - 2) ) {
|
||||
cg.fraglimitWarnings |= 1 | 2;
|
||||
CG_AddBufferedSound(cgs.media.twoFragSound);
|
||||
cgAnnouncerTime = cg.time + 3000;
|
||||
}
|
||||
else if ( cgs.fraglimit > 3 && !( cg.fraglimitWarnings & 1 ) && highScore == (cgs.fraglimit - 3) ) {
|
||||
cg.fraglimitWarnings |= 1;
|
||||
CG_AddBufferedSound(cgs.media.threeFragSound);
|
||||
cgAnnouncerTime = cg.time + 3000;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -165,6 +165,8 @@ typedef enum {
|
|||
CG_PC_FREE_SOURCE,
|
||||
CG_PC_READ_TOKEN,
|
||||
CG_PC_SOURCE_FILE_AND_LINE,
|
||||
CG_PC_LOAD_GLOBAL_DEFINES,
|
||||
CG_PC_REMOVE_ALL_GLOBAL_DEFINES,
|
||||
|
||||
CG_S_STOPBACKGROUNDTRACK,
|
||||
CG_REAL_TIME,
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue