2001-12-31 16:16:59 +00:00
//-----------------------------------------------------------------------------
//
// $Id$
//
//-----------------------------------------------------------------------------
//
2001-12-31 16:28:42 +00:00
// $Log$
2003-03-29 16:01:36 +00:00
// Revision 1.129 2003/03/29 16:01:36 jbravo
// _skin cvars now fully removed. dlight code from Makro added. cvar
// defaults fixed.
//
2003-03-29 15:04:03 +00:00
// Revision 1.128 2003/03/29 15:04:03 jbravo
// Removing skin replacement cvars
//
2003-03-28 10:36:03 +00:00
// Revision 1.127 2003/03/28 10:36:02 jbravo
// Tweaking the replacement system a bit. Reactionmale now the default model
//
2003-03-22 20:29:26 +00:00
// Revision 1.126 2003/03/22 20:29:26 jbravo
// wrapping linkent and unlinkent calls
//
2003-03-22 20:19:20 +00:00
// Revision 1.125 2003/03/22 20:19:20 jbravo
// Item replacement fixes, tmp ban after votekicks and ignore now works on
// players with colors.
//
2003-03-10 01:32:35 +00:00
// Revision 1.124 2003/03/10 01:32:35 jbravo
// skin only replacements can now have icons of their own.
//
2003-03-09 21:30:39 +00:00
// Revision 1.123 2003/03/09 21:30:38 jbravo
// Adding unlagged. Still needs work.
//
2003-02-27 08:10:20 +00:00
// Revision 1.122 2003/02/27 08:10:20 jbravo
// Added replacement model functionality for ammo
//
2003-02-25 22:41:14 +00:00
// Revision 1.121 2003/02/25 22:41:14 jbravo
// Fixed a bug in item replacements. Removed "Beta" from the version.
//
2003-02-16 21:39:10 +00:00
// Revision 1.120 2003/02/16 21:39:09 makro
// Fixed "timelimit is read only" on local servers error
//
2003-02-05 20:21:38 +00:00
// Revision 1.119 2003/02/05 20:21:38 jbravo
// Fixed the model replacement system. Its no longer an ugly hack.
//
2003-02-01 02:15:31 +00:00
// Revision 1.118 2003/02/01 02:15:31 jbravo
// Replacement models and items
//
2003-01-08 04:46:26 +00:00
// Revision 1.117 2003/01/08 04:46:26 jbravo
// Wrote a new hackish model replacement system
//
2002-12-06 07:31:41 +00:00
// Revision 1.116 2002/12/06 07:31:41 blaze
// changed the helmet default from helmet/helmet to helmet
//
2002-12-05 23:11:29 +00:00
// Revision 1.115 2002/12/05 23:11:29 blaze
// Added item replacement code
//
2002-11-18 04:39:47 +00:00
// Revision 1.114 2002/11/18 04:39:47 jbravo
// Cleanup of cg_weapons.c
//
2002-10-30 20:04:34 +00:00
// Revision 1.113 2002/10/30 20:04:34 jbravo
// Adding helmet
//
2002-10-20 21:24:32 +00:00
// Revision 1.112 2002/10/20 21:24:32 blaze
2002-11-18 04:39:47 +00:00
// Added cg_RQ3_gunname cvars. These can be used to choose weapon replacements. You will need 3 icons that I will upload to the ftp. These should go in the next pk3
2002-10-20 21:24:32 +00:00
//
2002-09-08 03:15:16 +00:00
// Revision 1.111 2002/09/08 03:15:16 niceass
// tracerchance now can be 0.0 to 0.4
//
2002-08-29 14:25:13 +00:00
// Revision 1.110 2002/08/29 14:25:13 niceass
// new wallhack thing
//
2002-08-29 10:26:46 +00:00
// Revision 1.109 2002/08/29 10:26:46 jbravo
// Blaze's commit nuked my keanu code and Suicide code in this file only.
// Its fixed now.
//
2002-08-29 05:55:28 +00:00
// Revision 1.108 2002/08/29 05:55:28 blaze
// changed ogc_islame from archive to ROM
//
2002-08-29 04:42:41 +00:00
// Revision 1.107 2002/08/29 04:42:41 blaze
// Anti OGC code
2002-08-28 18:52:10 +00:00
//
2002-08-27 05:10:42 +00:00
// Revision 1.104 2002/08/27 05:10:05 niceass
// new ctb marker shader names
//
2002-08-25 00:47:00 +00:00
// Revision 1.103 2002/08/25 00:45:24 niceass
// q3f atmosphere
//
2002-08-07 03:35:57 +00:00
// Revision 1.102 2002/08/07 03:35:57 jbravo
// Added dynamic radio and stopped all radio usage during lca
//
2002-07-26 22:28:38 +00:00
// Revision 1.101 2002/07/26 22:28:38 jbravo
// Fixed the server about menu, made the UI handle illegal models and skins
// better.
//
2002-07-26 06:21:43 +00:00
// Revision 1.100 2002/07/26 06:21:43 jbravo
// Fixed the MM settings stuff so it works on remote servers also.
// Removed the MM_NAMES_COLOR since it broke on nicks with color in them.
//
2002-07-21 18:47:27 +00:00
// Revision 1.99 2002/07/21 18:46:57 niceass
// weaponprediction cvar added
//
2002-07-20 02:25:53 +00:00
// Revision 1.98 2002/07/20 02:25:53 jbravo
// Added the AQDT CTB sounds to the base radio paks
//
2002-07-19 04:40:56 +00:00
// Revision 1.97 2002/07/19 04:40:56 jbravo
// Added 2 new radio sets and ctb radio sound support
//
2002-07-19 04:32:42 +00:00
// Revision 1.96 2002/07/19 04:32:09 niceass
// added marker support for ctb
//
2002-07-13 22:43:59 +00:00
// Revision 1.95 2002/07/13 22:42:18 makro
// Semi-working fog hull, semi-working sky portals (cgame code commented out)
// Basically, semi-working stuff :P
//
2002-07-08 00:52:14 +00:00
// Revision 1.94 2002/07/08 00:52:14 jbravo
// Renamed the foglaser shader at Sze's request.
//
2002-07-07 18:36:13 +00:00
// Revision 1.93 2002/07/07 18:36:13 jbravo
// Added an AntiIdle system. Can play insane sounds for idle players, drop them
// from teams or kick them. Upped version to Beta 2.1
//
2002-07-01 02:18:42 +00:00
// Revision 1.92 2002/07/01 02:18:41 jbravo
// Small fixes to CTB and possible fix for subs and limchasecam
//
2002-06-30 17:33:01 +00:00
// Revision 1.91 2002/06/30 17:33:01 jbravo
// New radio sounds and the 0wned sound was added.
//
2002-06-29 04:15:15 +00:00
// Revision 1.90 2002/06/29 04:15:15 jbravo
// CTF is now CTB. no weapons while the case is in hand other than pistol or knife
//
2002-06-24 05:55:50 +00:00
// Revision 1.89 2002/06/24 05:55:03 niceass
// drawping
//
2002-06-21 23:20:34 +00:00
// Revision 1.88 2002/06/21 23:20:34 blaze
2002-11-18 04:39:47 +00:00
// cg_RQ3_overlaycrosshair when set to 1 will draw your non zoomed crosshair overtop of your ssg crosshair
2002-06-21 23:20:34 +00:00
//
2002-06-21 21:05:57 +00:00
// Revision 1.87 2002/06/21 21:05:35 niceass
// laserfog stuff & removed unused cvar
//
2002-06-19 05:21:43 +00:00
// Revision 1.86 2002/06/19 05:20:01 niceass
// scoreboard stuff
//
2002-06-16 20:06:15 +00:00
// Revision 1.85 2002/06/16 20:06:13 jbravo
// Reindented all the source files with "indent -kr -ut -i8 -l120 -lc120 -sob -bad -bap"
//
2002-06-16 19:12:52 +00:00
// Revision 1.84 2002/06/16 19:12:52 jbravo
// Removed the MISSIONPACK ifdefs and missionpack only code.
//
2002-06-13 19:03:22 +00:00
// Revision 1.83 2002/06/13 19:03:22 niceass
// cg_forceModel teamplay fix.
//
2002-06-12 22:32:24 +00:00
// Revision 1.82 2002/06/12 22:31:59 slicer
// Even better way to improve the Cvar Anti-Cheat System
//
2002-06-12 15:30:24 +00:00
// Revision 1.81 2002/06/12 15:30:24 slicer
// Improved and fixed the Anti-Cheat System
//
2002-06-11 22:49:42 +00:00
// Revision 1.80 2002/06/11 22:49:22 niceass
// HC brass
//
2002-06-10 14:02:31 +00:00
// Revision 1.79 2002/06/10 14:02:31 slicer
// Removed rq3_cmd : ROUND , associated to cg_RQ3_team_round_going that wasn't being used
//
2002-06-10 13:20:03 +00:00
// Revision 1.78 2002/06/10 13:20:03 slicer
// RefID is now passed trought scoreboard, no more lca cvar, only cg.lca
//
2002-06-09 18:58:40 +00:00
// Revision 1.77 2002/06/09 18:58:40 makro
// no message
//
2002-06-09 05:16:58 +00:00
// Revision 1.76 2002/06/09 05:14:40 niceass
// pressure change
//
2002-06-06 20:44:16 +00:00
// Revision 1.75 2002/06/06 20:44:16 makro
// Removed cheat protection for cg_gunX, Y and Z
//
2002-06-06 18:10:51 +00:00
// Revision 1.74 2002/06/06 18:10:51 makro
// Loading a map with pre-2.0 breakables crashed Q3. Added temp fix
//
2002-06-06 03:01:46 +00:00
// Revision 1.73 2002/06/06 03:01:46 blaze
// a breakable with a underscore in it's name will now try and load files from it's parent if it cant find any itself
// ex glass_blue will load sounds from glass if there is no glass_blue/sounds/break1.wav
//
2002-06-06 01:54:26 +00:00
// Revision 1.72 2002/06/06 01:53:51 niceass
// pressure change
//
2002-06-05 23:36:39 +00:00
// Revision 1.71 2002/06/05 23:35:42 niceass
// "ready" command lag fix
//
2002-05-26 05:12:11 +00:00
// Revision 1.70 2002/05/26 05:12:11 niceass
// gravity fix and progress bar stuff
//
2002-05-25 07:12:34 +00:00
// Revision 1.69 2002/05/25 07:12:34 blaze
// moved breakables into a configstring so they work in demos
//
2002-05-21 14:59:12 +00:00
// Revision 1.68 2002/05/21 14:59:11 makro
// cg_RQ3_avidemo
//
2002-05-19 21:04:37 +00:00
// Revision 1.67 2002/05/19 21:04:37 jbravo
// Tkok popup system
//
2002-05-19 18:32:11 +00:00
// Revision 1.66 2002/05/19 18:32:11 jbravo
// Made new cvars for regular xhair colors.
//
2002-05-18 03:55:35 +00:00
// Revision 1.65 2002/05/18 03:55:35 niceass
// many misc. changes
//
2002-05-13 05:24:54 +00:00
// Revision 1.64 2002/05/13 05:24:54 jbravo
// the ssg color cvars now also control normal xhair color
//
2002-05-12 14:40:28 +00:00
// Revision 1.63 2002/05/12 14:39:48 makro
// Wood, brick & ceramic impact sounds
//
2002-05-11 19:18:20 +00:00
// Revision 1.62 2002/05/11 19:13:42 makro
// Sand surfaceparm
//
2002-05-11 15:40:41 +00:00
// Revision 1.61 2002/05/11 15:40:41 slicer
// Changed cg_RQ3_<team count> cvars to ui_RQ3_ and added a synch system for these
//
2002-05-09 06:45:14 +00:00
// Revision 1.60 2002/05/09 06:41:10 niceass
// New tracers
//
2002-04-30 11:20:12 +00:00
// Revision 1.59 2002/04/30 11:20:12 jbravo
// Redid the teamcount cvars.
//
2002-04-29 06:12:40 +00:00
// Revision 1.58 2002/04/29 06:12:40 niceass
// client matchmode stuff
//
2002-04-23 06:09:18 +00:00
// Revision 1.57 2002/04/23 06:06:57 niceass
// pressure stuff
//
2002-04-20 15:05:08 +00:00
// Revision 1.56 2002/04/20 15:05:08 makro
// More footstep sounds, a few other things
//
2002-04-10 05:13:42 +00:00
// Revision 1.55 2002/04/10 05:13:42 makro
// Changed cg_thirdPerson from CVAR_ROM to CVAR_CHEAT
//
2002-04-09 14:30:10 +00:00
// Revision 1.54 2002/04/09 14:30:10 jbravo
// Made cg_thirdPerson a CVAR_ROM, Made bots understand team aliases (1 and 2) and
// made TP spawns more random.
//
2002-04-07 12:49:53 +00:00
// Revision 1.53 2002/04/07 12:49:53 slicer
// Added 'teamname' command for MM, and tweaked the cvar system.
//
2002-04-03 03:13:49 +00:00
// Revision 1.52 2002/04/03 03:13:49 blaze
// NEW BREAKABLE CODE - will break all old breakables(wont appear in maps)
//
2002-03-26 10:32:52 +00:00
// Revision 1.51 2002/03/26 10:32:51 jbravo
// Bye bye LCA lag
//
2002-03-23 05:50:47 +00:00
// Revision 1.50 2002/03/23 05:50:47 jbravo
// Moved enableDust out of the missionpack
//
2002-03-23 05:17:43 +00:00
// Revision 1.49 2002/03/23 05:17:42 jbravo
// Major cleanup of game -> cgame communication with LCA vars.
//
2002-03-21 15:02:05 +00:00
// Revision 1.48 2002/03/21 15:02:05 jbravo
// More teamname cleanups and fix for fraglines.
//
2002-03-21 00:26:46 +00:00
// Revision 1.47 2002/03/21 00:26:20 blaze
// some fixing of func_explosive
//
2002-03-17 21:32:23 +00:00
// Revision 1.46 2002/03/17 21:32:23 jbravo
// Fixed the dynamic teamnames system up a bit to reduce traffic
//
2002-03-16 21:50:09 +00:00
// Revision 1.45 2002/03/16 21:49:08 niceass
// All new shell ejection code
//
2002-03-14 16:04:26 +00:00
// Revision 1.44 2002/03/14 16:04:26 slicer
// Optimization on radio parsing
//
2002-03-14 02:24:39 +00:00
// Revision 1.43 2002/03/14 02:24:39 jbravo
// Adding radio :)
//
2002-03-11 02:23:52 +00:00
// Revision 1.42 2002/03/11 02:23:52 niceass
// client gravity fix
//
2002-03-07 19:50:48 +00:00
// Revision 1.41 2002/03/07 19:50:48 makro
// Made cg_RQ3_ssgCrosshair latched
//
2002-03-07 14:51:57 +00:00
// Revision 1.40 2002/03/07 14:51:57 makro
// no message
//
2002-02-26 04:02:53 +00:00
// Revision 1.39 2002/02/26 04:02:53 jbravo
// Getting rid of the triangles over teammates heads by making cg_drawFriend's
// default 0
//
2002-02-04 00:11:12 +00:00
// Revision 1.38 2002/02/04 00:11:12 slicer
// Matchmode: Teams Ready/Not Ready goes by cvar MM_team1/2
//
2002-01-30 07:37:25 +00:00
// Revision 1.37 2002/01/30 07:37:25 niceass
// EnableBreath added for mappers (TA thing)
//
2002-01-24 14:20:53 +00:00
// Revision 1.36 2002/01/24 14:20:53 jbravo
// Adding func_explosive and a few new surfaceparms
//
2002-01-11 20:20:58 +00:00
// Revision 1.35 2002/01/11 20:20:57 jbravo
// Adding TP to main branch
//
2002-01-11 19:48:33 +00:00
// Revision 1.34 2002/01/11 19:48:29 jbravo
// Formatted the source in non DOS format.
//
2001-12-31 16:28:42 +00:00
// Revision 1.33 2001/12/31 16:28:41 jbravo
// I made a Booboo with the Log tag.
//
2001-12-31 16:16:59 +00:00
//
//-----------------------------------------------------------------------------
2001-05-06 20:50:27 +00:00
// Copyright (C) 1999-2000 Id Software, Inc.
//
// cg_main.c -- initialization and primary entry point for cgame
# include "cg_local.h"
int forceModelModificationCount = - 1 ;
2002-06-16 20:06:15 +00:00
void CG_Init ( int serverMessageNum , int serverCommandSequence , int clientNum ) ;
void CG_Shutdown ( void ) ;
2001-05-06 20:50:27 +00:00
2002-04-03 03:13:49 +00:00
//Blaze: used to access the names of the breakables
char rq3_breakables [ RQ3_MAX_BREAKABLES ] [ 80 ] ;
2003-02-05 20:21:38 +00:00
// JBravo: used to store replacement models
2003-02-27 08:10:20 +00:00
char RQ3_knife_model [ MAX_MODEL_LEN ] , RQ3_knife_icon [ MAX_MODEL_LEN ] ;
char RQ3_pistol_model [ MAX_MODEL_LEN ] , RQ3_pistol_icon [ MAX_MODEL_LEN ] ;
char RQ3_m4_model [ MAX_MODEL_LEN ] , RQ3_m4_icon [ MAX_MODEL_LEN ] ;
char RQ3_ssg3000_model [ MAX_MODEL_LEN ] , RQ3_ssg3000_icon [ MAX_MODEL_LEN ] ;
char RQ3_mp5_model [ MAX_MODEL_LEN ] , RQ3_mp5_icon [ MAX_MODEL_LEN ] ;
char RQ3_handcannon_model [ MAX_MODEL_LEN ] , RQ3_handcannon_icon [ MAX_MODEL_LEN ] ;
char RQ3_m3_model [ MAX_MODEL_LEN ] , RQ3_m3_icon [ MAX_MODEL_LEN ] ;
char RQ3_akimbo_model [ MAX_MODEL_LEN ] , RQ3_akimbo_icon [ MAX_MODEL_LEN ] ;
char RQ3_grenade_model [ MAX_MODEL_LEN ] , RQ3_grenade_icon [ MAX_MODEL_LEN ] ;
char RQ3_kevlar_model [ MAX_MODEL_LEN ] , RQ3_kevlar_icon [ MAX_MODEL_LEN ] ;
char RQ3_silencer_model [ MAX_MODEL_LEN ] , RQ3_silencer_icon [ MAX_MODEL_LEN ] ;
char RQ3_laser_model [ MAX_MODEL_LEN ] , RQ3_laser_icon [ MAX_MODEL_LEN ] ;
char RQ3_bandolier_model [ MAX_MODEL_LEN ] , RQ3_bandolier_icon [ MAX_MODEL_LEN ] ;
char RQ3_slippers_model [ MAX_MODEL_LEN ] , RQ3_slippers_icon [ MAX_MODEL_LEN ] ;
char RQ3_helmet_model [ MAX_MODEL_LEN ] , RQ3_helmet_icon [ MAX_MODEL_LEN ] ;
char RQ3_ammo_mk23_model [ MAX_MODEL_LEN ] , RQ3_ammo_mk23_icon [ MAX_MODEL_LEN ] ;
char RQ3_ammo_shells_model [ MAX_MODEL_LEN ] , RQ3_ammo_shells_icon [ MAX_MODEL_LEN ] ;
char RQ3_ammo_ssg3000_model [ MAX_MODEL_LEN ] , RQ3_ammo_ssg3000_icon [ MAX_MODEL_LEN ] ;
char RQ3_ammo_mp5_model [ MAX_MODEL_LEN ] , RQ3_ammo_mp5_icon [ MAX_MODEL_LEN ] ;
char RQ3_ammo_m4_model [ MAX_MODEL_LEN ] , RQ3_ammo_m4_icon [ MAX_MODEL_LEN ] ;
2003-02-05 20:21:38 +00:00
2001-05-06 20:50:27 +00:00
/*
= = = = = = = = = = = = = = = =
vmMain
This is the only way control passes into the module .
This must be the very first function compiled into the . q3vm file
= = = = = = = = = = = = = = = =
*/
2002-06-16 20:06:15 +00:00
int vmMain ( int command , int arg0 , int arg1 , int arg2 , int arg3 , int arg4 , int arg5 , int arg6 , int arg7 , int arg8 ,
int arg9 , int arg10 , int arg11 )
{
2001-05-06 20:50:27 +00:00
2002-06-16 20:06:15 +00:00
switch ( command ) {
2001-05-06 20:50:27 +00:00
case CG_INIT :
2002-06-16 20:06:15 +00:00
CG_Init ( arg0 , arg1 , arg2 ) ;
2001-05-06 20:50:27 +00:00
return 0 ;
case CG_SHUTDOWN :
CG_Shutdown ( ) ;
return 0 ;
case CG_CONSOLE_COMMAND :
return CG_ConsoleCommand ( ) ;
case CG_DRAW_ACTIVE_FRAME :
2002-06-16 20:06:15 +00:00
CG_DrawActiveFrame ( arg0 , arg1 , arg2 ) ;
2001-05-06 20:50:27 +00:00
return 0 ;
case CG_CROSSHAIR_PLAYER :
return CG_CrosshairPlayer ( ) ;
case CG_LAST_ATTACKER :
return CG_LastAttacker ( ) ;
case CG_KEY_EVENT :
CG_KeyEvent ( arg0 , arg1 ) ;
return 0 ;
case CG_MOUSE_EVENT :
CG_MouseEvent ( arg0 , arg1 ) ;
return 0 ;
case CG_EVENT_HANDLING :
CG_EventHandling ( arg0 ) ;
return 0 ;
default :
2002-06-16 20:06:15 +00:00
CG_Error ( " vmMain: unknown command %i " , command ) ;
2001-05-06 20:50:27 +00:00
break ;
}
return - 1 ;
}
2002-06-16 20:06:15 +00:00
cg_t cg ;
cgs_t cgs ;
centity_t cg_entities [ MAX_GENTITIES ] ;
weaponInfo_t cg_weapons [ MAX_WEAPONS ] ;
itemInfo_t cg_items [ MAX_ITEMS ] ;
vmCvar_t cg_railTrailTime ;
vmCvar_t cg_centertime ;
vmCvar_t cg_runpitch ;
vmCvar_t cg_runroll ;
vmCvar_t cg_bobup ;
vmCvar_t cg_bobpitch ;
vmCvar_t cg_bobroll ;
vmCvar_t cg_swingSpeed ;
vmCvar_t cg_shadows ;
vmCvar_t cg_gibs ;
vmCvar_t cg_drawTimer ;
vmCvar_t cg_drawFPS ;
2002-06-24 05:55:50 +00:00
vmCvar_t cg_drawPing ;
2002-06-16 20:06:15 +00:00
vmCvar_t cg_drawSnapshot ;
vmCvar_t cg_draw3dIcons ;
vmCvar_t cg_drawIcons ;
vmCvar_t cg_drawAmmoWarning ;
vmCvar_t cg_drawCrosshair ;
vmCvar_t cg_drawCrosshairNames ;
vmCvar_t cg_drawRewards ;
vmCvar_t cg_crosshairSize ;
vmCvar_t cg_crosshairX ;
vmCvar_t cg_crosshairY ;
vmCvar_t cg_crosshairHealth ;
vmCvar_t cg_draw2D ;
vmCvar_t cg_drawStatus ;
vmCvar_t cg_animSpeed ;
vmCvar_t cg_debugAnim ;
vmCvar_t cg_debugPosition ;
vmCvar_t cg_debugEvents ;
vmCvar_t cg_errorDecay ;
vmCvar_t cg_nopredict ;
vmCvar_t cg_noPlayerAnims ;
vmCvar_t cg_showmiss ;
vmCvar_t cg_footsteps ;
vmCvar_t cg_addMarks ;
vmCvar_t cg_brassTime ;
vmCvar_t cg_viewsize ;
vmCvar_t cg_drawGun ;
vmCvar_t cg_gun_frame ;
vmCvar_t cg_gun_x ;
vmCvar_t cg_gun_y ;
vmCvar_t cg_gun_z ;
vmCvar_t cg_tracerChance ;
vmCvar_t cg_tracerWidth ;
vmCvar_t cg_tracerLength ;
vmCvar_t cg_autoswitch ;
vmCvar_t cg_ignore ;
vmCvar_t cg_simpleItems ;
vmCvar_t cg_fov ;
vmCvar_t cg_thirdPerson ;
vmCvar_t cg_thirdPersonRange ;
vmCvar_t cg_thirdPersonAngle ;
vmCvar_t cg_stereoSeparation ;
vmCvar_t cg_lagometer ;
vmCvar_t cg_drawAttacker ;
vmCvar_t cg_synchronousClients ;
vmCvar_t cg_teamChatTime ;
vmCvar_t cg_teamChatHeight ;
vmCvar_t cg_stats ;
vmCvar_t cg_buildScript ;
vmCvar_t cg_forceModel ;
vmCvar_t cg_paused ;
vmCvar_t cg_blood ;
vmCvar_t cg_predictItems ;
vmCvar_t cg_deferPlayers ;
vmCvar_t cg_drawTeamOverlay ;
vmCvar_t cg_teamOverlayUserinfo ;
2001-05-06 20:50:27 +00:00
//Blaze: reaction weapon positioning
2001-11-13 05:32:07 +00:00
// Elder: removed for now
2002-06-16 20:06:15 +00:00
//vmCvar_t cg_RQ3_drawWeapon;
vmCvar_t cg_RQ3_glasstime ;
2002-08-29 04:42:41 +00:00
//Blaze: Anti OGC code
vmCvar_t ogc_islame ;
2002-10-20 21:24:32 +00:00
//Blaze: replacement weapons
2002-11-18 04:39:47 +00:00
vmCvar_t cg_RQ3_knife ;
vmCvar_t cg_RQ3_mk23 ;
vmCvar_t cg_RQ3_m4 ;
vmCvar_t cg_RQ3_ssg3000 ;
vmCvar_t cg_RQ3_mp5 ;
vmCvar_t cg_RQ3_handcannon ;
vmCvar_t cg_RQ3_m3 ;
vmCvar_t cg_RQ3_akimbo ;
vmCvar_t cg_RQ3_grenade ;
2003-02-01 02:15:31 +00:00
// JBravo: replacement skin cvars
2003-03-29 15:04:03 +00:00
/* vmCvar_t cg_RQ3_knife_skin;
2003-02-01 02:15:31 +00:00
vmCvar_t cg_RQ3_mk23_skin ;
vmCvar_t cg_RQ3_m4_skin ;
vmCvar_t cg_RQ3_ssg3000_skin ;
vmCvar_t cg_RQ3_mp5_skin ;
vmCvar_t cg_RQ3_handcannon_skin ;
vmCvar_t cg_RQ3_m3_skin ;
vmCvar_t cg_RQ3_akimbo_skin ;
2003-03-29 15:04:03 +00:00
vmCvar_t cg_RQ3_grenade_skin ; */
2002-12-05 23:11:29 +00:00
//Blaze: replacement items
vmCvar_t cg_RQ3_bandolier ;
vmCvar_t cg_RQ3_kevlar ;
vmCvar_t cg_RQ3_silencer ;
vmCvar_t cg_RQ3_laser ;
vmCvar_t cg_RQ3_slippers ;
vmCvar_t cg_RQ3_helmet ;
2003-02-01 02:15:31 +00:00
// JBravo: replacement skin cvars
2003-03-29 15:04:03 +00:00
/* vmCvar_t cg_RQ3_bandolier_skin;
2003-02-01 02:15:31 +00:00
vmCvar_t cg_RQ3_kevlar_skin ;
vmCvar_t cg_RQ3_silencer_skin ;
vmCvar_t cg_RQ3_laser_skin ;
vmCvar_t cg_RQ3_slippers_skin ;
2003-03-29 15:04:03 +00:00
vmCvar_t cg_RQ3_helmet_skin ; */
2003-02-27 08:10:20 +00:00
// JBravo replacement ammo models
vmCvar_t cg_RQ3_ammo_mk23 ;
vmCvar_t cg_RQ3_ammo_shells ;
vmCvar_t cg_RQ3_ammo_ssg3000 ;
vmCvar_t cg_RQ3_ammo_mp5 ;
vmCvar_t cg_RQ3_ammo_m4 ;
2003-03-28 10:36:03 +00:00
// JBravo: replacement skin cvars
2003-03-29 15:04:03 +00:00
/* vmCvar_t cg_RQ3_ammo_mk23_skin;
2003-03-28 10:36:03 +00:00
vmCvar_t cg_RQ3_ammo_shells_skin ;
vmCvar_t cg_RQ3_ammo_ssg3000_skin ;
vmCvar_t cg_RQ3_ammo_mp5_skin ;
2003-03-29 15:04:03 +00:00
vmCvar_t cg_RQ3_ammo_m4_skin ; */
2002-12-05 23:11:29 +00:00
2001-06-08 04:35:50 +00:00
//Elder: muzzle flash toggle
2002-06-16 20:06:15 +00:00
vmCvar_t cg_RQ3_flash ;
2001-07-16 01:41:36 +00:00
//Elder: toggle alpha blending
2002-06-16 20:06:15 +00:00
vmCvar_t cg_RQ3_painblend ;
2001-07-16 01:41:36 +00:00
//Elder: toggle client-side zoom assist
2002-06-16 20:06:15 +00:00
vmCvar_t cg_RQ3_ssgZoomAssist ;
2001-07-16 01:41:36 +00:00
//Elder: crosshair colours!
2002-06-16 20:06:15 +00:00
vmCvar_t cg_RQ3_ssgColorR ;
vmCvar_t cg_RQ3_ssgColorG ;
vmCvar_t cg_RQ3_ssgColorB ;
vmCvar_t cg_RQ3_ssgColorA ;
2002-05-19 18:32:11 +00:00
// JBravo: normal crosshair colors
2002-06-16 20:06:15 +00:00
vmCvar_t cg_RQ3_crosshairColorR ;
vmCvar_t cg_RQ3_crosshairColorG ;
vmCvar_t cg_RQ3_crosshairColorB ;
vmCvar_t cg_RQ3_crosshairColorA ;
2002-06-21 23:20:34 +00:00
//Blaze: allow regular crosshair to be overlaid ontop of the ssg crosshair
vmCvar_t cg_RQ3_overlaycrosshair ;
2002-05-19 21:04:37 +00:00
// JBravo: cvar for tkok popup
2002-06-16 20:06:15 +00:00
vmCvar_t cg_RQ3_tkokAutoPopup ;
2002-08-07 03:35:57 +00:00
// JBravo: radio cvars.
2002-07-19 04:40:56 +00:00
vmCvar_t cg_RQ3_radiovoice_male ;
vmCvar_t cg_RQ3_radiovoice_female ;
2002-08-29 10:26:46 +00:00
vmCvar_t cg_RQ3_SuicideLikeARealMan ;
2002-08-07 03:35:57 +00:00
vmCvar_t cg_RQ3_dynamicRadio ;
2002-06-16 20:06:15 +00:00
2002-06-12 15:30:24 +00:00
// Slicer: for the Anti-Cheat System
2002-06-16 20:06:15 +00:00
//vmCvar_t cg_RQ3_Auth;
2001-10-11 22:50:58 +00:00
//Elder: SSG unique sensitivities
2002-06-16 20:06:15 +00:00
vmCvar_t cg_RQ3_ssgSensitivityAuto ;
vmCvar_t cg_RQ3_ssgSensitivity2x ;
vmCvar_t cg_RQ3_ssgSensitivity4x ;
vmCvar_t cg_RQ3_ssgSensitivity6x ;
2001-12-01 09:05:14 +00:00
//Blaze: Which ssg crosshair to use
2002-06-16 20:06:15 +00:00
vmCvar_t cg_RQ3_ssgCrosshair ;
2002-03-21 00:26:46 +00:00
//Blaze: Allow stuff to be done automatically on round start/end
2002-06-16 20:06:15 +00:00
vmCvar_t cg_RQ3_autoAction ;
2001-07-24 01:49:02 +00:00
//Elder: smoke puffs, sparks, etc.
2002-06-16 20:06:15 +00:00
vmCvar_t cg_RQ3_impactEffects ;
2001-07-28 14:12:11 +00:00
//Elder: toggle client-side laser drawing
2002-06-16 20:06:15 +00:00
vmCvar_t cg_RQ3_laserAssist ;
2001-07-28 13:56:28 +00:00
//Blaze: anouncer sounds
2002-06-16 20:06:15 +00:00
vmCvar_t cg_RQ3_anouncer ;
2001-08-13 17:25:06 +00:00
//Elder: different blood types
2002-06-16 20:06:15 +00:00
vmCvar_t cg_RQ3_bloodStyle ;
2001-12-17 15:06:41 +00:00
//NiceAss: Temporary boolean strobe cvar
2002-06-16 20:06:15 +00:00
vmCvar_t cg_RQ3_strobe ;
2002-07-21 18:47:27 +00:00
//NiceAss: Predict weapon animations or not. Makes it like Q2 if disabled.
vmCvar_t cg_RQ3_predictWeapons ;
2002-05-21 14:59:12 +00:00
//Makro: avidemo with jpegs
2002-06-16 20:06:15 +00:00
vmCvar_t cg_RQ3_avidemo ;
vmCvar_t cg_drawFriend ;
vmCvar_t cg_teamChatsOnly ;
vmCvar_t cg_noVoiceChats ;
vmCvar_t cg_noVoiceText ;
vmCvar_t cg_hudFiles ;
vmCvar_t cg_scorePlum ;
2003-03-09 21:30:39 +00:00
//vmCvar_t cg_smoothClients;
2002-06-16 20:06:15 +00:00
vmCvar_t pmove_fixed ;
//vmCvar_t cg_pmove_fixed;
vmCvar_t pmove_msec ;
vmCvar_t cg_pmove_msec ;
vmCvar_t cg_cameraMode ;
vmCvar_t cg_cameraOrbit ;
vmCvar_t cg_cameraOrbitDelay ;
vmCvar_t cg_timescaleFadeEnd ;
vmCvar_t cg_timescaleFadeSpeed ;
vmCvar_t cg_timescale ;
vmCvar_t cg_smallFont ;
vmCvar_t cg_bigFont ;
vmCvar_t cg_noTaunt ;
vmCvar_t cg_noProjectileTrail ;
vmCvar_t cg_oldRail ;
vmCvar_t cg_gravity ;
vmCvar_t cg_oldRocket ;
vmCvar_t cg_oldPlasma ;
vmCvar_t cg_trueLightning ;
2003-03-09 21:30:39 +00:00
// JBravo: unlagged
vmCvar_t cg_delag ;
vmCvar_t cg_debugDelag ;
vmCvar_t cg_drawBBox ;
vmCvar_t cg_cmdTimeNudge ;
vmCvar_t sv_fps ;
vmCvar_t cg_projectileNudge ;
vmCvar_t cg_optimizePrediction ;
vmCvar_t cl_timeNudge ;
vmCvar_t cg_latentSnaps ;
vmCvar_t cg_latentCmds ;
vmCvar_t cg_plOut ;
2001-09-16 04:04:31 +00:00
//Blaze: cheat struct
2002-06-16 20:06:15 +00:00
cheat_cvar cheats [ 30 ] ;
2002-03-23 05:17:43 +00:00
// JBravo: Teamplay cvars synced from game
2002-06-10 13:20:03 +00:00
//Slicer: no longer needed.
2002-06-16 20:06:15 +00:00
//vmCvar_t cg_RQ3_lca;
2002-06-10 14:02:31 +00:00
//Slicer: apparently not being used
2002-06-16 20:06:15 +00:00
//vmCvar_t cg_RQ3_team_round_going;
vmCvar_t cg_RQ3_team1name ;
vmCvar_t cg_RQ3_team2name ;
2002-06-19 05:21:43 +00:00
vmCvar_t cg_RQ3_team1model ;
vmCvar_t cg_RQ3_team2model ;
2002-06-16 20:06:15 +00:00
vmCvar_t ui_RQ3_teamCount1 ;
vmCvar_t ui_RQ3_teamCount2 ;
vmCvar_t ui_RQ3_numSpectators ;
2002-03-23 05:17:43 +00:00
2002-02-04 00:11:12 +00:00
//Slicer: matchmode team status cvars
2002-06-16 20:06:15 +00:00
//vmCvar_t cg_RQ3_RefID;
vmCvar_t cg_RQ3_matchmode ;
2002-01-30 07:37:25 +00:00
// NiceAss: Taken out of the missionpack
2002-06-16 20:06:15 +00:00
vmCvar_t cg_enableBreath ;
2002-06-21 21:05:57 +00:00
vmCvar_t cg_enableLaserFog ;
2002-06-16 20:06:15 +00:00
2002-03-23 05:50:47 +00:00
// JBravo: ditto
2002-06-16 20:06:15 +00:00
vmCvar_t cg_enableDust ;
2001-05-06 20:50:27 +00:00
2002-07-26 06:21:43 +00:00
// JBravo: cvars for the MM ingame menu
2003-02-16 21:39:10 +00:00
//Makro - removed timelimit/fraglimit cvars - they were causing problems on local servers
//vmCvar_t cg_RQ3_timelimit;
2002-07-26 06:21:43 +00:00
vmCvar_t cg_RQ3_roundlimit ;
vmCvar_t cg_RQ3_roundtimelimit ;
2003-02-16 21:39:10 +00:00
//vmCvar_t cg_RQ3_fraglimit;
2002-07-26 06:21:43 +00:00
vmCvar_t cg_RQ3_maxplayers ;
vmCvar_t cg_RQ3_forceteamtalk ;
vmCvar_t cg_RQ3_limchasecam ;
vmCvar_t cg_RQ3_tgren ;
vmCvar_t cg_RQ3_friendlyFire ;
2002-07-26 22:28:38 +00:00
vmCvar_t cg_RQ3_version ;
// JBravo: cvars for the about menu
vmCvar_t cg_RQ3_hostname ;
vmCvar_t cg_RQ3_needpass ;
vmCvar_t cg_RQ3_capturelimit ;
vmCvar_t cg_RQ3_dmflags ;
vmCvar_t cg_RQ3_bot_minplayers ;
vmCvar_t cg_RQ3_showOwnKills ;
2002-08-25 00:47:00 +00:00
// q3f atmospheric stuff
vmCvar_t cg_atmosphericEffects ;
vmCvar_t cg_lowEffects ;
2002-07-26 06:21:43 +00:00
2001-05-06 20:50:27 +00:00
typedef struct {
2002-06-16 20:06:15 +00:00
vmCvar_t * vmCvar ;
char * cvarName ;
char * defaultString ;
int cvarFlags ;
2001-05-06 20:50:27 +00:00
} cvarTable_t ;
2002-06-16 20:06:15 +00:00
static cvarTable_t cvarTable [ ] = { // bk001129
{ & cg_ignore , " cg_ignore " , " 0 " , 0 } , // used for debugging
{ & cg_autoswitch , " cg_autoswitch " , " 1 " , CVAR_ARCHIVE } ,
{ & cg_drawGun , " cg_drawGun " , " 1 " , CVAR_ARCHIVE } ,
{ & cg_fov , " cg_fov " , " 90 " , CVAR_ARCHIVE } ,
{ & cg_viewsize , " cg_viewsize " , " 100 " , CVAR_ARCHIVE } ,
{ & cg_stereoSeparation , " cg_stereoSeparation " , " 0.4 " , CVAR_ARCHIVE } ,
{ & cg_shadows , " cg_shadows " , " 1 " , CVAR_ARCHIVE } ,
{ & cg_gibs , " cg_gibs " , " 1 " , CVAR_ARCHIVE } ,
{ & cg_draw2D , " cg_draw2D " , " 1 " , CVAR_ARCHIVE } ,
{ & cg_drawStatus , " cg_drawStatus " , " 1 " , CVAR_ARCHIVE } ,
{ & cg_drawTimer , " cg_drawTimer " , " 0 " , CVAR_ARCHIVE } ,
{ & cg_drawFPS , " cg_drawFPS " , " 0 " , CVAR_ARCHIVE } ,
2002-06-24 05:55:50 +00:00
{ & cg_drawPing , " cg_drawPing " , " 0 " , CVAR_ARCHIVE } ,
2002-06-16 20:06:15 +00:00
{ & cg_drawSnapshot , " cg_drawSnapshot " , " 0 " , CVAR_ARCHIVE } ,
{ & cg_draw3dIcons , " cg_draw3dIcons " , " 1 " , CVAR_ARCHIVE } ,
{ & cg_drawIcons , " cg_drawIcons " , " 1 " , CVAR_ARCHIVE } ,
{ & cg_drawAmmoWarning , " cg_drawAmmoWarning " , " 1 " , CVAR_ARCHIVE } ,
{ & cg_drawAttacker , " cg_drawAttacker " , " 1 " , CVAR_ARCHIVE } ,
{ & cg_drawCrosshair , " cg_drawCrosshair " , " 4 " , CVAR_ARCHIVE } ,
{ & cg_drawCrosshairNames , " cg_drawCrosshairNames " , " 1 " , CVAR_ARCHIVE } ,
{ & cg_drawRewards , " cg_drawRewards " , " 1 " , CVAR_ARCHIVE } ,
{ & cg_crosshairSize , " cg_crosshairSize " , " 24 " , CVAR_ARCHIVE } ,
{ & cg_crosshairHealth , " cg_crosshairHealth " , " 1 " , CVAR_ARCHIVE } ,
{ & cg_crosshairX , " cg_crosshairX " , " 0 " , CVAR_ARCHIVE } ,
{ & cg_crosshairY , " cg_crosshairY " , " 0 " , CVAR_ARCHIVE } ,
{ & cg_brassTime , " cg_brassTime " , " 10000 " , CVAR_ARCHIVE } ,
{ & cg_simpleItems , " cg_simpleItems " , " 0 " , CVAR_ARCHIVE } ,
{ & cg_addMarks , " cg_marks " , " 1 " , CVAR_ARCHIVE } ,
{ & cg_lagometer , " cg_lagometer " , " 1 " , CVAR_ARCHIVE } ,
{ & cg_railTrailTime , " cg_railTrailTime " , " 400 " , CVAR_ARCHIVE } ,
2002-06-06 20:44:16 +00:00
//Makro - changed from CVAR_CHEAT
2002-06-16 20:06:15 +00:00
{ & cg_gun_x , " cg_gunX " , " 0 " , CVAR_ARCHIVE } ,
{ & cg_gun_y , " cg_gunY " , " 0 " , CVAR_ARCHIVE } ,
{ & cg_gun_z , " cg_gunZ " , " 0 " , CVAR_ARCHIVE } ,
2001-07-28 02:24:11 +00:00
//Blaze: to test the gun frames
2002-06-16 20:06:15 +00:00
{ & cg_gun_frame , " cg_gun_frame " , " 0 " , CVAR_CHEAT } ,
{ & cg_centertime , " cg_centertime " , " 3 " , CVAR_CHEAT } ,
{ & cg_runpitch , " cg_runpitch " , " 0.002 " , CVAR_ARCHIVE } ,
{ & cg_runroll , " cg_runroll " , " 0.005 " , CVAR_ARCHIVE } ,
{ & cg_bobup , " cg_bobup " , " 0.005 " , CVAR_ARCHIVE } ,
{ & cg_bobpitch , " cg_bobpitch " , " 0.002 " , CVAR_ARCHIVE } ,
{ & cg_bobroll , " cg_bobroll " , " 0.002 " , CVAR_ARCHIVE } ,
{ & cg_swingSpeed , " cg_swingSpeed " , " 0.3 " , CVAR_CHEAT } ,
{ & cg_animSpeed , " cg_animspeed " , " 1 " , CVAR_CHEAT } ,
{ & cg_debugAnim , " cg_debuganim " , " 0 " , CVAR_CHEAT } ,
{ & cg_debugPosition , " cg_debugposition " , " 0 " , CVAR_CHEAT } ,
{ & cg_debugEvents , " cg_debugevents " , " 0 " , CVAR_CHEAT } ,
{ & cg_errorDecay , " cg_errordecay " , " 100 " , 0 } ,
{ & cg_nopredict , " cg_nopredict " , " 0 " , 0 } ,
{ & cg_noPlayerAnims , " cg_noplayeranims " , " 0 " , CVAR_CHEAT } ,
{ & cg_showmiss , " cg_showmiss " , " 0 " , 0 } ,
2002-09-08 03:15:16 +00:00
{ & cg_footsteps , " cg_footsteps " , " 1 " , CVAR_ARCHIVE } ,
2002-06-16 20:06:15 +00:00
{ & cg_tracerChance , " cg_tracerchance " , " 0.4 " , CVAR_CHEAT } ,
{ & cg_tracerWidth , " cg_tracerwidth " , " 1 " , CVAR_CHEAT } ,
{ & cg_tracerLength , " cg_tracerlength " , " 300 " , CVAR_CHEAT } ,
{ & cg_thirdPersonRange , " cg_thirdPersonRange " , " 40 " , CVAR_CHEAT } ,
{ & cg_thirdPersonAngle , " cg_thirdPersonAngle " , " 0 " , CVAR_CHEAT } ,
2002-04-10 05:13:42 +00:00
//Makro - changing from CVAR_ROM (why was it like that ?) to CVAR_CHEAT
2002-06-16 20:06:15 +00:00
{ & cg_thirdPerson , " cg_thirdPerson " , " 0 " , CVAR_CHEAT } ,
{ & cg_teamChatTime , " cg_teamChatTime " , " 3000 " , CVAR_ARCHIVE } ,
{ & 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 " , " 1 " , CVAR_ARCHIVE } ,
{ & cg_drawTeamOverlay , " cg_drawTeamOverlay " , " 0 " , CVAR_ARCHIVE } ,
{ & cg_teamOverlayUserinfo , " teamoverlay " , " 0 " , CVAR_ROM | CVAR_USERINFO } ,
{ & cg_stats , " cg_stats " , " 0 " , 0 } ,
{ & cg_drawFriend , " cg_drawFriend " , " 0 " , CVAR_ARCHIVE } ,
{ & cg_teamChatsOnly , " cg_teamChatsOnly " , " 0 " , CVAR_ARCHIVE } ,
{ & cg_noVoiceChats , " cg_noVoiceChats " , " 0 " , CVAR_ARCHIVE } ,
{ & cg_noVoiceText , " cg_noVoiceText " , " 0 " , CVAR_ARCHIVE } ,
2002-08-29 05:55:28 +00:00
{ & ogc_islame , " ogc_islame " , " 1 " , CVAR_ROM } ,
2002-10-20 21:24:32 +00:00
//Blaze: replacement weapons
2003-03-29 16:01:36 +00:00
{ & cg_RQ3_knife , " cg_RQ3_knife " , " knife/default " , CVAR_ARCHIVE } ,
{ & cg_RQ3_mk23 , " cg_RQ3_mk23 " , " mk23/default " , CVAR_ARCHIVE } ,
{ & cg_RQ3_m4 , " cg_RQ3_m4 " , " m4/default " , CVAR_ARCHIVE } ,
{ & cg_RQ3_ssg3000 , " cg_RQ3_ssg3000 " , " ssg3000/default " , CVAR_ARCHIVE } ,
{ & cg_RQ3_mp5 , " cg_RQ3_mp5 " , " mp5/default " , CVAR_ARCHIVE } ,
{ & cg_RQ3_handcannon , " cg_RQ3_handcannon " , " handcannon/default " , CVAR_ARCHIVE } ,
{ & cg_RQ3_m3 , " cg_RQ3_m3 " , " m3/default " , CVAR_ARCHIVE } ,
{ & cg_RQ3_akimbo , " cg_RQ3_akimbo " , " akimbo/default " , CVAR_ARCHIVE } ,
{ & cg_RQ3_grenade , " cg_RQ3_grenade " , " grenade/default " , CVAR_ARCHIVE } ,
2003-02-01 02:15:31 +00:00
// JBravo: replacement skins
2003-03-29 15:04:03 +00:00
/* {&cg_RQ3_knife_skin, "cg_RQ3_knife_skin", "default", CVAR_ARCHIVE},
2003-02-01 02:15:31 +00:00
{ & cg_RQ3_mk23_skin , " cg_RQ3_mk23_skin " , " default " , CVAR_ARCHIVE } ,
{ & cg_RQ3_m4_skin , " cg_RQ3_m4_skin " , " default " , CVAR_ARCHIVE } ,
{ & cg_RQ3_ssg3000_skin , " cg_RQ3_ssg3000_skin " , " default " , CVAR_ARCHIVE } ,
{ & cg_RQ3_mp5_skin , " cg_RQ3_mp5_skin " , " default " , CVAR_ARCHIVE } ,
{ & cg_RQ3_handcannon_skin , " cg_RQ3_handcannon_skin " , " default " , CVAR_ARCHIVE } ,
{ & cg_RQ3_m3_skin , " cg_RQ3_m3_skin " , " default " , CVAR_ARCHIVE } ,
{ & cg_RQ3_akimbo_skin , " cg_RQ3_akimbo_skin " , " default " , CVAR_ARCHIVE } ,
2003-03-29 15:04:03 +00:00
{ & cg_RQ3_grenade_skin , " cg_RQ3_grenade_skin " , " default " , CVAR_ARCHIVE } , */
2002-12-05 23:11:29 +00:00
//Blaze: replacement items
2003-03-29 16:01:36 +00:00
{ & cg_RQ3_bandolier , " cg_RQ3_bandolier " , " bandolier/default " , CVAR_ARCHIVE } ,
{ & cg_RQ3_kevlar , " cg_RQ3_kevlar " , " kevlar/default " , CVAR_ARCHIVE } ,
{ & cg_RQ3_silencer , " cg_RQ3_silencer " , " silencer/default " , CVAR_ARCHIVE } ,
{ & cg_RQ3_laser , " cg_RQ3_laser " , " laser/default " , CVAR_ARCHIVE } ,
{ & cg_RQ3_slippers , " cg_RQ3_slippers " , " slippers/default " , CVAR_ARCHIVE } ,
{ & cg_RQ3_helmet , " cg_RQ3_helmet " , " helmet/default " , CVAR_ARCHIVE } ,
2003-02-01 02:15:31 +00:00
// JBravo: replacement skins
2003-03-29 15:04:03 +00:00
/* {&cg_RQ3_bandolier_skin, "cg_RQ3_bandolier_skin", "default", CVAR_ARCHIVE},
2003-02-01 02:15:31 +00:00
{ & cg_RQ3_kevlar_skin , " cg_RQ3_kevlar_skin " , " default " , CVAR_ARCHIVE } ,
{ & cg_RQ3_silencer_skin , " cg_RQ3_silencer_skin " , " default " , CVAR_ARCHIVE } ,
{ & cg_RQ3_laser_skin , " cg_RQ3_laser_skin " , " default " , CVAR_ARCHIVE } ,
{ & cg_RQ3_slippers_skin , " cg_RQ3_slippers_skin " , " default " , CVAR_ARCHIVE } ,
2003-03-29 15:04:03 +00:00
{ & cg_RQ3_helmet_skin , " cg_RQ3_helmet_skin " , " default " , CVAR_ARCHIVE } , */
2003-02-27 08:10:20 +00:00
// JBravo: replacement ammo
2003-03-29 16:01:36 +00:00
{ & cg_RQ3_ammo_mk23 , " cg_RQ3_ammo_mk23 " , " mk23/default " , CVAR_ARCHIVE } ,
{ & cg_RQ3_ammo_shells , " cg_RQ3_ammo_shells " , " shells/default " , CVAR_ARCHIVE } ,
{ & cg_RQ3_ammo_ssg3000 , " cg_RQ3_ammo_ssg3000 " , " ssg3000/default " , CVAR_ARCHIVE } ,
{ & cg_RQ3_ammo_mp5 , " cg_RQ3_ammo_mp5 " , " mp5/default " , CVAR_ARCHIVE } ,
{ & cg_RQ3_ammo_m4 , " cg_RQ3_ammo_m4 " , " m4/default " , CVAR_ARCHIVE } ,
2003-03-28 10:36:03 +00:00
// JBravo: replacement skins
2003-03-29 15:04:03 +00:00
/* {&cg_RQ3_ammo_mk23_skin, "cg_RQ3_ammo_mk23_skin", "default", CVAR_ARCHIVE},
2003-03-28 10:36:03 +00:00
{ & cg_RQ3_ammo_shells_skin , " cg_RQ3_ammo_shells_skin " , " default " , CVAR_ARCHIVE } ,
{ & cg_RQ3_ammo_ssg3000_skin , " cg_RQ3_ammo_ssg3000_skin " , " default " , CVAR_ARCHIVE } ,
{ & cg_RQ3_ammo_mp5_skin , " cg_RQ3_ammo_mp5_skin " , " default " , CVAR_ARCHIVE } ,
2003-03-29 15:04:03 +00:00
{ & cg_RQ3_ammo_m4_skin , " cg_RQ3_ammo_m4_skin " , " default " , CVAR_ARCHIVE } , */
2002-12-05 23:11:29 +00:00
2001-05-06 20:50:27 +00:00
// the following variables are created in other parts of the system,
// but we also reference them here
2002-06-16 20:06:15 +00:00
{ & cg_buildScript , " com_buildScript " , " 0 " , 0 } , // force loading of all possible data amd error on failures
{ & cg_paused , " cl_paused " , " 0 " , CVAR_ROM } ,
{ & cg_blood , " com_blood " , " 1 " , CVAR_ARCHIVE } ,
{ & cg_synchronousClients , " g_synchronousClients " , " 0 " , 0 } , // communicated by systeminfo
2002-01-30 07:37:25 +00:00
// NiceAss: Taken out of the missionpack
2002-06-16 20:06:15 +00:00
{ & cg_enableBreath , " g_enableBreath " , " 0 " , CVAR_SERVERINFO } ,
2002-06-21 21:05:57 +00:00
{ & cg_enableLaserFog , " g_enableLaserFog " , " 1 " , CVAR_SERVERINFO } ,
2002-03-23 05:50:47 +00:00
// JBravo: ditto
2002-06-16 20:06:15 +00:00
{ & cg_enableDust , " g_enableDust " , " 0 " , CVAR_SERVERINFO } ,
{ & cg_cameraOrbit , " cg_cameraOrbit " , " 0 " , CVAR_CHEAT } ,
{ & cg_cameraOrbitDelay , " cg_cameraOrbitDelay " , " 50 " , CVAR_ARCHIVE } ,
{ & cg_timescaleFadeEnd , " cg_timescaleFadeEnd " , " 1 " , 0 } ,
{ & cg_timescaleFadeSpeed , " cg_timescaleFadeSpeed " , " 0 " , 0 } ,
{ & cg_timescale , " timescale " , " 1 " , 0 } ,
{ & cg_scorePlum , " cg_scorePlums " , " 1 " , CVAR_USERINFO | CVAR_ARCHIVE } ,
2003-03-09 21:30:39 +00:00
// {&cg_smoothClients, "cg_smoothClients", "0", CVAR_USERINFO | CVAR_ARCHIVE},
2002-06-16 20:06:15 +00:00
{ & cg_cameraMode , " com_cameraMode " , " 0 " , CVAR_CHEAT } ,
{ & pmove_fixed , " pmove_fixed " , " 0 " , 0 } ,
{ & pmove_msec , " pmove_msec " , " 8 " , 0 } ,
{ & cg_noTaunt , " cg_noTaunt " , " 0 " , CVAR_ARCHIVE } ,
{ & cg_noProjectileTrail , " cg_noProjectileTrail " , " 0 " , CVAR_ARCHIVE } ,
{ & cg_smallFont , " ui_smallFont " , " 0.25 " , CVAR_ARCHIVE } ,
{ & cg_bigFont , " ui_bigFont " , " 0.4 " , CVAR_ARCHIVE } ,
2001-05-06 20:50:27 +00:00
//Blaze: Reaction hand type command
2001-11-13 05:32:07 +00:00
// Elder: removed
//{ &cg_RQ3_drawWeapon, "cg_RQ3_drawWeapon", "2", CVAR_ARCHIVE },
2002-06-16 20:06:15 +00:00
{ & cg_RQ3_glasstime , " cg_RQ3_glasstime " , " 0 " , CVAR_ARCHIVE } ,
2002-06-12 15:30:24 +00:00
// Slicer: for the Anti-Cheat System
2002-06-12 22:32:24 +00:00
//{ &cg_RQ3_Auth, "cg_RQ3_Auth", "0", CVAR_USERINFO | CVAR_ROM },
2001-11-13 05:32:07 +00:00
// Elder: added
2002-06-16 20:06:15 +00:00
{ & cg_RQ3_flash , " cg_RQ3_flash " , " 1 " , CVAR_ARCHIVE } ,
2001-12-17 15:06:41 +00:00
// NiceAss: added
2002-06-16 20:06:15 +00:00
{ & cg_RQ3_strobe , " cg_RQ3_strobe " , " 0 " , CVAR_ARCHIVE } ,
{ & cg_RQ3_painblend , " cg_RQ3_painblend " , " 1 " , CVAR_ARCHIVE } ,
{ & cg_RQ3_ssgZoomAssist , " cg_RQ3_ssgZoomAssist " , " 1 " , CVAR_ARCHIVE } ,
{ & cg_RQ3_ssgSensitivityAuto , " cg_RQ3_ssgSensitivityAuto " , " 1 " , CVAR_ARCHIVE } ,
{ & cg_RQ3_ssgSensitivity2x , " cg_RQ3_ssgSensitivity2x " , " 0.4 " , CVAR_ARCHIVE } ,
{ & cg_RQ3_ssgSensitivity4x , " cg_RQ3_ssgSensitivity4x " , " 0.2 " , CVAR_ARCHIVE } ,
{ & cg_RQ3_ssgSensitivity6x , " cg_RQ3_ssgSensitivity6x " , " 0.1 " , CVAR_ARCHIVE } ,
//Blaze: Added to let people autop perform actions on match start/end
{ & cg_RQ3_autoAction , " cg_RQ3_autoAction " , " 0 " , CVAR_ARCHIVE } ,
2002-03-07 19:50:48 +00:00
//Makro - this should be latched
2002-06-16 20:06:15 +00:00
{ & cg_RQ3_ssgCrosshair , " cg_RQ3_ssgCrosshair " , " 0 " , CVAR_ARCHIVE | CVAR_LATCH } ,
{ & cg_RQ3_ssgColorR , " cg_RQ3_ssgColorR " , " 0.0 " , CVAR_ARCHIVE } ,
{ & cg_RQ3_ssgColorG , " cg_RQ3_ssgColorG " , " 1.0 " , CVAR_ARCHIVE } ,
{ & cg_RQ3_ssgColorB , " cg_RQ3_ssgColorB " , " 0.0 " , CVAR_ARCHIVE } ,
{ & cg_RQ3_ssgColorA , " cg_RQ3_ssgColorA " , " 0.75 " , CVAR_ARCHIVE } ,
2002-08-29 10:26:46 +00:00
//Blaze: allow regular crosshair to be overlaid ontop of the ssg crosshair
{ & cg_RQ3_overlaycrosshair , " cg_RQ3_overlaycrosshair " , " 0 " , CVAR_ARCHIVE } ,
2002-06-21 23:20:34 +00:00
2002-05-19 18:32:11 +00:00
// JBravo: cvars for regular crosshairs and their colors
2002-06-09 18:58:40 +00:00
// Makro - changed default color to white; it was 0/1/0/.75 before
2002-06-16 20:06:15 +00:00
{ & cg_RQ3_crosshairColorR , " cg_RQ3_crosshairColorR " , " 1.0 " , CVAR_ARCHIVE } ,
{ & cg_RQ3_crosshairColorG , " cg_RQ3_crosshairColorG " , " 1.0 " , CVAR_ARCHIVE } ,
{ & cg_RQ3_crosshairColorB , " cg_RQ3_crosshairColorB " , " 1.0 " , CVAR_ARCHIVE } ,
{ & cg_RQ3_crosshairColorA , " cg_RQ3_crosshairColorA " , " 1.0 " , CVAR_ARCHIVE } ,
{ & cg_RQ3_tkokAutoPopup , " cg_RQ3_tkokAutoPopup " , " 0 " , CVAR_ARCHIVE } ,
2002-08-07 03:35:57 +00:00
{ & cg_RQ3_radiovoice_male , " cg_RQ3_radiovoice_male " , " 1 " , CVAR_USERINFO | CVAR_ARCHIVE } ,
{ & cg_RQ3_radiovoice_female , " cg_RQ3_radiovoice_female " , " 1 " , CVAR_USERINFO | CVAR_ARCHIVE } ,
2002-08-29 10:26:46 +00:00
{ & cg_RQ3_SuicideLikeARealMan , " cg_RQ3_SuicideLikeARealMan " , " 0 " , CVAR_USERINFO | CVAR_ARCHIVE } ,
2002-08-07 03:35:57 +00:00
{ & cg_RQ3_dynamicRadio , " cg_RQ3_dynamicRadio " , " 1 " , CVAR_ARCHIVE } ,
2002-06-16 20:06:15 +00:00
{ & cg_RQ3_impactEffects , " cg_RQ3_impactEffects " , " 1 " , CVAR_ARCHIVE } ,
{ & cg_RQ3_laserAssist , " cg_RQ3_laserAssist " , " 0 " , CVAR_ARCHIVE } ,
{ & cg_RQ3_anouncer , " cg_RQ3_announcer " , " 1 " , CVAR_ARCHIVE } ,
{ & cg_RQ3_bloodStyle , " cg_RQ3_bloodStyle " , " 0 " , CVAR_ARCHIVE } ,
2002-07-21 18:47:27 +00:00
{ & cg_RQ3_predictWeapons , " cg_RQ3_predictWeapons " , " 1 " , CVAR_ARCHIVE } ,
2002-06-16 20:06:15 +00:00
{ & cg_oldRail , " cg_oldRail " , " 1 " , CVAR_ARCHIVE } ,
{ & cg_oldRocket , " cg_oldRocket " , " 1 " , CVAR_ARCHIVE } ,
{ & cg_oldPlasma , " cg_oldPlasma " , " 1 " , CVAR_ARCHIVE } ,
{ & cg_trueLightning , " cg_trueLightning " , " 0.0 " , CVAR_ARCHIVE } ,
2002-05-21 14:59:12 +00:00
//Makro - avidemo with jpegs
2002-06-16 20:06:15 +00:00
{ & cg_RQ3_avidemo , " cg_RQ3_avidemo " , " 0 " , 0 } ,
2002-01-11 20:20:58 +00:00
// JBravo: added
2002-06-10 13:20:03 +00:00
//Slicer: no longer needed.
2002-06-16 20:06:15 +00:00
// { &cg_RQ3_lca, "cg_RQ3_lca", "0", CVAR_ROM},
//Slicer: apparently not being used
// { &cg_RQ3_team_round_going, "cg_RQ3_team_round_going", "0", CVAR_ROM},
{ & cg_RQ3_team1name , " g_RQ3_team1name " , " 0 " , 0 } ,
{ & cg_RQ3_team2name , " g_RQ3_team2name " , " 0 " , 0 } ,
2003-03-28 10:36:03 +00:00
{ & cg_RQ3_team1model , " g_RQ3_team1model " , " reactionmale/default " , 0 } ,
{ & cg_RQ3_team2model , " g_RQ3_team2model " , " reactionmale/robber " , 0 } ,
2002-06-16 20:06:15 +00:00
{ & ui_RQ3_teamCount1 , " ui_RQ3_teamCount1 " , " 0 " , CVAR_ROM } ,
{ & ui_RQ3_teamCount2 , " ui_RQ3_teamCount2 " , " 0 " , CVAR_ROM } ,
{ & ui_RQ3_numSpectators , " ui_RQ3_numSpectators " , " 0 " , CVAR_ROM } ,
{ & cg_gravity , " g_gravity " , " 800 " , 0 } ,
2002-02-04 00:11:12 +00:00
//Slicer: Team Status Cvars for MM
2002-06-16 20:06:15 +00:00
{ & cg_RQ3_matchmode , " g_RQ3_matchmode " , " 0 " , 0 } ,
2002-07-26 06:21:43 +00:00
// JBravo: more MM ingame cvars.
2003-02-16 21:39:10 +00:00
//Makro - removed timelimit/fraglimit cvars - they were causing problems on local servers
//{&cg_RQ3_timelimit, "cg_RQ#timelimit", "0", CVAR_ROM},
2002-07-26 06:21:43 +00:00
{ & cg_RQ3_roundlimit , " cg_RQ3_roundlimit " , " 0 " , CVAR_ROM } ,
{ & cg_RQ3_roundtimelimit , " cg_RQ3_roundtimelimit " , " 0 " , CVAR_ROM } ,
2003-02-16 21:39:10 +00:00
//{&cg_RQ3_fraglimit, "fraglimit", "0", CVAR_ROM},
2002-07-26 06:21:43 +00:00
{ & cg_RQ3_maxplayers , " cg_RQ3_maxplayers " , " 0 " , CVAR_ROM } ,
{ & cg_RQ3_forceteamtalk , " cg_RQ3_forceteamtalk " , " 0 " , CVAR_ROM } ,
{ & cg_RQ3_limchasecam , " cg_RQ3_limchasecam " , " 0 " , CVAR_ROM } ,
{ & cg_RQ3_tgren , " cg_RQ3_tgren " , " 0 " , CVAR_ROM } ,
{ & cg_RQ3_friendlyFire , " cg_RQ3_friendlyFire " , " 0 " , CVAR_ROM } ,
2002-07-26 22:28:38 +00:00
{ & cg_RQ3_version , " g_RQ3_version " , " 0 " , CVAR_ROM } ,
// JBravo: cvars for the about menu.
{ & cg_RQ3_hostname , " sv_hostname " , " 0 " , CVAR_ROM } ,
{ & cg_RQ3_needpass , " g_needpass " , " 0 " , CVAR_ROM } ,
{ & cg_RQ3_capturelimit , " capturelimit " , " 0 " , CVAR_ROM } ,
{ & cg_RQ3_dmflags , " dmflags " , " 0 " , CVAR_ROM } ,
{ & cg_RQ3_bot_minplayers , " bot_minplayers " , " 0 " , CVAR_ROM } ,
{ & cg_RQ3_showOwnKills , " g_RQ3_showOwnKills " , " 0 " , CVAR_ROM } ,
2002-08-25 00:47:00 +00:00
// q3f atmospheric stuff:
2003-03-09 21:30:39 +00:00
{ & cg_atmosphericEffects , " cg_atmosphericEffects " , " 1 " , CVAR_ARCHIVE } ,
{ & cg_lowEffects , " cg_lowEffects " , " 0 " , CVAR_ARCHIVE } ,
// JBravo: unlagged
{ & cg_delag , " cg_delag " , " 1 " , CVAR_ARCHIVE | CVAR_USERINFO } ,
{ & cg_debugDelag , " cg_debugDelag " , " 0 " , CVAR_USERINFO | CVAR_CHEAT } ,
{ & cg_drawBBox , " cg_drawBBox " , " 0 " , CVAR_CHEAT } ,
{ & cg_cmdTimeNudge , " cg_cmdTimeNudge " , " 0 " , CVAR_ARCHIVE | CVAR_USERINFO } ,
{ & sv_fps , " sv_fps " , " 20 " , 0 } ,
{ & cg_projectileNudge , " cg_projectileNudge " , " 0 " , CVAR_ARCHIVE } ,
{ & cg_optimizePrediction , " cg_optimizePrediction " , " 1 " , CVAR_ARCHIVE } ,
{ & cl_timeNudge , " cl_timeNudge " , " 0 " , CVAR_ARCHIVE } ,
{ & cg_latentSnaps , " cg_latentSnaps " , " 0 " , CVAR_USERINFO | CVAR_CHEAT } ,
{ & cg_latentCmds , " cg_latentCmds " , " 0 " , CVAR_USERINFO | CVAR_CHEAT } ,
{ & cg_plOut , " cg_plOut " , " 0 " , CVAR_USERINFO | CVAR_CHEAT } ,
2002-06-16 20:06:15 +00:00
2002-08-25 00:47:00 +00:00
//{ &cg_RQ3_RefID, "g_RQ3_RefID", "0", 0}
//{ &cg_pmove_fixed, "cg_pmove_fixed", "0", CVAR_USERINFO | CVAR_ARCHIVE }
2001-05-06 20:50:27 +00:00
} ;
2002-06-16 20:06:15 +00:00
static int cvarTableSize = sizeof ( cvarTable ) / sizeof ( cvarTable [ 0 ] ) ;
2001-05-06 20:50:27 +00:00
/*
= = = = = = = = = = = = = = = = =
CG_RegisterCvars
= = = = = = = = = = = = = = = = =
*/
2002-06-16 20:06:15 +00:00
void CG_RegisterCvars ( void )
{
int i ;
cvarTable_t * cv ;
char var [ MAX_TOKEN_CHARS ] ;
2003-03-29 15:04:03 +00:00
char * model ;
2002-06-16 20:06:15 +00:00
for ( i = 0 , cv = cvarTable ; i < cvarTableSize ; i + + , cv + + ) {
trap_Cvar_Register ( cv - > vmCvar , cv - > cvarName , cv - > defaultString , cv - > cvarFlags ) ;
2001-05-06 20:50:27 +00:00
}
// see if we are also running the server on this machine
2002-06-16 20:06:15 +00:00
trap_Cvar_VariableStringBuffer ( " sv_running " , var , sizeof ( var ) ) ;
cgs . localServer = atoi ( var ) ;
2001-05-06 20:50:27 +00:00
forceModelModificationCount = cg_forceModel . modificationCount ;
2002-06-16 20:06:15 +00:00
trap_Cvar_Register ( NULL , " model " , DEFAULT_MODEL , CVAR_USERINFO | CVAR_ARCHIVE ) ;
trap_Cvar_Register ( NULL , " headmodel " , DEFAULT_MODEL , CVAR_USERINFO | CVAR_ARCHIVE ) ;
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 ) ;
2003-03-28 10:36:03 +00:00
// JBravo: for defaults in weaponreplacements
2003-03-29 15:04:03 +00:00
model = modelFromStr ( cg_RQ3_mk23 . string ) ;
if ( ! strcmp ( model , " default " ) )
trap_Cvar_Set ( " cg_RQ3_mk23 " , " mk23/default " ) ;
model = modelFromStr ( cg_RQ3_knife . string ) ;
if ( ! strcmp ( model , " default " ) )
trap_Cvar_Set ( " cg_RQ3_knife " , " knife/default " ) ;
model = modelFromStr ( cg_RQ3_m4 . string ) ;
if ( ! strcmp ( model , " default " ) )
trap_Cvar_Set ( " cg_RQ3_m4 " , " m4/default " ) ;
model = modelFromStr ( cg_RQ3_ssg3000 . string ) ;
if ( ! strcmp ( model , " default " ) )
trap_Cvar_Set ( " cg_RQ3_ssg3000 " , " ssg3000/default " ) ;
model = modelFromStr ( cg_RQ3_mp5 . string ) ;
if ( ! strcmp ( model , " default " ) )
trap_Cvar_Set ( " cg_RQ3_mp5 " , " mp5/default " ) ;
model = modelFromStr ( cg_RQ3_handcannon . string ) ;
if ( ! strcmp ( model , " default " ) )
trap_Cvar_Set ( " cg_RQ3_handcannon " , " handcannon/default " ) ;
model = modelFromStr ( cg_RQ3_m3 . string ) ;
if ( ! strcmp ( model , " default " ) )
trap_Cvar_Set ( " cg_RQ3_m3 " , " m3/default " ) ;
model = modelFromStr ( cg_RQ3_akimbo . string ) ;
if ( ! strcmp ( model , " default " ) )
trap_Cvar_Set ( " cg_RQ3_akimbo " , " akimbo/default " ) ;
model = modelFromStr ( cg_RQ3_grenade . string ) ;
if ( ! strcmp ( model , " default " ) )
trap_Cvar_Set ( " cg_RQ3_grenade " , " grenade/default " ) ;
model = modelFromStr ( cg_RQ3_kevlar . string ) ;
if ( ! strcmp ( model , " default " ) )
trap_Cvar_Set ( " cg_RQ3_kevlar " , " kevlar/default " ) ;
model = modelFromStr ( cg_RQ3_silencer . string ) ;
if ( ! strcmp ( model , " default " ) )
trap_Cvar_Set ( " cg_RQ3_silencer " , " silencer/default " ) ;
model = modelFromStr ( cg_RQ3_laser . string ) ;
if ( ! strcmp ( model , " default " ) )
trap_Cvar_Set ( " cg_RQ3_laser " , " laser/default " ) ;
model = modelFromStr ( cg_RQ3_bandolier . string ) ;
if ( ! strcmp ( model , " default " ) )
trap_Cvar_Set ( " cg_RQ3_bandolier " , " bandolier/default " ) ;
model = modelFromStr ( cg_RQ3_slippers . string ) ;
if ( ! strcmp ( model , " default " ) )
trap_Cvar_Set ( " cg_RQ3_slippers " , " slippers/default " ) ;
model = modelFromStr ( cg_RQ3_helmet . string ) ;
if ( ! strcmp ( model , " default " ) )
trap_Cvar_Set ( " cg_RQ3_helmet " , " helmet/default " ) ;
model = modelFromStr ( cg_RQ3_ammo_mk23 . string ) ;
if ( ! strcmp ( model , " default " ) )
trap_Cvar_Set ( " cg_RQ3_ammo_mk23 " , " mk23/default " ) ;
model = modelFromStr ( cg_RQ3_ammo_shells . string ) ;
if ( ! strcmp ( model , " default " ) )
trap_Cvar_Set ( " cg_RQ3_ammo_shells " , " shells/default " ) ;
model = modelFromStr ( cg_RQ3_ammo_ssg3000 . string ) ;
if ( ! strcmp ( model , " default " ) )
trap_Cvar_Set ( " cg_RQ3_ammo_ssg3000 " , " ssg3000/default " ) ;
model = modelFromStr ( cg_RQ3_ammo_mp5 . string ) ;
if ( ! strcmp ( model , " default " ) )
trap_Cvar_Set ( " cg_RQ3_ammo_mp5 " , " mp5/default " ) ;
model = modelFromStr ( cg_RQ3_ammo_m4 . string ) ;
if ( ! strcmp ( model , " default " ) )
trap_Cvar_Set ( " cg_RQ3_ammo_m4 " , " m4/default " ) ;
2001-05-06 20:50:27 +00:00
}
2001-11-25 23:04:08 +00:00
/*
2001-05-06 20:50:27 +00:00
= = = = = = = = = = = = = = = = = = =
CG_ForceModelChange
= = = = = = = = = = = = = = = = = = =
*/
2002-06-16 20:06:15 +00:00
static void CG_ForceModelChange ( void )
{
int i ;
2001-05-06 20:50:27 +00:00
2002-06-16 20:06:15 +00:00
for ( i = 0 ; i < MAX_CLIENTS ; i + + ) {
const char * clientInfo ;
2001-05-06 20:50:27 +00:00
2002-06-16 20:06:15 +00:00
clientInfo = CG_ConfigString ( CS_PLAYERS + i ) ;
if ( ! clientInfo [ 0 ] ) {
2001-05-06 20:50:27 +00:00
continue ;
}
2002-06-16 20:06:15 +00:00
CG_NewClientInfo ( i ) ;
2001-05-06 20:50:27 +00:00
}
}
/*
= = = = = = = = = = = = = = = = =
CG_UpdateCvars
= = = = = = = = = = = = = = = = =
*/
2002-06-16 20:06:15 +00:00
void CG_UpdateCvars ( void )
{
int i ;
cvarTable_t * cv ;
2001-05-06 20:50:27 +00:00
2002-06-16 20:06:15 +00:00
for ( i = 0 , cv = cvarTable ; i < cvarTableSize ; i + + , cv + + ) {
2003-03-09 21:30:39 +00:00
// JBravo: unlagged
if ( cv - > vmCvar = = & cg_cmdTimeNudge ) {
CG_Cvar_ClampInt ( cv - > cvarName , cv - > vmCvar , 0 , 999 ) ;
} else if ( cv - > vmCvar = = & cl_timeNudge ) {
CG_Cvar_ClampInt ( cv - > cvarName , cv - > vmCvar , - 50 , 50 ) ;
} else if ( cv - > vmCvar = = & cg_latentSnaps ) {
CG_Cvar_ClampInt ( cv - > cvarName , cv - > vmCvar , 0 , 10 ) ;
} else if ( cv - > vmCvar = = & cg_latentCmds ) {
CG_Cvar_ClampInt ( cv - > cvarName , cv - > vmCvar , 0 , MAX_LATENT_CMDS - 1 ) ;
} else if ( cv - > vmCvar = = & cg_plOut ) {
CG_Cvar_ClampInt ( cv - > cvarName , cv - > vmCvar , 0 , 100 ) ;
}
2002-06-16 20:06:15 +00:00
trap_Cvar_Update ( cv - > vmCvar ) ;
2001-05-06 20:50:27 +00:00
}
// check for modications here
// If team overlay is on, ask for updates from the server. If its off,
// let the server know so we don't receive it
2002-06-16 20:06:15 +00:00
if ( drawTeamOverlayModificationCount ! = cg_drawTeamOverlay . modificationCount ) {
2001-05-06 20:50:27 +00:00
drawTeamOverlayModificationCount = cg_drawTeamOverlay . modificationCount ;
2002-06-16 20:06:15 +00:00
if ( cg_drawTeamOverlay . integer > 0 ) {
trap_Cvar_Set ( " teamoverlay " , " 1 " ) ;
2001-05-06 20:50:27 +00:00
} else {
2002-06-16 20:06:15 +00:00
trap_Cvar_Set ( " teamoverlay " , " 0 " ) ;
2001-05-06 20:50:27 +00:00
}
// FIXME E3 HACK
2002-06-16 20:06:15 +00:00
trap_Cvar_Set ( " teamoverlay " , " 1 " ) ;
2001-05-06 20:50:27 +00:00
}
// if force model changed
2002-06-16 20:06:15 +00:00
if ( forceModelModificationCount ! = cg_forceModel . modificationCount & & cgs . gametype < GT_TEAM ) {
2001-05-06 20:50:27 +00:00
forceModelModificationCount = cg_forceModel . modificationCount ;
CG_ForceModelChange ( ) ;
}
}
2002-06-16 20:06:15 +00:00
int CG_CrosshairPlayer ( void )
{
if ( cg . time > ( cg . crosshairClientTime + 1000 ) ) {
2001-05-06 20:50:27 +00:00
return - 1 ;
}
return cg . crosshairClientNum ;
}
2002-06-16 20:06:15 +00:00
int CG_LastAttacker ( void )
{
if ( ! cg . attackerTime ) {
2001-05-06 20:50:27 +00:00
return - 1 ;
}
return cg . snap - > ps . persistant [ PERS_ATTACKER ] ;
}
2002-06-16 20:06:15 +00:00
void QDECL CG_Printf ( const char * msg , . . . )
{
va_list argptr ;
char text [ 1024 ] ;
2001-05-06 20:50:27 +00:00
2002-06-16 20:06:15 +00:00
va_start ( argptr , msg ) ;
vsprintf ( text , msg , argptr ) ;
va_end ( argptr ) ;
2001-05-06 20:50:27 +00:00
2002-06-16 20:06:15 +00:00
trap_Print ( text ) ;
2001-05-06 20:50:27 +00:00
}
2002-06-16 20:06:15 +00:00
void QDECL CG_Error ( const char * msg , . . . )
{
va_list argptr ;
char text [ 1024 ] ;
2001-05-06 20:50:27 +00:00
2002-06-16 20:06:15 +00:00
va_start ( argptr , msg ) ;
vsprintf ( text , msg , argptr ) ;
va_end ( argptr ) ;
2001-05-06 20:50:27 +00:00
2002-06-16 20:06:15 +00:00
trap_Error ( text ) ;
2001-05-06 20:50:27 +00:00
}
# ifndef CGAME_HARD_LINKED
// this is only here so the functions in q_shared.c and bg_*.c can link (FIXME)
2002-06-16 20:06:15 +00:00
void QDECL Com_Error ( int level , const char * error , . . . )
{
va_list argptr ;
char text [ 1024 ] ;
2001-05-06 20:50:27 +00:00
2002-06-16 20:06:15 +00:00
va_start ( argptr , error ) ;
vsprintf ( text , error , argptr ) ;
va_end ( argptr ) ;
2001-05-06 20:50:27 +00:00
2002-06-16 20:06:15 +00:00
CG_Error ( " %s " , text ) ;
2001-05-06 20:50:27 +00:00
}
2002-06-16 20:06:15 +00:00
void QDECL Com_Printf ( const char * msg , . . . )
{
va_list argptr ;
char text [ 1024 ] ;
2001-05-06 20:50:27 +00:00
2002-06-16 20:06:15 +00:00
va_start ( argptr , msg ) ;
vsprintf ( text , msg , argptr ) ;
va_end ( argptr ) ;
2001-05-06 20:50:27 +00:00
2002-06-16 20:06:15 +00:00
CG_Printf ( " %s " , text ) ;
2001-05-06 20:50:27 +00:00
}
# endif
/*
= = = = = = = = = = = = = = = =
CG_Argv
= = = = = = = = = = = = = = = =
*/
2002-06-16 20:06:15 +00:00
const char * CG_Argv ( int arg )
{
static char buffer [ MAX_STRING_CHARS ] ;
2001-05-06 20:50:27 +00:00
2002-06-16 20:06:15 +00:00
trap_Argv ( arg , buffer , sizeof ( buffer ) ) ;
2001-05-06 20:50:27 +00:00
return buffer ;
}
//========================================================================
/*
= = = = = = = = = = = = = = = = =
CG_RegisterItemSounds
The server says this item is used on this level
= = = = = = = = = = = = = = = = =
*/
2002-06-16 20:06:15 +00:00
static void CG_RegisterItemSounds ( int itemNum )
{
gitem_t * item ;
char data [ MAX_QPATH ] ;
char * s , * start ;
int len ;
2001-05-06 20:50:27 +00:00
2002-06-16 20:06:15 +00:00
item = & bg_itemlist [ itemNum ] ;
2001-05-06 20:50:27 +00:00
2002-06-16 20:06:15 +00:00
if ( item - > pickup_sound ) {
trap_S_RegisterSound ( item - > pickup_sound , qfalse ) ;
2001-05-06 20:50:27 +00:00
}
// parse the space seperated precache string for other media
s = item - > sounds ;
if ( ! s | | ! s [ 0 ] )
return ;
while ( * s ) {
start = s ;
while ( * s & & * s ! = ' ' ) {
s + + ;
}
2002-06-16 20:06:15 +00:00
len = s - start ;
2001-05-06 20:50:27 +00:00
if ( len > = MAX_QPATH | | len < 5 ) {
2002-06-16 20:06:15 +00:00
CG_Error ( " PrecacheItem: %s has bad precache string " , item - > classname ) ;
2001-05-06 20:50:27 +00:00
return ;
}
2002-06-16 20:06:15 +00:00
memcpy ( data , start , len ) ;
2001-05-06 20:50:27 +00:00
data [ len ] = 0 ;
2002-06-16 20:06:15 +00:00
if ( * s ) {
2001-05-06 20:50:27 +00:00
s + + ;
}
2002-06-16 20:06:15 +00:00
if ( ! strcmp ( data + len - 3 , " wav " ) ) {
trap_S_RegisterSound ( data , qfalse ) ;
2001-05-06 20:50:27 +00:00
}
}
}
/*
= = = = = = = = = = = = = = = = =
CG_RegisterSounds
called during a precache command
= = = = = = = = = = = = = = = = =
*/
2002-06-16 20:06:15 +00:00
static void CG_RegisterSounds ( void )
{
int i ;
char items [ MAX_ITEMS + 1 ] ;
char name [ MAX_QPATH ] ;
const char * soundName ;
2001-05-06 20:50:27 +00:00
2002-06-09 05:16:58 +00:00
// NiceAss: Used for pressure entities. Not implemented yet.
// cgs.media.steamSound = trap_S_RegisterSound( "sound/steam.wav", qtrue );
2002-06-16 20:06:15 +00:00
cgs . media . oneMinuteSound = trap_S_RegisterSound ( " sound/feedback/1_minute.wav " , qtrue ) ;
cgs . media . fiveMinuteSound = trap_S_RegisterSound ( " sound/feedback/5_minute.wav " , qtrue ) ;
cgs . media . suddenDeathSound = trap_S_RegisterSound ( " sound/feedback/sudden_death.wav " , qtrue ) ;
cgs . media . oneFragSound = trap_S_RegisterSound ( " sound/feedback/1_frag.wav " , qtrue ) ;
cgs . media . twoFragSound = trap_S_RegisterSound ( " sound/feedback/2_frags.wav " , qtrue ) ;
cgs . media . threeFragSound = trap_S_RegisterSound ( " sound/feedback/3_frags.wav " , qtrue ) ;
cgs . media . count3Sound = trap_S_RegisterSound ( " sound/feedback/three.wav " , qtrue ) ;
cgs . media . count2Sound = trap_S_RegisterSound ( " sound/feedback/two.wav " , qtrue ) ;
cgs . media . count1Sound = trap_S_RegisterSound ( " sound/feedback/one.wav " , qtrue ) ;
cgs . media . countFightSound = trap_S_RegisterSound ( " sound/feedback/fight.wav " , qtrue ) ;
cgs . media . countPrepareSound = trap_S_RegisterSound ( " sound/feedback/prepare.wav " , qtrue ) ;
2002-07-07 18:36:13 +00:00
// JBravo: The insane sounds
cgs . media . insanesounds [ 0 ] = trap_S_RegisterSound ( " sound/insane/insane1.wav " , qtrue ) ;
cgs . media . insanesounds [ 1 ] = trap_S_RegisterSound ( " sound/insane/insane2.wav " , qtrue ) ;
cgs . media . insanesounds [ 2 ] = trap_S_RegisterSound ( " sound/insane/insane3.wav " , qtrue ) ;
cgs . media . insanesounds [ 3 ] = trap_S_RegisterSound ( " sound/insane/insane4.wav " , qtrue ) ;
cgs . media . insanesounds [ 4 ] = trap_S_RegisterSound ( " sound/insane/insane5.wav " , qtrue ) ;
cgs . media . insanesounds [ 5 ] = trap_S_RegisterSound ( " sound/insane/insane6.wav " , qtrue ) ;
cgs . media . insanesounds [ 6 ] = trap_S_RegisterSound ( " sound/insane/insane7.wav " , qtrue ) ;
cgs . media . insanesounds [ 7 ] = trap_S_RegisterSound ( " sound/insane/insane8.wav " , qtrue ) ;
cgs . media . insanesounds [ 8 ] = trap_S_RegisterSound ( " sound/insane/insane9.wav " , qtrue ) ;
2002-03-14 02:24:39 +00:00
if ( cgs . gametype > = GT_TEAM | | cg_buildScript . integer ) {
2002-01-11 20:20:58 +00:00
// JBravo: registering the LCA sounds.
2002-06-16 20:06:15 +00:00
cgs . media . lightsSound = trap_S_RegisterSound ( " sound/lca/lights.wav " , qtrue ) ;
cgs . media . cameraSound = trap_S_RegisterSound ( " sound/lca/camera.wav " , qtrue ) ;
cgs . media . actionSound = trap_S_RegisterSound ( " sound/lca/action.wav " , qtrue ) ;
cgs . media . lca10_0Sound = trap_S_RegisterSound ( " sound/lca/10_0.wav " , qtrue ) ;
2002-03-14 02:24:39 +00:00
// JBravo: and the radio sounds
2002-03-14 16:04:26 +00:00
//Slicer: optimization.
2002-06-16 20:06:15 +00:00
cgs . media . male_sounds [ 0 ] = trap_S_RegisterSound ( " sound/radio/male/1.wav " , qtrue ) ;
cgs . media . male_sounds [ 1 ] = trap_S_RegisterSound ( " sound/radio/male/2.wav " , qtrue ) ;
cgs . media . male_sounds [ 2 ] = trap_S_RegisterSound ( " sound/radio/male/3.wav " , qtrue ) ;
cgs . media . male_sounds [ 3 ] = trap_S_RegisterSound ( " sound/radio/male/4.wav " , qtrue ) ;
cgs . media . male_sounds [ 4 ] = trap_S_RegisterSound ( " sound/radio/male/5.wav " , qtrue ) ;
cgs . media . male_sounds [ 5 ] = trap_S_RegisterSound ( " sound/radio/male/6.wav " , qtrue ) ;
cgs . media . male_sounds [ 6 ] = trap_S_RegisterSound ( " sound/radio/male/7.wav " , qtrue ) ;
cgs . media . male_sounds [ 7 ] = trap_S_RegisterSound ( " sound/radio/male/8.wav " , qtrue ) ;
cgs . media . male_sounds [ 8 ] = trap_S_RegisterSound ( " sound/radio/male/9.wav " , qtrue ) ;
cgs . media . male_sounds [ 9 ] = trap_S_RegisterSound ( " sound/radio/male/10.wav " , qtrue ) ;
cgs . media . male_sounds [ 10 ] = trap_S_RegisterSound ( " sound/radio/male/back.wav " , qtrue ) ;
cgs . media . male_sounds [ 11 ] = trap_S_RegisterSound ( " sound/radio/male/cover.wav " , qtrue ) ;
cgs . media . male_sounds [ 12 ] = trap_S_RegisterSound ( " sound/radio/male/down.wav " , qtrue ) ;
cgs . media . male_sounds [ 13 ] = trap_S_RegisterSound ( " sound/radio/male/enemyd.wav " , qtrue ) ;
cgs . media . male_sounds [ 14 ] = trap_S_RegisterSound ( " sound/radio/male/enemys.wav " , qtrue ) ;
cgs . media . male_sounds [ 15 ] = trap_S_RegisterSound ( " sound/radio/male/forward.wav " , qtrue ) ;
cgs . media . male_sounds [ 16 ] = trap_S_RegisterSound ( " sound/radio/male/go.wav " , qtrue ) ;
cgs . media . male_sounds [ 17 ] = trap_S_RegisterSound ( " sound/radio/male/im_hit.wav " , qtrue ) ;
cgs . media . male_sounds [ 18 ] = trap_S_RegisterSound ( " sound/radio/male/left.wav " , qtrue ) ;
cgs . media . male_sounds [ 19 ] = trap_S_RegisterSound ( " sound/radio/male/reportin.wav " , qtrue ) ;
cgs . media . male_sounds [ 20 ] = trap_S_RegisterSound ( " sound/radio/male/right.wav " , qtrue ) ;
cgs . media . male_sounds [ 21 ] = trap_S_RegisterSound ( " sound/radio/male/taking_f.wav " , qtrue ) ;
cgs . media . male_sounds [ 22 ] = trap_S_RegisterSound ( " sound/radio/male/teamdown.wav " , qtrue ) ;
cgs . media . male_sounds [ 23 ] = trap_S_RegisterSound ( " sound/radio/male/treport.wav " , qtrue ) ;
cgs . media . male_sounds [ 24 ] = trap_S_RegisterSound ( " sound/radio/male/up.wav " , qtrue ) ;
cgs . media . male_sounds [ 25 ] = trap_S_RegisterSound ( " sound/radio/click.wav " , qtrue ) ;
2002-07-20 02:25:53 +00:00
cgs . media . male_sounds [ 26 ] = trap_S_RegisterSound ( " sound/radio/male/backup1.wav " , qtrue ) ;
cgs . media . male_sounds [ 27 ] = trap_S_RegisterSound ( " sound/radio/male/backup2.wav " , qtrue ) ;
cgs . media . male_sounds [ 28 ] = trap_S_RegisterSound ( " sound/radio/male/backup3.wav " , qtrue ) ;
cgs . media . male_sounds [ 29 ] = trap_S_RegisterSound ( " sound/radio/male/chit1.wav " , qtrue ) ;
cgs . media . male_sounds [ 30 ] = trap_S_RegisterSound ( " sound/radio/male/chit2.wav " , qtrue ) ;
cgs . media . male_sounds [ 31 ] = trap_S_RegisterSound ( " sound/radio/male/chit3.wav " , qtrue ) ;
cgs . media . male_sounds [ 32 ] = trap_S_RegisterSound ( " sound/radio/male/deliv1.wav " , qtrue ) ;
cgs . media . male_sounds [ 33 ] = trap_S_RegisterSound ( " sound/radio/male/deliv2.wav " , qtrue ) ;
cgs . media . male_sounds [ 34 ] = trap_S_RegisterSound ( " sound/radio/male/deliv3.wav " , qtrue ) ;
cgs . media . male_sounds [ 35 ] = trap_S_RegisterSound ( " sound/radio/male/ecdown1.wav " , qtrue ) ;
cgs . media . male_sounds [ 36 ] = trap_S_RegisterSound ( " sound/radio/male/ecdown2.wav " , qtrue ) ;
cgs . media . male_sounds [ 37 ] = trap_S_RegisterSound ( " sound/radio/male/ecdown3.wav " , qtrue ) ;
cgs . media . male_sounds [ 38 ] = trap_S_RegisterSound ( " sound/radio/male/enepak1.wav " , qtrue ) ;
cgs . media . male_sounds [ 39 ] = trap_S_RegisterSound ( " sound/radio/male/enepak2.wav " , qtrue ) ;
cgs . media . male_sounds [ 40 ] = trap_S_RegisterSound ( " sound/radio/male/enepak3.wav " , qtrue ) ;
cgs . media . male_sounds [ 41 ] = trap_S_RegisterSound ( " sound/radio/male/escort1.wav " , qtrue ) ;
cgs . media . male_sounds [ 42 ] = trap_S_RegisterSound ( " sound/radio/male/escort2.wav " , qtrue ) ;
cgs . media . male_sounds [ 43 ] = trap_S_RegisterSound ( " sound/radio/male/escort3.wav " , qtrue ) ;
cgs . media . male_sounds [ 44 ] = trap_S_RegisterSound ( " sound/radio/male/gotpak1.wav " , qtrue ) ;
cgs . media . male_sounds [ 45 ] = trap_S_RegisterSound ( " sound/radio/male/gotpak2.wav " , qtrue ) ;
cgs . media . male_sounds [ 46 ] = trap_S_RegisterSound ( " sound/radio/male/gotpak3.wav " , qtrue ) ;
cgs . media . male_sounds [ 47 ] = trap_S_RegisterSound ( " sound/radio/male/guard1.wav " , qtrue ) ;
cgs . media . male_sounds [ 48 ] = trap_S_RegisterSound ( " sound/radio/male/guard2.wav " , qtrue ) ;
cgs . media . male_sounds [ 49 ] = trap_S_RegisterSound ( " sound/radio/male/guard3.wav " , qtrue ) ;
cgs . media . male_sounds [ 50 ] = trap_S_RegisterSound ( " sound/radio/male/incoming1.wav " , qtrue ) ;
cgs . media . male_sounds [ 51 ] = trap_S_RegisterSound ( " sound/radio/male/incoming2.wav " , qtrue ) ;
cgs . media . male_sounds [ 52 ] = trap_S_RegisterSound ( " sound/radio/male/incoming3.wav " , qtrue ) ;
cgs . media . male_sounds [ 53 ] = trap_S_RegisterSound ( " sound/radio/male/plost1.wav " , qtrue ) ;
cgs . media . male_sounds [ 54 ] = trap_S_RegisterSound ( " sound/radio/male/plost2.wav " , qtrue ) ;
cgs . media . male_sounds [ 55 ] = trap_S_RegisterSound ( " sound/radio/male/plost3.wav " , qtrue ) ;
2002-06-30 17:33:01 +00:00
cgs . media . new_male_sounds [ 0 ] = trap_S_RegisterSound ( " sound/newradio/male/1.wav " , qtrue ) ;
cgs . media . new_male_sounds [ 1 ] = trap_S_RegisterSound ( " sound/newradio/male/2.wav " , qtrue ) ;
cgs . media . new_male_sounds [ 2 ] = trap_S_RegisterSound ( " sound/newradio/male/3.wav " , qtrue ) ;
cgs . media . new_male_sounds [ 3 ] = trap_S_RegisterSound ( " sound/newradio/male/4.wav " , qtrue ) ;
cgs . media . new_male_sounds [ 4 ] = trap_S_RegisterSound ( " sound/newradio/male/5.wav " , qtrue ) ;
cgs . media . new_male_sounds [ 5 ] = trap_S_RegisterSound ( " sound/newradio/male/6.wav " , qtrue ) ;
cgs . media . new_male_sounds [ 6 ] = trap_S_RegisterSound ( " sound/newradio/male/7.wav " , qtrue ) ;
cgs . media . new_male_sounds [ 7 ] = trap_S_RegisterSound ( " sound/newradio/male/8.wav " , qtrue ) ;
cgs . media . new_male_sounds [ 8 ] = trap_S_RegisterSound ( " sound/newradio/male/9.wav " , qtrue ) ;
cgs . media . new_male_sounds [ 9 ] = trap_S_RegisterSound ( " sound/newradio/male/10.wav " , qtrue ) ;
cgs . media . new_male_sounds [ 10 ] = trap_S_RegisterSound ( " sound/newradio/male/back.wav " , qtrue ) ;
cgs . media . new_male_sounds [ 11 ] = trap_S_RegisterSound ( " sound/newradio/male/cover.wav " , qtrue ) ;
cgs . media . new_male_sounds [ 12 ] = trap_S_RegisterSound ( " sound/newradio/male/down.wav " , qtrue ) ;
cgs . media . new_male_sounds [ 13 ] = trap_S_RegisterSound ( " sound/newradio/male/enemyd.wav " , qtrue ) ;
cgs . media . new_male_sounds [ 14 ] = trap_S_RegisterSound ( " sound/newradio/male/enemys.wav " , qtrue ) ;
cgs . media . new_male_sounds [ 15 ] = trap_S_RegisterSound ( " sound/newradio/male/forward.wav " , qtrue ) ;
cgs . media . new_male_sounds [ 16 ] = trap_S_RegisterSound ( " sound/newradio/male/go.wav " , qtrue ) ;
cgs . media . new_male_sounds [ 17 ] = trap_S_RegisterSound ( " sound/newradio/male/im_hit.wav " , qtrue ) ;
cgs . media . new_male_sounds [ 18 ] = trap_S_RegisterSound ( " sound/newradio/male/left.wav " , qtrue ) ;
cgs . media . new_male_sounds [ 19 ] = trap_S_RegisterSound ( " sound/newradio/male/reportin.wav " , qtrue ) ;
cgs . media . new_male_sounds [ 20 ] = trap_S_RegisterSound ( " sound/newradio/male/right.wav " , qtrue ) ;
cgs . media . new_male_sounds [ 21 ] = trap_S_RegisterSound ( " sound/newradio/male/taking_f.wav " , qtrue ) ;
cgs . media . new_male_sounds [ 22 ] = trap_S_RegisterSound ( " sound/newradio/male/teamdown.wav " , qtrue ) ;
cgs . media . new_male_sounds [ 23 ] = trap_S_RegisterSound ( " sound/newradio/male/treport.wav " , qtrue ) ;
cgs . media . new_male_sounds [ 24 ] = trap_S_RegisterSound ( " sound/newradio/male/up.wav " , qtrue ) ;
2002-07-19 04:40:56 +00:00
cgs . media . new_male_sounds [ 25 ] = trap_S_RegisterSound ( " sound/radio/click.wav " , qtrue ) ;
cgs . media . new_male_sounds [ 26 ] = trap_S_RegisterSound ( " sound/newradio/male/backup1.wav " , qtrue ) ;
cgs . media . new_male_sounds [ 27 ] = trap_S_RegisterSound ( " sound/newradio/male/backup2.wav " , qtrue ) ;
cgs . media . new_male_sounds [ 28 ] = trap_S_RegisterSound ( " sound/newradio/male/backup3.wav " , qtrue ) ;
cgs . media . new_male_sounds [ 29 ] = trap_S_RegisterSound ( " sound/newradio/male/chit1.wav " , qtrue ) ;
cgs . media . new_male_sounds [ 30 ] = trap_S_RegisterSound ( " sound/newradio/male/chit2.wav " , qtrue ) ;
cgs . media . new_male_sounds [ 31 ] = trap_S_RegisterSound ( " sound/newradio/male/chit3.wav " , qtrue ) ;
cgs . media . new_male_sounds [ 32 ] = trap_S_RegisterSound ( " sound/newradio/male/deliv1.wav " , qtrue ) ;
cgs . media . new_male_sounds [ 33 ] = trap_S_RegisterSound ( " sound/newradio/male/deliv2.wav " , qtrue ) ;
cgs . media . new_male_sounds [ 34 ] = trap_S_RegisterSound ( " sound/newradio/male/deliv3.wav " , qtrue ) ;
cgs . media . new_male_sounds [ 35 ] = trap_S_RegisterSound ( " sound/newradio/male/ecdown1.wav " , qtrue ) ;
cgs . media . new_male_sounds [ 36 ] = trap_S_RegisterSound ( " sound/newradio/male/ecdown2.wav " , qtrue ) ;
cgs . media . new_male_sounds [ 37 ] = trap_S_RegisterSound ( " sound/newradio/male/ecdown3.wav " , qtrue ) ;
cgs . media . new_male_sounds [ 38 ] = trap_S_RegisterSound ( " sound/newradio/male/enepak1.wav " , qtrue ) ;
cgs . media . new_male_sounds [ 39 ] = trap_S_RegisterSound ( " sound/newradio/male/enepak2.wav " , qtrue ) ;
cgs . media . new_male_sounds [ 40 ] = trap_S_RegisterSound ( " sound/newradio/male/enepak3.wav " , qtrue ) ;
cgs . media . new_male_sounds [ 41 ] = trap_S_RegisterSound ( " sound/newradio/male/escort1.wav " , qtrue ) ;
cgs . media . new_male_sounds [ 42 ] = trap_S_RegisterSound ( " sound/newradio/male/escort2.wav " , qtrue ) ;
cgs . media . new_male_sounds [ 43 ] = trap_S_RegisterSound ( " sound/newradio/male/escort3.wav " , qtrue ) ;
cgs . media . new_male_sounds [ 44 ] = trap_S_RegisterSound ( " sound/newradio/male/gotpak1.wav " , qtrue ) ;
cgs . media . new_male_sounds [ 45 ] = trap_S_RegisterSound ( " sound/newradio/male/gotpak2.wav " , qtrue ) ;
cgs . media . new_male_sounds [ 46 ] = trap_S_RegisterSound ( " sound/newradio/male/gotpak3.wav " , qtrue ) ;
cgs . media . new_male_sounds [ 47 ] = trap_S_RegisterSound ( " sound/newradio/male/guard1.wav " , qtrue ) ;
cgs . media . new_male_sounds [ 48 ] = trap_S_RegisterSound ( " sound/newradio/male/guard2.wav " , qtrue ) ;
cgs . media . new_male_sounds [ 49 ] = trap_S_RegisterSound ( " sound/newradio/male/guard3.wav " , qtrue ) ;
cgs . media . new_male_sounds [ 50 ] = trap_S_RegisterSound ( " sound/newradio/male/incoming1.wav " , qtrue ) ;
cgs . media . new_male_sounds [ 51 ] = trap_S_RegisterSound ( " sound/newradio/male/incoming2.wav " , qtrue ) ;
cgs . media . new_male_sounds [ 52 ] = trap_S_RegisterSound ( " sound/newradio/male/incoming3.wav " , qtrue ) ;
cgs . media . new_male_sounds [ 53 ] = trap_S_RegisterSound ( " sound/newradio/male/plost1.wav " , qtrue ) ;
cgs . media . new_male_sounds [ 54 ] = trap_S_RegisterSound ( " sound/newradio/male/plost2.wav " , qtrue ) ;
cgs . media . new_male_sounds [ 55 ] = trap_S_RegisterSound ( " sound/newradio/male/plost3.wav " , qtrue ) ;
cgs . media . pikey_male_sounds [ 0 ] = trap_S_RegisterSound ( " sound/newradio/pikey/1.wav " , qtrue ) ;
cgs . media . pikey_male_sounds [ 1 ] = trap_S_RegisterSound ( " sound/newradio/pikey/2.wav " , qtrue ) ;
cgs . media . pikey_male_sounds [ 2 ] = trap_S_RegisterSound ( " sound/newradio/pikey/3.wav " , qtrue ) ;
cgs . media . pikey_male_sounds [ 3 ] = trap_S_RegisterSound ( " sound/newradio/pikey/4.wav " , qtrue ) ;
cgs . media . pikey_male_sounds [ 4 ] = trap_S_RegisterSound ( " sound/newradio/pikey/5.wav " , qtrue ) ;
cgs . media . pikey_male_sounds [ 5 ] = trap_S_RegisterSound ( " sound/newradio/pikey/6.wav " , qtrue ) ;
cgs . media . pikey_male_sounds [ 6 ] = trap_S_RegisterSound ( " sound/newradio/pikey/7.wav " , qtrue ) ;
cgs . media . pikey_male_sounds [ 7 ] = trap_S_RegisterSound ( " sound/newradio/pikey/8.wav " , qtrue ) ;
cgs . media . pikey_male_sounds [ 8 ] = trap_S_RegisterSound ( " sound/newradio/pikey/9.wav " , qtrue ) ;
cgs . media . pikey_male_sounds [ 9 ] = trap_S_RegisterSound ( " sound/newradio/pikey/10.wav " , qtrue ) ;
cgs . media . pikey_male_sounds [ 10 ] = trap_S_RegisterSound ( " sound/newradio/pikey/back.wav " , qtrue ) ;
cgs . media . pikey_male_sounds [ 11 ] = trap_S_RegisterSound ( " sound/newradio/pikey/cover.wav " , qtrue ) ;
cgs . media . pikey_male_sounds [ 12 ] = trap_S_RegisterSound ( " sound/newradio/pikey/down.wav " , qtrue ) ;
cgs . media . pikey_male_sounds [ 13 ] = trap_S_RegisterSound ( " sound/newradio/pikey/enemyd.wav " , qtrue ) ;
cgs . media . pikey_male_sounds [ 14 ] = trap_S_RegisterSound ( " sound/newradio/pikey/enemys.wav " , qtrue ) ;
cgs . media . pikey_male_sounds [ 15 ] = trap_S_RegisterSound ( " sound/newradio/pikey/forward.wav " , qtrue ) ;
cgs . media . pikey_male_sounds [ 16 ] = trap_S_RegisterSound ( " sound/newradio/pikey/go.wav " , qtrue ) ;
cgs . media . pikey_male_sounds [ 17 ] = trap_S_RegisterSound ( " sound/newradio/pikey/im_hit.wav " , qtrue ) ;
cgs . media . pikey_male_sounds [ 18 ] = trap_S_RegisterSound ( " sound/newradio/pikey/left.wav " , qtrue ) ;
cgs . media . pikey_male_sounds [ 19 ] = trap_S_RegisterSound ( " sound/newradio/pikey/reportin.wav " , qtrue ) ;
cgs . media . pikey_male_sounds [ 20 ] = trap_S_RegisterSound ( " sound/newradio/pikey/right.wav " , qtrue ) ;
cgs . media . pikey_male_sounds [ 21 ] = trap_S_RegisterSound ( " sound/newradio/pikey/taking_f.wav " , qtrue ) ;
cgs . media . pikey_male_sounds [ 22 ] = trap_S_RegisterSound ( " sound/newradio/pikey/teamdown.wav " , qtrue ) ;
cgs . media . pikey_male_sounds [ 23 ] = trap_S_RegisterSound ( " sound/newradio/pikey/treport.wav " , qtrue ) ;
cgs . media . pikey_male_sounds [ 24 ] = trap_S_RegisterSound ( " sound/newradio/pikey/up.wav " , qtrue ) ;
cgs . media . pikey_male_sounds [ 25 ] = trap_S_RegisterSound ( " sound/radio/click.wav " , qtrue ) ;
cgs . media . pikey_male_sounds [ 26 ] = trap_S_RegisterSound ( " sound/newradio/pikey/backup1.wav " , qtrue ) ;
cgs . media . pikey_male_sounds [ 27 ] = trap_S_RegisterSound ( " sound/newradio/pikey/backup2.wav " , qtrue ) ;
cgs . media . pikey_male_sounds [ 28 ] = trap_S_RegisterSound ( " sound/newradio/pikey/backup3.wav " , qtrue ) ;
cgs . media . pikey_male_sounds [ 29 ] = trap_S_RegisterSound ( " sound/newradio/pikey/chit1.wav " , qtrue ) ;
cgs . media . pikey_male_sounds [ 30 ] = trap_S_RegisterSound ( " sound/newradio/pikey/chit2.wav " , qtrue ) ;
cgs . media . pikey_male_sounds [ 31 ] = trap_S_RegisterSound ( " sound/newradio/pikey/chit3.wav " , qtrue ) ;
cgs . media . pikey_male_sounds [ 32 ] = trap_S_RegisterSound ( " sound/newradio/pikey/deliv1.wav " , qtrue ) ;
cgs . media . pikey_male_sounds [ 33 ] = trap_S_RegisterSound ( " sound/newradio/pikey/deliv2.wav " , qtrue ) ;
cgs . media . pikey_male_sounds [ 34 ] = trap_S_RegisterSound ( " sound/newradio/pikey/deliv3.wav " , qtrue ) ;
cgs . media . pikey_male_sounds [ 35 ] = trap_S_RegisterSound ( " sound/newradio/pikey/ecdown1.wav " , qtrue ) ;
cgs . media . pikey_male_sounds [ 36 ] = trap_S_RegisterSound ( " sound/newradio/pikey/ecdown2.wav " , qtrue ) ;
cgs . media . pikey_male_sounds [ 37 ] = trap_S_RegisterSound ( " sound/newradio/pikey/ecdown3.wav " , qtrue ) ;
cgs . media . pikey_male_sounds [ 38 ] = trap_S_RegisterSound ( " sound/newradio/pikey/enepak1.wav " , qtrue ) ;
cgs . media . pikey_male_sounds [ 39 ] = trap_S_RegisterSound ( " sound/newradio/pikey/enepak2.wav " , qtrue ) ;
cgs . media . pikey_male_sounds [ 40 ] = trap_S_RegisterSound ( " sound/newradio/pikey/enepak3.wav " , qtrue ) ;
cgs . media . pikey_male_sounds [ 41 ] = trap_S_RegisterSound ( " sound/newradio/pikey/escort1.wav " , qtrue ) ;
cgs . media . pikey_male_sounds [ 42 ] = trap_S_RegisterSound ( " sound/newradio/pikey/escort2.wav " , qtrue ) ;
cgs . media . pikey_male_sounds [ 43 ] = trap_S_RegisterSound ( " sound/newradio/pikey/escort3.wav " , qtrue ) ;
cgs . media . pikey_male_sounds [ 44 ] = trap_S_RegisterSound ( " sound/newradio/pikey/gotpak1.wav " , qtrue ) ;
cgs . media . pikey_male_sounds [ 45 ] = trap_S_RegisterSound ( " sound/newradio/pikey/gotpak2.wav " , qtrue ) ;
cgs . media . pikey_male_sounds [ 46 ] = trap_S_RegisterSound ( " sound/newradio/pikey/gotpak3.wav " , qtrue ) ;
cgs . media . pikey_male_sounds [ 47 ] = trap_S_RegisterSound ( " sound/newradio/pikey/guard1.wav " , qtrue ) ;
cgs . media . pikey_male_sounds [ 48 ] = trap_S_RegisterSound ( " sound/newradio/pikey/guard2.wav " , qtrue ) ;
cgs . media . pikey_male_sounds [ 49 ] = trap_S_RegisterSound ( " sound/newradio/pikey/guard3.wav " , qtrue ) ;
cgs . media . pikey_male_sounds [ 50 ] = trap_S_RegisterSound ( " sound/newradio/pikey/incoming1.wav " , qtrue ) ;
cgs . media . pikey_male_sounds [ 51 ] = trap_S_RegisterSound ( " sound/newradio/pikey/incoming2.wav " , qtrue ) ;
cgs . media . pikey_male_sounds [ 52 ] = trap_S_RegisterSound ( " sound/newradio/pikey/incoming3.wav " , qtrue ) ;
cgs . media . pikey_male_sounds [ 53 ] = trap_S_RegisterSound ( " sound/newradio/pikey/plost1.wav " , qtrue ) ;
cgs . media . pikey_male_sounds [ 54 ] = trap_S_RegisterSound ( " sound/newradio/pikey/plost2.wav " , qtrue ) ;
cgs . media . pikey_male_sounds [ 55 ] = trap_S_RegisterSound ( " sound/newradio/pikey/plost3.wav " , qtrue ) ;
cgs . media . pirate_male_sounds [ 0 ] = trap_S_RegisterSound ( " sound/newradio/pirate/1.wav " , qtrue ) ;
cgs . media . pirate_male_sounds [ 1 ] = trap_S_RegisterSound ( " sound/newradio/pirate/2.wav " , qtrue ) ;
cgs . media . pirate_male_sounds [ 2 ] = trap_S_RegisterSound ( " sound/newradio/pirate/3.wav " , qtrue ) ;
cgs . media . pirate_male_sounds [ 3 ] = trap_S_RegisterSound ( " sound/newradio/pirate/4.wav " , qtrue ) ;
cgs . media . pirate_male_sounds [ 4 ] = trap_S_RegisterSound ( " sound/newradio/pirate/5.wav " , qtrue ) ;
cgs . media . pirate_male_sounds [ 5 ] = trap_S_RegisterSound ( " sound/newradio/pirate/6.wav " , qtrue ) ;
cgs . media . pirate_male_sounds [ 6 ] = trap_S_RegisterSound ( " sound/newradio/pirate/7.wav " , qtrue ) ;
cgs . media . pirate_male_sounds [ 7 ] = trap_S_RegisterSound ( " sound/newradio/pirate/8.wav " , qtrue ) ;
cgs . media . pirate_male_sounds [ 8 ] = trap_S_RegisterSound ( " sound/newradio/pirate/9.wav " , qtrue ) ;
cgs . media . pirate_male_sounds [ 9 ] = trap_S_RegisterSound ( " sound/newradio/pirate/10.wav " , qtrue ) ;
cgs . media . pirate_male_sounds [ 10 ] = trap_S_RegisterSound ( " sound/newradio/pirate/back.wav " , qtrue ) ;
cgs . media . pirate_male_sounds [ 11 ] = trap_S_RegisterSound ( " sound/newradio/pirate/cover.wav " , qtrue ) ;
cgs . media . pirate_male_sounds [ 12 ] = trap_S_RegisterSound ( " sound/newradio/pirate/down.wav " , qtrue ) ;
cgs . media . pirate_male_sounds [ 13 ] = trap_S_RegisterSound ( " sound/newradio/pirate/enemyd.wav " , qtrue ) ;
cgs . media . pirate_male_sounds [ 14 ] = trap_S_RegisterSound ( " sound/newradio/pirate/enemys.wav " , qtrue ) ;
cgs . media . pirate_male_sounds [ 15 ] = trap_S_RegisterSound ( " sound/newradio/pirate/forward.wav " , qtrue ) ;
cgs . media . pirate_male_sounds [ 16 ] = trap_S_RegisterSound ( " sound/newradio/pirate/go.wav " , qtrue ) ;
cgs . media . pirate_male_sounds [ 17 ] = trap_S_RegisterSound ( " sound/newradio/pirate/im_hit.wav " , qtrue ) ;
cgs . media . pirate_male_sounds [ 18 ] = trap_S_RegisterSound ( " sound/newradio/pirate/left.wav " , qtrue ) ;
cgs . media . pirate_male_sounds [ 19 ] = trap_S_RegisterSound ( " sound/newradio/pirate/reportin.wav " , qtrue ) ;
cgs . media . pirate_male_sounds [ 20 ] = trap_S_RegisterSound ( " sound/newradio/pirate/right.wav " , qtrue ) ;
cgs . media . pirate_male_sounds [ 21 ] = trap_S_RegisterSound ( " sound/newradio/pirate/taking_f.wav " , qtrue ) ;
cgs . media . pirate_male_sounds [ 22 ] = trap_S_RegisterSound ( " sound/newradio/pirate/teamdown.wav " , qtrue ) ;
cgs . media . pirate_male_sounds [ 23 ] = trap_S_RegisterSound ( " sound/newradio/pirate/treport.wav " , qtrue ) ;
cgs . media . pirate_male_sounds [ 24 ] = trap_S_RegisterSound ( " sound/newradio/pirate/up.wav " , qtrue ) ;
cgs . media . pirate_male_sounds [ 25 ] = trap_S_RegisterSound ( " sound/radio/click.wav " , qtrue ) ;
cgs . media . pirate_male_sounds [ 26 ] = trap_S_RegisterSound ( " sound/newradio/pirate/backup1.wav " , qtrue ) ;
cgs . media . pirate_male_sounds [ 27 ] = trap_S_RegisterSound ( " sound/newradio/pirate/backup2.wav " , qtrue ) ;
cgs . media . pirate_male_sounds [ 28 ] = trap_S_RegisterSound ( " sound/newradio/pirate/backup3.wav " , qtrue ) ;
cgs . media . pirate_male_sounds [ 29 ] = trap_S_RegisterSound ( " sound/newradio/pirate/chit1.wav " , qtrue ) ;
cgs . media . pirate_male_sounds [ 30 ] = trap_S_RegisterSound ( " sound/newradio/pirate/chit2.wav " , qtrue ) ;
cgs . media . pirate_male_sounds [ 31 ] = trap_S_RegisterSound ( " sound/newradio/pirate/chit3.wav " , qtrue ) ;
cgs . media . pirate_male_sounds [ 32 ] = trap_S_RegisterSound ( " sound/newradio/pirate/deliv1.wav " , qtrue ) ;
cgs . media . pirate_male_sounds [ 33 ] = trap_S_RegisterSound ( " sound/newradio/pirate/deliv2.wav " , qtrue ) ;
cgs . media . pirate_male_sounds [ 34 ] = trap_S_RegisterSound ( " sound/newradio/pirate/deliv3.wav " , qtrue ) ;
cgs . media . pirate_male_sounds [ 35 ] = trap_S_RegisterSound ( " sound/newradio/pirate/ecdown1.wav " , qtrue ) ;
cgs . media . pirate_male_sounds [ 36 ] = trap_S_RegisterSound ( " sound/newradio/pirate/ecdown2.wav " , qtrue ) ;
cgs . media . pirate_male_sounds [ 37 ] = trap_S_RegisterSound ( " sound/newradio/pirate/ecdown3.wav " , qtrue ) ;
cgs . media . pirate_male_sounds [ 38 ] = trap_S_RegisterSound ( " sound/newradio/pirate/enepak1.wav " , qtrue ) ;
cgs . media . pirate_male_sounds [ 39 ] = trap_S_RegisterSound ( " sound/newradio/pirate/enepak2.wav " , qtrue ) ;
cgs . media . pirate_male_sounds [ 40 ] = trap_S_RegisterSound ( " sound/newradio/pirate/enepak3.wav " , qtrue ) ;
cgs . media . pirate_male_sounds [ 41 ] = trap_S_RegisterSound ( " sound/newradio/pirate/escort1.wav " , qtrue ) ;
cgs . media . pirate_male_sounds [ 42 ] = trap_S_RegisterSound ( " sound/newradio/pirate/escort2.wav " , qtrue ) ;
cgs . media . pirate_male_sounds [ 43 ] = trap_S_RegisterSound ( " sound/newradio/pirate/escort3.wav " , qtrue ) ;
cgs . media . pirate_male_sounds [ 44 ] = trap_S_RegisterSound ( " sound/newradio/pirate/gotpak1.wav " , qtrue ) ;
cgs . media . pirate_male_sounds [ 45 ] = trap_S_RegisterSound ( " sound/newradio/pirate/gotpak2.wav " , qtrue ) ;
cgs . media . pirate_male_sounds [ 46 ] = trap_S_RegisterSound ( " sound/newradio/pirate/gotpak3.wav " , qtrue ) ;
cgs . media . pirate_male_sounds [ 47 ] = trap_S_RegisterSound ( " sound/newradio/pirate/guard1.wav " , qtrue ) ;
cgs . media . pirate_male_sounds [ 48 ] = trap_S_RegisterSound ( " sound/newradio/pirate/guard2.wav " , qtrue ) ;
cgs . media . pirate_male_sounds [ 49 ] = trap_S_RegisterSound ( " sound/newradio/pirate/guard3.wav " , qtrue ) ;
cgs . media . pirate_male_sounds [ 50 ] = trap_S_RegisterSound ( " sound/newradio/pirate/incoming1.wav " , qtrue ) ;
cgs . media . pirate_male_sounds [ 51 ] = trap_S_RegisterSound ( " sound/newradio/pirate/incoming2.wav " , qtrue ) ;
cgs . media . pirate_male_sounds [ 52 ] = trap_S_RegisterSound ( " sound/newradio/pirate/incoming3.wav " , qtrue ) ;
cgs . media . pirate_male_sounds [ 53 ] = trap_S_RegisterSound ( " sound/newradio/pirate/plost1.wav " , qtrue ) ;
cgs . media . pirate_male_sounds [ 54 ] = trap_S_RegisterSound ( " sound/newradio/pirate/plost2.wav " , qtrue ) ;
cgs . media . pirate_male_sounds [ 55 ] = trap_S_RegisterSound ( " sound/newradio/pirate/plost3.wav " , qtrue ) ;
2002-08-29 10:26:46 +00:00
cgs . media . keanu_male_sounds [ 0 ] = trap_S_RegisterSound ( " sound/newradio/keanu/1.wav " , qtrue ) ;
cgs . media . keanu_male_sounds [ 1 ] = trap_S_RegisterSound ( " sound/newradio/keanu/2.wav " , qtrue ) ;
cgs . media . keanu_male_sounds [ 2 ] = trap_S_RegisterSound ( " sound/newradio/keanu/3.wav " , qtrue ) ;
cgs . media . keanu_male_sounds [ 3 ] = trap_S_RegisterSound ( " sound/newradio/keanu/4.wav " , qtrue ) ;
cgs . media . keanu_male_sounds [ 4 ] = trap_S_RegisterSound ( " sound/newradio/keanu/5.wav " , qtrue ) ;
cgs . media . keanu_male_sounds [ 5 ] = trap_S_RegisterSound ( " sound/newradio/keanu/6.wav " , qtrue ) ;
cgs . media . keanu_male_sounds [ 6 ] = trap_S_RegisterSound ( " sound/newradio/keanu/7.wav " , qtrue ) ;
cgs . media . keanu_male_sounds [ 7 ] = trap_S_RegisterSound ( " sound/newradio/keanu/8.wav " , qtrue ) ;
cgs . media . keanu_male_sounds [ 8 ] = trap_S_RegisterSound ( " sound/newradio/keanu/9.wav " , qtrue ) ;
cgs . media . keanu_male_sounds [ 9 ] = trap_S_RegisterSound ( " sound/newradio/keanu/10.wav " , qtrue ) ;
cgs . media . keanu_male_sounds [ 10 ] = trap_S_RegisterSound ( " sound/newradio/keanu/back.wav " , qtrue ) ;
cgs . media . keanu_male_sounds [ 11 ] = trap_S_RegisterSound ( " sound/newradio/keanu/cover.wav " , qtrue ) ;
cgs . media . keanu_male_sounds [ 12 ] = trap_S_RegisterSound ( " sound/newradio/keanu/down.wav " , qtrue ) ;
cgs . media . keanu_male_sounds [ 13 ] = trap_S_RegisterSound ( " sound/newradio/keanu/enemyd.wav " , qtrue ) ;
cgs . media . keanu_male_sounds [ 14 ] = trap_S_RegisterSound ( " sound/newradio/keanu/enemys.wav " , qtrue ) ;
cgs . media . keanu_male_sounds [ 15 ] = trap_S_RegisterSound ( " sound/newradio/keanu/forward.wav " , qtrue ) ;
cgs . media . keanu_male_sounds [ 16 ] = trap_S_RegisterSound ( " sound/newradio/keanu/go.wav " , qtrue ) ;
cgs . media . keanu_male_sounds [ 17 ] = trap_S_RegisterSound ( " sound/newradio/keanu/im_hit.wav " , qtrue ) ;
cgs . media . keanu_male_sounds [ 18 ] = trap_S_RegisterSound ( " sound/newradio/keanu/left.wav " , qtrue ) ;
cgs . media . keanu_male_sounds [ 19 ] = trap_S_RegisterSound ( " sound/newradio/keanu/reportin.wav " , qtrue ) ;
cgs . media . keanu_male_sounds [ 20 ] = trap_S_RegisterSound ( " sound/newradio/keanu/right.wav " , qtrue ) ;
cgs . media . keanu_male_sounds [ 21 ] = trap_S_RegisterSound ( " sound/newradio/keanu/taking_f.wav " , qtrue ) ;
cgs . media . keanu_male_sounds [ 22 ] = trap_S_RegisterSound ( " sound/newradio/keanu/teamdown.wav " , qtrue ) ;
cgs . media . keanu_male_sounds [ 23 ] = trap_S_RegisterSound ( " sound/newradio/keanu/treport.wav " , qtrue ) ;
cgs . media . keanu_male_sounds [ 24 ] = trap_S_RegisterSound ( " sound/newradio/keanu/up.wav " , qtrue ) ;
cgs . media . keanu_male_sounds [ 25 ] = trap_S_RegisterSound ( " sound/radio/click.wav " , qtrue ) ;
cgs . media . keanu_male_sounds [ 26 ] = trap_S_RegisterSound ( " sound/newradio/keanu/backup1.wav " , qtrue ) ;
cgs . media . keanu_male_sounds [ 27 ] = trap_S_RegisterSound ( " sound/newradio/keanu/backup2.wav " , qtrue ) ;
cgs . media . keanu_male_sounds [ 28 ] = trap_S_RegisterSound ( " sound/newradio/keanu/backup3.wav " , qtrue ) ;
cgs . media . keanu_male_sounds [ 29 ] = trap_S_RegisterSound ( " sound/newradio/keanu/chit1.wav " , qtrue ) ;
cgs . media . keanu_male_sounds [ 30 ] = trap_S_RegisterSound ( " sound/newradio/keanu/chit2.wav " , qtrue ) ;
cgs . media . keanu_male_sounds [ 31 ] = trap_S_RegisterSound ( " sound/newradio/keanu/chit3.wav " , qtrue ) ;
cgs . media . keanu_male_sounds [ 32 ] = trap_S_RegisterSound ( " sound/newradio/keanu/deliv1.wav " , qtrue ) ;
cgs . media . keanu_male_sounds [ 33 ] = trap_S_RegisterSound ( " sound/newradio/keanu/deliv2.wav " , qtrue ) ;
cgs . media . keanu_male_sounds [ 34 ] = trap_S_RegisterSound ( " sound/newradio/keanu/deliv3.wav " , qtrue ) ;
cgs . media . keanu_male_sounds [ 35 ] = trap_S_RegisterSound ( " sound/newradio/keanu/ecdown1.wav " , qtrue ) ;
cgs . media . keanu_male_sounds [ 36 ] = trap_S_RegisterSound ( " sound/newradio/keanu/ecdown2.wav " , qtrue ) ;
cgs . media . keanu_male_sounds [ 37 ] = trap_S_RegisterSound ( " sound/newradio/keanu/ecdown3.wav " , qtrue ) ;
cgs . media . keanu_male_sounds [ 38 ] = trap_S_RegisterSound ( " sound/newradio/keanu/enepak1.wav " , qtrue ) ;
cgs . media . keanu_male_sounds [ 39 ] = trap_S_RegisterSound ( " sound/newradio/keanu/enepak2.wav " , qtrue ) ;
cgs . media . keanu_male_sounds [ 40 ] = trap_S_RegisterSound ( " sound/newradio/keanu/enepak3.wav " , qtrue ) ;
cgs . media . keanu_male_sounds [ 41 ] = trap_S_RegisterSound ( " sound/newradio/keanu/escort1.wav " , qtrue ) ;
cgs . media . keanu_male_sounds [ 42 ] = trap_S_RegisterSound ( " sound/newradio/keanu/escort2.wav " , qtrue ) ;
cgs . media . keanu_male_sounds [ 43 ] = trap_S_RegisterSound ( " sound/newradio/keanu/escort3.wav " , qtrue ) ;
cgs . media . keanu_male_sounds [ 44 ] = trap_S_RegisterSound ( " sound/newradio/keanu/gotpak1.wav " , qtrue ) ;
cgs . media . keanu_male_sounds [ 45 ] = trap_S_RegisterSound ( " sound/newradio/keanu/gotpak2.wav " , qtrue ) ;
cgs . media . keanu_male_sounds [ 46 ] = trap_S_RegisterSound ( " sound/newradio/keanu/gotpak3.wav " , qtrue ) ;
cgs . media . keanu_male_sounds [ 47 ] = trap_S_RegisterSound ( " sound/newradio/keanu/guard1.wav " , qtrue ) ;
cgs . media . keanu_male_sounds [ 48 ] = trap_S_RegisterSound ( " sound/newradio/keanu/guard2.wav " , qtrue ) ;
cgs . media . keanu_male_sounds [ 49 ] = trap_S_RegisterSound ( " sound/newradio/keanu/guard3.wav " , qtrue ) ;
cgs . media . keanu_male_sounds [ 50 ] = trap_S_RegisterSound ( " sound/newradio/keanu/incoming1.wav " , qtrue ) ;
cgs . media . keanu_male_sounds [ 51 ] = trap_S_RegisterSound ( " sound/newradio/keanu/incoming2.wav " , qtrue ) ;
cgs . media . keanu_male_sounds [ 52 ] = trap_S_RegisterSound ( " sound/newradio/keanu/incoming3.wav " , qtrue ) ;
cgs . media . keanu_male_sounds [ 53 ] = trap_S_RegisterSound ( " sound/newradio/keanu/plost1.wav " , qtrue ) ;
cgs . media . keanu_male_sounds [ 54 ] = trap_S_RegisterSound ( " sound/newradio/keanu/plost2.wav " , qtrue ) ;
cgs . media . keanu_male_sounds [ 55 ] = trap_S_RegisterSound ( " sound/newradio/keanu/plost3.wav " , qtrue ) ;
2002-06-16 20:06:15 +00:00
cgs . media . female_sounds [ 0 ] = trap_S_RegisterSound ( " sound/radio/female/1.wav " , qtrue ) ;
cgs . media . female_sounds [ 1 ] = trap_S_RegisterSound ( " sound/radio/female/2.wav " , qtrue ) ;
cgs . media . female_sounds [ 2 ] = trap_S_RegisterSound ( " sound/radio/female/3.wav " , qtrue ) ;
cgs . media . female_sounds [ 3 ] = trap_S_RegisterSound ( " sound/radio/female/4.wav " , qtrue ) ;
cgs . media . female_sounds [ 4 ] = trap_S_RegisterSound ( " sound/radio/female/5.wav " , qtrue ) ;
cgs . media . female_sounds [ 5 ] = trap_S_RegisterSound ( " sound/radio/female/6.wav " , qtrue ) ;
cgs . media . female_sounds [ 6 ] = trap_S_RegisterSound ( " sound/radio/female/7.wav " , qtrue ) ;
cgs . media . female_sounds [ 7 ] = trap_S_RegisterSound ( " sound/radio/female/8.wav " , qtrue ) ;
cgs . media . female_sounds [ 8 ] = trap_S_RegisterSound ( " sound/radio/female/9.wav " , qtrue ) ;
cgs . media . female_sounds [ 9 ] = trap_S_RegisterSound ( " sound/radio/female/10.wav " , qtrue ) ;
cgs . media . female_sounds [ 10 ] = trap_S_RegisterSound ( " sound/radio/female/back.wav " , qtrue ) ;
cgs . media . female_sounds [ 11 ] = trap_S_RegisterSound ( " sound/radio/female/cover.wav " , qtrue ) ;
cgs . media . female_sounds [ 12 ] = trap_S_RegisterSound ( " sound/radio/female/down.wav " , qtrue ) ;
cgs . media . female_sounds [ 13 ] = trap_S_RegisterSound ( " sound/radio/female/enemyd.wav " , qtrue ) ;
cgs . media . female_sounds [ 14 ] = trap_S_RegisterSound ( " sound/radio/female/enemys.wav " , qtrue ) ;
cgs . media . female_sounds [ 15 ] = trap_S_RegisterSound ( " sound/radio/female/forward.wav " , qtrue ) ;
cgs . media . female_sounds [ 16 ] = trap_S_RegisterSound ( " sound/radio/female/go.wav " , qtrue ) ;
cgs . media . female_sounds [ 17 ] = trap_S_RegisterSound ( " sound/radio/female/im_hit.wav " , qtrue ) ;
cgs . media . female_sounds [ 18 ] = trap_S_RegisterSound ( " sound/radio/female/left.wav " , qtrue ) ;
cgs . media . female_sounds [ 19 ] = trap_S_RegisterSound ( " sound/radio/female/reportin.wav " , qtrue ) ;
cgs . media . female_sounds [ 20 ] = trap_S_RegisterSound ( " sound/radio/female/right.wav " , qtrue ) ;
cgs . media . female_sounds [ 21 ] = trap_S_RegisterSound ( " sound/radio/female/taking_f.wav " , qtrue ) ;
cgs . media . female_sounds [ 22 ] = trap_S_RegisterSound ( " sound/radio/female/teamdown.wav " , qtrue ) ;
cgs . media . female_sounds [ 23 ] = trap_S_RegisterSound ( " sound/radio/female/treport.wav " , qtrue ) ;
cgs . media . female_sounds [ 24 ] = trap_S_RegisterSound ( " sound/radio/female/up.wav " , qtrue ) ;
cgs . media . female_sounds [ 25 ] = trap_S_RegisterSound ( " sound/radio/click.wav " , qtrue ) ;
2002-07-20 02:25:53 +00:00
cgs . media . female_sounds [ 26 ] = trap_S_RegisterSound ( " sound/radio/female/backup1.wav " , qtrue ) ;
cgs . media . female_sounds [ 27 ] = trap_S_RegisterSound ( " sound/radio/female/backup2.wav " , qtrue ) ;
cgs . media . female_sounds [ 28 ] = trap_S_RegisterSound ( " sound/radio/female/backup3.wav " , qtrue ) ;
cgs . media . female_sounds [ 29 ] = trap_S_RegisterSound ( " sound/radio/female/chit1.wav " , qtrue ) ;
cgs . media . female_sounds [ 30 ] = trap_S_RegisterSound ( " sound/radio/female/chit2.wav " , qtrue ) ;
cgs . media . female_sounds [ 31 ] = trap_S_RegisterSound ( " sound/radio/female/chit3.wav " , qtrue ) ;
cgs . media . female_sounds [ 32 ] = trap_S_RegisterSound ( " sound/radio/female/deliv1.wav " , qtrue ) ;
cgs . media . female_sounds [ 33 ] = trap_S_RegisterSound ( " sound/radio/female/deliv2.wav " , qtrue ) ;
cgs . media . female_sounds [ 34 ] = trap_S_RegisterSound ( " sound/radio/female/deliv3.wav " , qtrue ) ;
cgs . media . female_sounds [ 35 ] = trap_S_RegisterSound ( " sound/radio/female/ecdown1.wav " , qtrue ) ;
cgs . media . female_sounds [ 36 ] = trap_S_RegisterSound ( " sound/radio/female/ecdown2.wav " , qtrue ) ;
cgs . media . female_sounds [ 37 ] = trap_S_RegisterSound ( " sound/radio/female/ecdown3.wav " , qtrue ) ;
cgs . media . female_sounds [ 38 ] = trap_S_RegisterSound ( " sound/radio/female/enepak1.wav " , qtrue ) ;
cgs . media . female_sounds [ 39 ] = trap_S_RegisterSound ( " sound/radio/female/enepak2.wav " , qtrue ) ;
cgs . media . female_sounds [ 40 ] = trap_S_RegisterSound ( " sound/radio/female/enepak3.wav " , qtrue ) ;
cgs . media . female_sounds [ 41 ] = trap_S_RegisterSound ( " sound/radio/female/escort1.wav " , qtrue ) ;
cgs . media . female_sounds [ 42 ] = trap_S_RegisterSound ( " sound/radio/female/escort2.wav " , qtrue ) ;
cgs . media . female_sounds [ 43 ] = trap_S_RegisterSound ( " sound/radio/female/escort3.wav " , qtrue ) ;
cgs . media . female_sounds [ 44 ] = trap_S_RegisterSound ( " sound/radio/female/gotpak1.wav " , qtrue ) ;
cgs . media . female_sounds [ 45 ] = trap_S_RegisterSound ( " sound/radio/female/gotpak2.wav " , qtrue ) ;
cgs . media . female_sounds [ 46 ] = trap_S_RegisterSound ( " sound/radio/female/gotpak3.wav " , qtrue ) ;
cgs . media . female_sounds [ 47 ] = trap_S_RegisterSound ( " sound/radio/female/guard1.wav " , qtrue ) ;
cgs . media . female_sounds [ 48 ] = trap_S_RegisterSound ( " sound/radio/female/guard2.wav " , qtrue ) ;
cgs . media . female_sounds [ 49 ] = trap_S_RegisterSound ( " sound/radio/female/guard3.wav " , qtrue ) ;
cgs . media . female_sounds [ 50 ] = trap_S_RegisterSound ( " sound/radio/female/incoming1.wav " , qtrue ) ;
cgs . media . female_sounds [ 51 ] = trap_S_RegisterSound ( " sound/radio/female/incoming2.wav " , qtrue ) ;
cgs . media . female_sounds [ 52 ] = trap_S_RegisterSound ( " sound/radio/female/incoming3.wav " , qtrue ) ;
cgs . media . female_sounds [ 53 ] = trap_S_RegisterSound ( " sound/radio/female/plost1.wav " , qtrue ) ;
cgs . media . female_sounds [ 54 ] = trap_S_RegisterSound ( " sound/radio/female/plost2.wav " , qtrue ) ;
cgs . media . female_sounds [ 55 ] = trap_S_RegisterSound ( " sound/radio/female/plost3.wav " , qtrue ) ;
2002-06-16 20:06:15 +00:00
cgs . media . captureAwardSound = trap_S_RegisterSound ( " sound/teamplay/flagcapture_yourteam.wav " , qtrue ) ;
cgs . media . redLeadsSound = trap_S_RegisterSound ( " sound/feedback/redleads.wav " , qtrue ) ;
cgs . media . blueLeadsSound = trap_S_RegisterSound ( " sound/feedback/blueleads.wav " , qtrue ) ;
cgs . media . teamsTiedSound = trap_S_RegisterSound ( " sound/feedback/teamstied.wav " , qtrue ) ;
cgs . media . hitTeamSound = trap_S_RegisterSound ( " sound/feedback/hit_teammate.wav " , qtrue ) ;
cgs . media . redScoredSound = trap_S_RegisterSound ( " sound/teamplay/voc_red_scores.wav " , qtrue ) ;
cgs . media . blueScoredSound = trap_S_RegisterSound ( " sound/teamplay/voc_blue_scores.wav " , qtrue ) ;
cgs . media . captureYourTeamSound = trap_S_RegisterSound ( " sound/teamplay/flagcapture_yourteam.wav " , qtrue ) ;
cgs . media . captureOpponentSound = trap_S_RegisterSound ( " sound/teamplay/flagcapture_opponent.wav " , qtrue ) ;
cgs . media . returnYourTeamSound = trap_S_RegisterSound ( " sound/teamplay/flagreturn_yourteam.wav " , qtrue ) ;
cgs . media . returnOpponentSound = trap_S_RegisterSound ( " sound/teamplay/flagreturn_opponent.wav " , qtrue ) ;
cgs . media . takenYourTeamSound = trap_S_RegisterSound ( " sound/teamplay/flagtaken_yourteam.wav " , qtrue ) ;
cgs . media . takenOpponentSound = trap_S_RegisterSound ( " sound/teamplay/flagtaken_opponent.wav " , qtrue ) ;
if ( cgs . gametype = = GT_CTF | | cg_buildScript . integer ) {
cgs . media . redFlagReturnedSound =
trap_S_RegisterSound ( " sound/teamplay/voc_red_returned.wav " , qtrue ) ;
cgs . media . blueFlagReturnedSound =
trap_S_RegisterSound ( " sound/teamplay/voc_blue_returned.wav " , qtrue ) ;
cgs . media . enemyTookYourFlagSound =
trap_S_RegisterSound ( " sound/teamplay/voc_enemy_flag.wav " , qtrue ) ;
cgs . media . yourTeamTookEnemyFlagSound =
trap_S_RegisterSound ( " sound/teamplay/voc_team_flag.wav " , qtrue ) ;
2001-05-06 20:50:27 +00:00
}
2002-06-16 20:06:15 +00:00
cgs . media . youHaveFlagSound = trap_S_RegisterSound ( " sound/teamplay/voc_you_flag.wav " , qtrue ) ;
2001-08-01 21:07:48 +00:00
cgs . media . holyShitSound = trap_S_RegisterSound ( " sound/feedback/voc_holyshit.wav " , qtrue ) ;
2002-06-16 20:06:15 +00:00
cgs . media . neutralFlagReturnedSound =
trap_S_RegisterSound ( " sound/teamplay/flagreturn_opponent.wav " , qtrue ) ;
cgs . media . yourTeamTookTheFlagSound = trap_S_RegisterSound ( " sound/teamplay/voc_team_1flag.wav " , qtrue ) ;
cgs . media . enemyTookTheFlagSound = trap_S_RegisterSound ( " sound/teamplay/voc_enemy_1flag.wav " , qtrue ) ;
2001-05-06 20:50:27 +00:00
}
2002-06-16 20:06:15 +00:00
cgs . media . tracerSound = trap_S_RegisterSound ( " sound/weapons/machinegun/buletby1.wav " , qfalse ) ;
cgs . media . selectSound = trap_S_RegisterSound ( " sound/weapons/change.wav " , qfalse ) ;
cgs . media . wearOffSound = trap_S_RegisterSound ( " sound/items/wearoff.wav " , qfalse ) ;
cgs . media . useNothingSound = trap_S_RegisterSound ( " sound/items/use_nothing.wav " , qfalse ) ;
cgs . media . gibSound = trap_S_RegisterSound ( " sound/player/gibsplt1.wav " , qfalse ) ;
2001-05-06 20:50:27 +00:00
//Blaze: Reaction breakable glass
2002-04-03 03:13:49 +00:00
/*cgs.media.glassSound = trap_S_RegisterSound( "sound/world/glassbk.wav", qfalse );
2002-06-16 20:06:15 +00:00
cgs . media . glass2Sound = trap_S_RegisterSound ( " sound/world/glassbk2.wav " , qfalse ) ; */
cgs . media . gibBounce1Sound = trap_S_RegisterSound ( " sound/player/gibimp1.wav " , qfalse ) ;
cgs . media . gibBounce2Sound = trap_S_RegisterSound ( " sound/player/gibimp2.wav " , qfalse ) ;
cgs . media . gibBounce3Sound = trap_S_RegisterSound ( " sound/player/gibimp3.wav " , qfalse ) ;
2001-05-06 20:50:27 +00:00
2001-06-10 06:46:06 +00:00
//Elder: RQ3 sounds
2002-06-16 20:06:15 +00:00
cgs . media . kickSound = trap_S_RegisterSound ( " sound/misc/kick.wav " , qfalse ) ;
cgs . media . lensSound = trap_S_RegisterSound ( " sound/misc/lens.wav " , qfalse ) ;
cgs . media . headshotSound = trap_S_RegisterSound ( " sound/misc/headshot.wav " , qfalse ) ;
2001-11-11 07:23:16 +00:00
//cgs.media.lcaSound = trap_S_RegisterSound( "sound/misc/lca.wav", qfalse);
2002-06-16 20:06:15 +00:00
cgs . media . silencerSound = trap_S_RegisterSound ( " sound/misc/silencershot.wav " , qfalse ) ;
cgs . media . kevlarHitSound = trap_S_RegisterSound ( " sound/misc/kevlarhit.wav " , qfalse ) ;
cgs . media . weapToggleSound = trap_S_RegisterSound ( " sound/misc/click.wav " , qfalse ) ;
cgs . media . knifeClankSound = trap_S_RegisterSound ( " sound/misc/knife_clank.wav " , qfalse ) ;
cgs . media . knifeDeathSound = trap_S_RegisterSound ( " sound/player/gurp2.wav " , qfalse ) ;
cgs . media . knifeHitSound = trap_S_RegisterSound ( " sound/misc/knife_hit.wav " , qfalse ) ;
2001-07-28 14:12:11 +00:00
2002-06-16 20:06:15 +00:00
cgs . media . teleInSound = trap_S_RegisterSound ( " sound/world/telein.wav " , qfalse ) ;
cgs . media . teleOutSound = trap_S_RegisterSound ( " sound/world/teleout.wav " , qfalse ) ;
cgs . media . respawnSound = trap_S_RegisterSound ( " sound/items/respawn1.wav " , qfalse ) ;
2001-05-06 20:50:27 +00:00
2002-06-16 20:06:15 +00:00
cgs . media . noAmmoSound = trap_S_RegisterSound ( " sound/weapons/noammo.wav " , qfalse ) ;
2001-05-06 20:50:27 +00:00
2002-06-16 20:06:15 +00:00
cgs . media . talkSound = trap_S_RegisterSound ( " sound/player/talk.wav " , qfalse ) ;
cgs . media . landSound = trap_S_RegisterSound ( " sound/player/land1.wav " , qfalse ) ;
2001-05-06 20:50:27 +00:00
2002-06-16 20:06:15 +00:00
cgs . media . hitSound = trap_S_RegisterSound ( " sound/feedback/hit.wav " , qfalse ) ;
2001-05-06 20:50:27 +00:00
2002-06-16 20:06:15 +00:00
cgs . media . impressiveSound = trap_S_RegisterSound ( " sound/feedback/impressive.wav " , qtrue ) ;
cgs . media . excellentSound = trap_S_RegisterSound ( " sound/feedback/excellent.wav " , qtrue ) ;
cgs . media . deniedSound = trap_S_RegisterSound ( " sound/feedback/denied.wav " , qtrue ) ;
cgs . media . humiliationSound = trap_S_RegisterSound ( " sound/feedback/humiliation.wav " , qtrue ) ;
cgs . media . assistSound = trap_S_RegisterSound ( " sound/feedback/assist.wav " , qtrue ) ;
cgs . media . defendSound = trap_S_RegisterSound ( " sound/feedback/defense.wav " , qtrue ) ;
2001-05-06 20:50:27 +00:00
2002-06-16 20:06:15 +00:00
cgs . media . takenLeadSound = trap_S_RegisterSound ( " sound/feedback/takenlead.wav " , qtrue ) ;
cgs . media . tiedLeadSound = trap_S_RegisterSound ( " sound/feedback/tiedlead.wav " , qtrue ) ;
cgs . media . lostLeadSound = trap_S_RegisterSound ( " sound/feedback/lostlead.wav " , qtrue ) ;
2001-05-06 20:50:27 +00:00
2002-06-16 20:06:15 +00:00
cgs . media . watrInSound = trap_S_RegisterSound ( " sound/player/watr_in.wav " , qfalse ) ;
cgs . media . watrOutSound = trap_S_RegisterSound ( " sound/player/watr_out.wav " , qfalse ) ;
cgs . media . watrUnSound = trap_S_RegisterSound ( " sound/player/watr_un.wav " , qfalse ) ;
2001-05-06 20:50:27 +00:00
2002-06-16 20:06:15 +00:00
cgs . media . jumpPadSound = trap_S_RegisterSound ( " sound/world/jumppad.wav " , qfalse ) ;
2001-05-06 20:50:27 +00:00
2002-06-16 20:06:15 +00:00
for ( i = 0 ; i < 4 ; i + + ) {
Com_sprintf ( name , sizeof ( name ) , " sound/player/footsteps/step%i.wav " , i + 1 ) ;
cgs . media . footsteps [ FOOTSTEP_NORMAL ] [ i ] = trap_S_RegisterSound ( name , qfalse ) ;
2001-05-06 20:50:27 +00:00
2002-06-16 20:06:15 +00:00
Com_sprintf ( name , sizeof ( name ) , " sound/player/footsteps/boot%i.wav " , i + 1 ) ;
cgs . media . footsteps [ FOOTSTEP_BOOT ] [ i ] = trap_S_RegisterSound ( name , qfalse ) ;
2001-05-06 20:50:27 +00:00
2002-06-16 20:06:15 +00:00
Com_sprintf ( name , sizeof ( name ) , " sound/player/footsteps/flesh%i.wav " , i + 1 ) ;
cgs . media . footsteps [ FOOTSTEP_FLESH ] [ i ] = trap_S_RegisterSound ( name , qfalse ) ;
2001-05-06 20:50:27 +00:00
2002-06-16 20:06:15 +00:00
Com_sprintf ( name , sizeof ( name ) , " sound/player/footsteps/mech%i.wav " , i + 1 ) ;
cgs . media . footsteps [ FOOTSTEP_MECH ] [ i ] = trap_S_RegisterSound ( name , qfalse ) ;
2001-05-06 20:50:27 +00:00
2002-06-16 20:06:15 +00:00
Com_sprintf ( name , sizeof ( name ) , " sound/player/footsteps/energy%i.wav " , i + 1 ) ;
cgs . media . footsteps [ FOOTSTEP_ENERGY ] [ i ] = trap_S_RegisterSound ( name , qfalse ) ;
2001-05-06 20:50:27 +00:00
2002-06-16 20:06:15 +00:00
Com_sprintf ( name , sizeof ( name ) , " sound/player/footsteps/splash%i.wav " , i + 1 ) ;
cgs . media . footsteps [ FOOTSTEP_SPLASH ] [ i ] = trap_S_RegisterSound ( name , qfalse ) ;
2001-05-06 20:50:27 +00:00
2002-06-16 20:06:15 +00:00
Com_sprintf ( name , sizeof ( name ) , " sound/player/footsteps/clank%i.wav " , i + 1 ) ;
cgs . media . footsteps [ FOOTSTEP_METAL ] [ i ] = trap_S_RegisterSound ( name , qfalse ) ;
2001-08-06 19:15:00 +00:00
//Elder: new footsteps
2002-06-16 20:06:15 +00:00
Com_sprintf ( name , sizeof ( name ) , " sound/player/footsteps/grass%i.wav " , i + 1 ) ;
cgs . media . footsteps [ FOOTSTEP_GRASS ] [ i ] = trap_S_RegisterSound ( name , qfalse ) ;
2001-11-25 23:04:08 +00:00
2002-06-16 20:06:15 +00:00
Com_sprintf ( name , sizeof ( name ) , " sound/player/footsteps/wood%i.wav " , i + 1 ) ;
cgs . media . footsteps [ FOOTSTEP_WOOD ] [ i ] = trap_S_RegisterSound ( name , qfalse ) ;
2001-08-17 20:38:54 +00:00
2002-06-16 20:06:15 +00:00
Com_sprintf ( name , sizeof ( name ) , " sound/player/footsteps/carpet%i.wav " , i + 1 ) ;
cgs . media . footsteps [ FOOTSTEP_CARPET ] [ i ] = trap_S_RegisterSound ( name , qfalse ) ;
2001-08-17 20:38:54 +00:00
2002-06-16 20:06:15 +00:00
Com_sprintf ( name , sizeof ( name ) , " sound/player/footsteps/metal%i.wav " , i + 1 ) ;
cgs . media . footsteps [ FOOTSTEP_METAL2 ] [ i ] = trap_S_RegisterSound ( name , qfalse ) ;
2001-11-14 05:01:18 +00:00
2002-06-16 20:06:15 +00:00
Com_sprintf ( name , sizeof ( name ) , " sound/player/footsteps/gravel%i.wav " , i + 1 ) ;
cgs . media . footsteps [ FOOTSTEP_GRAVEL ] [ i ] = trap_S_RegisterSound ( name , qfalse ) ;
2002-01-24 14:20:53 +00:00
2002-06-16 20:06:15 +00:00
Com_sprintf ( name , sizeof ( name ) , " sound/player/footsteps/snow%i.wav " , i + 1 ) ;
cgs . media . footsteps [ FOOTSTEP_SNOW ] [ i ] = trap_S_RegisterSound ( name , qfalse ) ;
2002-01-24 14:20:53 +00:00
2002-06-16 20:06:15 +00:00
Com_sprintf ( name , sizeof ( name ) , " sound/player/footsteps/mud%i.wav " , i + 1 ) ;
cgs . media . footsteps [ FOOTSTEP_MUD ] [ i ] = trap_S_RegisterSound ( name , qfalse ) ;
2002-01-24 14:20:53 +00:00
2002-06-16 20:06:15 +00:00
Com_sprintf ( name , sizeof ( name ) , " sound/player/footsteps/hollowwood%i.wav " , i + 1 ) ;
cgs . media . footsteps [ FOOTSTEP_WOOD2 ] [ i ] = trap_S_RegisterSound ( name , qfalse ) ;
2002-01-24 14:20:53 +00:00
2002-06-16 20:06:15 +00:00
Com_sprintf ( name , sizeof ( name ) , " sound/player/footsteps/hardmetal%i.wav " , i + 1 ) ;
cgs . media . footsteps [ FOOTSTEP_HARDMETAL ] [ i ] = trap_S_RegisterSound ( name , qfalse ) ;
2002-04-20 15:05:08 +00:00
//Makro - new sounds
2002-06-16 20:06:15 +00:00
Com_sprintf ( name , sizeof ( name ) , " sound/player/footsteps/leaves%i.wav " , i + 1 ) ;
cgs . media . footsteps [ FOOTSTEP_LEAVES ] [ i ] = trap_S_RegisterSound ( name , qfalse ) ;
2002-04-20 15:05:08 +00:00
2002-06-16 20:06:15 +00:00
Com_sprintf ( name , sizeof ( name ) , " sound/player/footsteps/cement%i.wav " , i + 1 ) ;
cgs . media . footsteps [ FOOTSTEP_CEMENT ] [ i ] = trap_S_RegisterSound ( name , qfalse ) ;
2002-04-20 15:05:08 +00:00
2002-06-16 20:06:15 +00:00
Com_sprintf ( name , sizeof ( name ) , " sound/player/footsteps/marble%i.wav " , i + 1 ) ;
cgs . media . footsteps [ FOOTSTEP_MARBLE ] [ i ] = trap_S_RegisterSound ( name , qfalse ) ;
2002-04-20 15:05:08 +00:00
2002-06-16 20:06:15 +00:00
Com_sprintf ( name , sizeof ( name ) , " sound/player/footsteps/snow2_%i.wav " , i + 1 ) ;
cgs . media . footsteps [ FOOTSTEP_SNOW2 ] [ i ] = trap_S_RegisterSound ( name , qfalse ) ;
2002-04-20 15:05:08 +00:00
2002-06-16 20:06:15 +00:00
Com_sprintf ( name , sizeof ( name ) , " sound/player/footsteps/hardstep%i.wav " , i + 1 ) ;
cgs . media . footsteps [ FOOTSTEP_HARDSTEPS ] [ i ] = trap_S_RegisterSound ( name , qfalse ) ;
2002-04-20 15:05:08 +00:00
2002-06-16 20:06:15 +00:00
Com_sprintf ( name , sizeof ( name ) , " sound/player/footsteps/sand%i.wav " , i + 1 ) ;
cgs . media . footsteps [ FOOTSTEP_SAND ] [ i ] = trap_S_RegisterSound ( name , qfalse ) ;
2002-05-11 19:18:20 +00:00
2001-05-06 20:50:27 +00:00
}
// only register the items that the server says we need
2002-06-16 20:06:15 +00:00
strcpy ( items , CG_ConfigString ( CS_ITEMS ) ) ;
2001-05-06 20:50:27 +00:00
2002-06-16 20:06:15 +00:00
for ( i = 1 ; i < bg_numItems ; i + + ) {
// if ( items[ i ] == '1' || cg_buildScript.integer ) {
CG_RegisterItemSounds ( i ) ;
// }
2001-05-06 20:50:27 +00:00
}
2002-06-16 20:06:15 +00:00
for ( i = 1 ; i < MAX_SOUNDS ; i + + ) {
soundName = CG_ConfigString ( CS_SOUNDS + i ) ;
if ( ! soundName [ 0 ] ) {
2001-05-06 20:50:27 +00:00
break ;
}
2002-06-16 20:06:15 +00:00
if ( soundName [ 0 ] = = ' * ' ) {
2001-05-06 20:50:27 +00:00
continue ; // custom sound
}
2002-06-16 20:06:15 +00:00
cgs . gameSounds [ i ] = trap_S_RegisterSound ( soundName , qfalse ) ;
2001-05-06 20:50:27 +00:00
}
// FIXME: only needed with item
2002-06-16 20:06:15 +00:00
cgs . media . flightSound = trap_S_RegisterSound ( " sound/items/flight.wav " , qfalse ) ;
cgs . media . medkitSound = trap_S_RegisterSound ( " sound/items/use_medkit.wav " , qfalse ) ;
2001-05-06 20:50:27 +00:00
cgs . media . quadSound = trap_S_RegisterSound ( " sound/items/damage3.wav " , qfalse ) ;
2002-06-16 20:06:15 +00:00
cgs . media . sfx_ric1 = trap_S_RegisterSound ( " sound/weapons/machinegun/ric1.wav " , qfalse ) ;
cgs . media . sfx_ric2 = trap_S_RegisterSound ( " sound/weapons/machinegun/ric2.wav " , qfalse ) ;
cgs . media . sfx_ric3 = trap_S_RegisterSound ( " sound/weapons/machinegun/ric3.wav " , qfalse ) ;
2001-08-30 09:42:25 +00:00
// Elder: added
2002-06-16 20:06:15 +00:00
cgs . media . sfx_metalric1 = trap_S_RegisterSound ( " sound/world/impactmetal01.wav " , qfalse ) ;
cgs . media . sfx_metalric2 = trap_S_RegisterSound ( " sound/world/impactmetal02.wav " , qfalse ) ;
cgs . media . sfx_metalric3 = trap_S_RegisterSound ( " sound/world/impactmetal03.wav " , qfalse ) ;
cgs . media . sfx_glassric1 = trap_S_RegisterSound ( " sound/world/impactglass01.wav " , qfalse ) ;
cgs . media . sfx_glassric2 = trap_S_RegisterSound ( " sound/world/impactglass02.wav " , qfalse ) ;
cgs . media . sfx_glassric3 = trap_S_RegisterSound ( " sound/world/impactglass03.wav " , qfalse ) ;
2002-05-12 14:40:28 +00:00
//Makro - added
2002-06-16 20:06:15 +00:00
cgs . media . sfx_brickric1 = trap_S_RegisterSound ( " sound/world/impactbrick01.wav " , qfalse ) ;
cgs . media . sfx_brickric2 = trap_S_RegisterSound ( " sound/world/impactbrick02.wav " , qfalse ) ;
cgs . media . sfx_brickric3 = trap_S_RegisterSound ( " sound/world/impactbrick03.wav " , qfalse ) ;
cgs . media . sfx_woodric1 = trap_S_RegisterSound ( " sound/world/impactwood01.wav " , qfalse ) ;
cgs . media . sfx_woodric2 = trap_S_RegisterSound ( " sound/world/impactwood02.wav " , qfalse ) ;
cgs . media . sfx_woodric3 = trap_S_RegisterSound ( " sound/world/impactwood03.wav " , qfalse ) ;
cgs . media . sfx_ceramicric1 = trap_S_RegisterSound ( " sound/world/impactceramic01.wav " , qfalse ) ;
cgs . media . sfx_ceramicric2 = trap_S_RegisterSound ( " sound/world/impactceramic02.wav " , qfalse ) ;
cgs . media . sfx_ceramicric3 = trap_S_RegisterSound ( " sound/world/impactceramic03.wav " , qfalse ) ;
cgs . media . sfx_shelltumble = trap_S_RegisterSound ( " sound/misc/shell.wav " , qfalse ) ;
cgs . media . sfx_railg = trap_S_RegisterSound ( " sound/weapons/railgun/railgf1a.wav " , qfalse ) ;
cgs . media . sfx_rockexp = trap_S_RegisterSound ( " sound/weapons/rocket/rocklx1a.wav " , qfalse ) ;
cgs . media . sfx_plasmaexp = trap_S_RegisterSound ( " sound/weapons/plasma/plasmx1a.wav " , qfalse ) ;
2001-05-06 20:50:27 +00:00
cgs . media . regenSound = trap_S_RegisterSound ( " sound/items/regen.wav " , qfalse ) ;
cgs . media . protectSound = trap_S_RegisterSound ( " sound/items/protect3.wav " , qfalse ) ;
2002-06-16 20:06:15 +00:00
cgs . media . n_healthSound = trap_S_RegisterSound ( " sound/items/n_health.wav " , qfalse ) ;
2001-05-06 20:50:27 +00:00
cgs . media . hgrenb1aSound = trap_S_RegisterSound ( " sound/weapons/grenade/hgrenb1a.wav " , qfalse ) ;
cgs . media . hgrenb2aSound = trap_S_RegisterSound ( " sound/weapons/grenade/hgrenb2a.wav " , qfalse ) ;
}
2002-06-06 03:01:46 +00:00
//===================================================================================
/*
= = = = = = = = = = = = = = = = =
CG_CheckFile
This function checks to see if a file exists
= = = = = = = = = = = = = = = = =
*/
static qboolean CG_CheckFile ( const char * fpath )
{
fileHandle_t f ;
2002-06-16 20:06:15 +00:00
int len ;
len = trap_FS_FOpenFile ( fpath , & f , FS_READ ) ;
if ( len = = - 1 ) {
trap_FS_FCloseFile ( f ) ;
return qfalse ;
}
trap_FS_FCloseFile ( f ) ;
return qtrue ;
2002-06-06 03:01:46 +00:00
}
2001-05-06 20:50:27 +00:00
//===================================================================================
2002-05-25 07:12:34 +00:00
/*
= = = = = = = = = = = = = = = = =
CG_RegisterBreakables
2001-05-06 20:50:27 +00:00
2002-05-25 07:12:34 +00:00
This function registers the breakables
= = = = = = = = = = = = = = = = =
*/
2002-06-16 20:06:15 +00:00
static void CG_RegisterBreakables ( void )
{
int i , id ;
2002-05-25 07:12:34 +00:00
const char * breakInfo ;
2002-06-16 20:06:15 +00:00
const char * name ;
char baseName [ 80 ] ;
CG_Printf ( " In registerbreakables \n " ) ;
for ( i = 0 ; i < RQ3_MAX_BREAKABLES ; i + + ) {
breakInfo = CG_ConfigString ( CS_BREAKABLES + i ) ;
if ( ! breakInfo [ 0 ] ) {
2002-05-25 07:12:34 +00:00
continue ;
}
2002-06-16 20:06:15 +00:00
2002-05-25 07:12:34 +00:00
id = atoi ( Info_ValueForKey ( breakInfo , " id " ) ) ;
if ( id > = 0 & & id < RQ3_MAX_BREAKABLES ) {
2002-06-16 20:06:15 +00:00
name = Info_ValueForKey ( breakInfo , " type " ) ;
Com_Printf ( " Registering breakable %s ID=%d \n " , name , id ) ;
2002-05-25 07:12:34 +00:00
//Blaze: Breakable stuff - register the models, sounds, and explosion shader
2002-06-16 20:06:15 +00:00
if ( CG_CheckFile ( va ( " breakables/%s/models/break1.md3 " , name ) ) = = qtrue ) {
cgs . media . breakables [ id ] . model [ 0 ] =
trap_R_RegisterModel ( va ( " breakables/%s/models/break1.md3 " , name ) ) ;
cgs . media . breakables [ id ] . model [ 1 ] =
trap_R_RegisterModel ( va ( " breakables/%s/models/break2.md3 " , name ) ) ;
cgs . media . breakables [ id ] . model [ 2 ] =
trap_R_RegisterModel ( va ( " breakables/%s/models/break3.md3 " , name ) ) ;
} else {
strncpy ( baseName , name , 80 ) ;
//Makro - crash bug fix; TODO: find a better way to handle this
if ( ! strstr ( name , " _ " ) )
return ;
baseName [ strstr ( name , " _ " ) - name ] = ' \0 ' ;
cgs . media . breakables [ id ] . model [ 0 ] =
trap_R_RegisterModel ( va ( " breakables/%s/models/break1.md3 " , baseName ) ) ;
cgs . media . breakables [ id ] . model [ 1 ] =
trap_R_RegisterModel ( va ( " breakables/%s/models/break2.md3 " , baseName ) ) ;
cgs . media . breakables [ id ] . model [ 2 ] =
trap_R_RegisterModel ( va ( " breakables/%s/models/break3.md3 " , baseName ) ) ;
}
if ( CG_CheckFile ( va ( " breakables/%s/sounds/break1.wav " , name ) ) = = qtrue ) {
cgs . media . breakables [ id ] . sound [ 0 ] =
trap_S_RegisterSound ( va ( " breakables/%s/sounds/break1.wav " , name ) , qfalse ) ;
cgs . media . breakables [ id ] . sound [ 1 ] =
trap_S_RegisterSound ( va ( " breakables/%s/sounds/break2.wav " , name ) , qfalse ) ;
cgs . media . breakables [ id ] . sound [ 2 ] =
trap_S_RegisterSound ( va ( " breakables/%s/sounds/break3.wav " , name ) , qfalse ) ;
} else {
strncpy ( baseName , name , 80 ) ;
baseName [ strstr ( name , " _ " ) - name ] = ' \0 ' ;
cgs . media . breakables [ id ] . sound [ 0 ] =
trap_S_RegisterSound ( va ( " breakables/%s/sounds/break1.wav " , baseName ) , qfalse ) ;
cgs . media . breakables [ id ] . sound [ 1 ] =
trap_S_RegisterSound ( va ( " breakables/%s/sounds/break2.wav " , baseName ) , qfalse ) ;
cgs . media . breakables [ id ] . sound [ 2 ] =
trap_S_RegisterSound ( va ( " breakables/%s/sounds/break3.wav " , baseName ) , qfalse ) ;
}
if ( CG_CheckFile ( va ( " breakables/%s/sounds/explosion.wav " , name ) ) = = qtrue ) {
cgs . media . breakables [ id ] . exp_sound =
trap_S_RegisterSound ( va ( " breakables/%s/sounds/explosion.wav " , name ) , qfalse ) ;
} else {
strncpy ( baseName , name , 80 ) ;
baseName [ strstr ( name , " _ " ) - name ] = ' \0 ' ;
cgs . media . breakables [ id ] . exp_sound =
trap_S_RegisterSound ( va ( " breakables/%s/sounds/explosion.wav " , baseName ) , qfalse ) ;
}
cgs . media . breakables [ id ] . shader = trap_R_RegisterShader ( va ( " breakable_%s_explosion " , name ) ) ;
cgs . media . breakables [ id ] . velocity = atoi ( Info_ValueForKey ( breakInfo , " velocity " ) ) ;
cgs . media . breakables [ id ] . jump = atoi ( Info_ValueForKey ( breakInfo , " jump " ) ) ;
2002-05-25 07:12:34 +00:00
} else {
2002-06-16 20:06:15 +00:00
CG_Printf ( " ID was %d \n " , id ) ;
2002-05-25 07:12:34 +00:00
}
2002-06-16 20:06:15 +00:00
}
2002-05-25 07:12:34 +00:00
}
2001-05-06 20:50:27 +00:00
/*
= = = = = = = = = = = = = = = = =
CG_RegisterGraphics
This function may execute for a couple of minutes with a slow disk .
= = = = = = = = = = = = = = = = =
*/
2002-06-16 20:06:15 +00:00
static void CG_RegisterGraphics ( void )
{
int i , num = 0 ;
char items [ MAX_ITEMS + 1 ] ;
2003-03-29 15:04:03 +00:00
char * model ;
2002-05-26 05:12:11 +00:00
2002-06-16 20:06:15 +00:00
static char * sb_nums [ 11 ] = {
2001-05-06 20:50:27 +00:00
" gfx/2d/numbers/zero_32b " ,
" gfx/2d/numbers/one_32b " ,
" gfx/2d/numbers/two_32b " ,
" gfx/2d/numbers/three_32b " ,
" gfx/2d/numbers/four_32b " ,
" gfx/2d/numbers/five_32b " ,
" gfx/2d/numbers/six_32b " ,
" gfx/2d/numbers/seven_32b " ,
" gfx/2d/numbers/eight_32b " ,
" gfx/2d/numbers/nine_32b " ,
" gfx/2d/numbers/minus_32b " ,
} ;
// clear any references to old media
2002-06-16 20:06:15 +00:00
memset ( & cg . refdef , 0 , sizeof ( cg . refdef ) ) ;
2001-05-06 20:50:27 +00:00
trap_R_ClearScene ( ) ;
2002-06-16 20:06:15 +00:00
CG_LoadingString ( cgs . mapname ) ;
2001-05-06 20:50:27 +00:00
2002-06-16 20:06:15 +00:00
trap_R_LoadWorldMap ( cgs . mapname ) ;
2002-05-26 05:12:11 +00:00
cg . loadingMapPercent + = 0.45f ;
2001-05-06 20:50:27 +00:00
// precache status bar pics
2002-06-16 20:06:15 +00:00
CG_LoadingString ( " game media " ) ;
2001-05-06 20:50:27 +00:00
2002-06-16 20:06:15 +00:00
for ( i = 0 ; i < 11 ; i + + ) {
cgs . media . numberShaders [ i ] = trap_R_RegisterShader ( sb_nums [ i ] ) ;
2001-05-06 20:50:27 +00:00
}
2002-06-16 20:06:15 +00:00
cgs . media . botSkillShaders [ 0 ] = trap_R_RegisterShader ( " menu/art/skill1.tga " ) ;
cgs . media . botSkillShaders [ 1 ] = trap_R_RegisterShader ( " menu/art/skill2.tga " ) ;
cgs . media . botSkillShaders [ 2 ] = trap_R_RegisterShader ( " menu/art/skill3.tga " ) ;
cgs . media . botSkillShaders [ 3 ] = trap_R_RegisterShader ( " menu/art/skill4.tga " ) ;
cgs . media . botSkillShaders [ 4 ] = trap_R_RegisterShader ( " menu/art/skill5.tga " ) ;
2001-05-06 20:50:27 +00:00
2002-06-16 20:06:15 +00:00
cgs . media . viewBloodShader = trap_R_RegisterShader ( " viewBloodBlend " ) ;
2001-05-06 20:50:27 +00:00
2002-06-16 20:06:15 +00:00
cgs . media . deferShader = trap_R_RegisterShaderNoMip ( " gfx/2d/defer.tga " ) ;
2001-05-06 20:50:27 +00:00
2002-06-16 20:06:15 +00:00
cgs . media . scoreboardName = trap_R_RegisterShaderNoMip ( " menu/tab/name.tga " ) ;
cgs . media . scoreboardPing = trap_R_RegisterShaderNoMip ( " menu/tab/ping.tga " ) ;
cgs . media . scoreboardScore = trap_R_RegisterShaderNoMip ( " menu/tab/score.tga " ) ;
cgs . media . scoreboardTime = trap_R_RegisterShaderNoMip ( " menu/tab/time.tga " ) ;
2001-05-06 20:50:27 +00:00
2002-06-16 20:06:15 +00:00
cgs . media . smokePuffShader = trap_R_RegisterShader ( " smokePuff " ) ;
2001-10-30 23:23:04 +00:00
// Elder: expanding animated smoke puff
2002-06-16 20:06:15 +00:00
cgs . media . smokePuffAnimShader = trap_R_RegisterShader ( " smokePuff-rq3 " ) ;
cgs . media . smokePuffRageProShader = trap_R_RegisterShader ( " smokePuffRagePro " ) ;
cgs . media . shotgunSmokePuffShader = trap_R_RegisterShader ( " shotgunSmokePuff " ) ;
cgs . media . plasmaBallShader = trap_R_RegisterShader ( " sprites/plasma1 " ) ;
cgs . media . bloodTrailShader = trap_R_RegisterShader ( " bloodTrail " ) ;
cgs . media . lagometerShader = trap_R_RegisterShader ( " lagometer " ) ;
cgs . media . connectionShader = trap_R_RegisterShader ( " disconnected " ) ;
cgs . media . flamePressureShader = trap_R_RegisterShader ( " flamepressure " ) ; // NiceAss: Used in pressure entities
2002-06-09 05:16:58 +00:00
// cgs.media.waterPressureModel = trap_R_RegisterModel("models/mapobjects/reaction/watercone/watercode.md3");
2001-05-06 20:50:27 +00:00
2002-06-16 20:06:15 +00:00
cgs . media . waterBubbleShader = trap_R_RegisterShader ( " waterBubble " ) ;
cgs . media . tracerShader = trap_R_RegisterShader ( " gfx/misc/tracer " ) ;
cgs . media . selectShader = trap_R_RegisterShader ( " gfx/2d/select " ) ;
2001-05-06 20:50:27 +00:00
2002-08-29 14:25:13 +00:00
cgs . media . blackHackShader = trap_R_RegisterShader ( " gfx/misc/black " ) ;
2002-06-16 20:06:15 +00:00
for ( i = 0 ; i < NUM_CROSSHAIRS ; i + + ) {
// cgs.media.crosshairShader[i] = trap_R_RegisterShader( va("gfx/2d/crosshair%c", 'a'+i) );
cgs . media . crosshairShader [ i ] = trap_R_RegisterShaderNoMip ( va ( " gfx/2d/IDcrosshair%c " , ' a ' + i ) ) ;
2001-05-06 20:50:27 +00:00
}
2002-06-16 20:06:15 +00:00
cgs . media . backTileShader = trap_R_RegisterShader ( " gfx/2d/backtile " ) ;
cgs . media . noammoShader = trap_R_RegisterShader ( " icons/noammo " ) ;
2001-05-06 20:50:27 +00:00
// powerup shaders
2002-06-16 20:06:15 +00:00
cgs . media . quadShader = trap_R_RegisterShader ( " powerups/quad " ) ;
cgs . media . quadWeaponShader = trap_R_RegisterShader ( " powerups/quadWeapon " ) ;
cgs . media . battleSuitShader = trap_R_RegisterShader ( " powerups/battleSuit " ) ;
cgs . media . battleWeaponShader = trap_R_RegisterShader ( " powerups/battleWeapon " ) ;
cgs . media . invisShader = trap_R_RegisterShader ( " powerups/invisibility " ) ;
cgs . media . regenShader = trap_R_RegisterShader ( " powerups/regen " ) ;
cgs . media . hastePuffShader = trap_R_RegisterShader ( " hasteSmokePuff " ) ;
2001-05-06 20:50:27 +00:00
2001-09-11 00:11:00 +00:00
// Elder: RQ3 misc. shaders
cgs . media . irPlayerShader = trap_R_RegisterShader ( " powerups/irdetail " ) ;
2001-11-11 07:23:16 +00:00
cgs . media . itemStrobeShader = trap_R_RegisterShader ( " rq3-itemstrobe " ) ;
2001-09-11 00:11:00 +00:00
2002-06-16 20:06:15 +00:00
if ( cgs . gametype = = GT_CTF | | cg_buildScript . integer ) {
cgs . media . redCubeModel = trap_R_RegisterModel ( " models/powerups/orb/r_orb.md3 " ) ;
cgs . media . blueCubeModel = trap_R_RegisterModel ( " models/powerups/orb/b_orb.md3 " ) ;
cgs . media . redCubeIcon = trap_R_RegisterShader ( " icons/skull_red " ) ;
cgs . media . blueCubeIcon = trap_R_RegisterShader ( " icons/skull_blue " ) ;
2001-05-06 20:50:27 +00:00
}
2002-06-16 20:06:15 +00:00
if ( cgs . gametype = = GT_CTF | | cg_buildScript . integer ) {
2002-06-29 04:15:15 +00:00
// cgs.media.redFlagModel = trap_R_RegisterModel("models/flags/r_flag.md3");
// cgs.media.blueFlagModel = trap_R_RegisterModel("models/flags/b_flag.md3");
cgs . media . redFlagModel = trap_R_RegisterModel ( " models/cases/s_case.md3 " ) ;
cgs . media . blueFlagModel = trap_R_RegisterModel ( " models/cases/b_case.md3 " ) ;
2002-07-01 02:18:42 +00:00
cgs . media . redFlagShader [ 0 ] = trap_R_RegisterShaderNoMip ( " icons/iconc_silver1 " ) ;
cgs . media . redFlagShader [ 1 ] = trap_R_RegisterShaderNoMip ( " icons/iconc_silver2 " ) ;
cgs . media . redFlagShader [ 2 ] = trap_R_RegisterShaderNoMip ( " icons/iconc_silver3 " ) ;
cgs . media . blueFlagShader [ 0 ] = trap_R_RegisterShaderNoMip ( " icons/iconc_black1 " ) ;
cgs . media . blueFlagShader [ 1 ] = trap_R_RegisterShaderNoMip ( " icons/iconc_black2 " ) ;
cgs . media . blueFlagShader [ 2 ] = trap_R_RegisterShaderNoMip ( " icons/iconc_black3 " ) ;
/* cgs.media.redFlagShader[0] = trap_R_RegisterShaderNoMip("icons/iconf_red1");
2002-06-16 20:06:15 +00:00
cgs . media . redFlagShader [ 1 ] = trap_R_RegisterShaderNoMip ( " icons/iconf_red2 " ) ;
cgs . media . redFlagShader [ 2 ] = trap_R_RegisterShaderNoMip ( " icons/iconf_red3 " ) ;
cgs . media . blueFlagShader [ 0 ] = trap_R_RegisterShaderNoMip ( " icons/iconf_blu1 " ) ;
cgs . media . blueFlagShader [ 1 ] = trap_R_RegisterShaderNoMip ( " icons/iconf_blu2 " ) ;
2002-07-01 02:18:42 +00:00
cgs . media . blueFlagShader [ 2 ] = trap_R_RegisterShaderNoMip ( " icons/iconf_blu3 " ) ; */
2001-05-06 20:50:27 +00:00
}
2002-03-23 05:50:47 +00:00
// JBravo: moved outof MISSIONPACK
2002-06-16 20:06:15 +00:00
cgs . media . dustPuffShader = trap_R_RegisterShader ( " hasteSmokePuff " ) ;
2002-03-23 05:50:47 +00:00
2002-06-16 20:06:15 +00:00
if ( cgs . gametype > = GT_TEAM | | cg_buildScript . integer ) {
cgs . media . friendShader = trap_R_RegisterShader ( " sprites/foe " ) ;
cgs . media . redQuadShader = trap_R_RegisterShader ( " powerups/blueflag " ) ;
cgs . media . teamStatusBar = trap_R_RegisterShader ( " gfx/2d/colorbar.tga " ) ;
2001-05-06 20:50:27 +00:00
}
2002-06-16 20:06:15 +00:00
cgs . media . armorModel = trap_R_RegisterModel ( " models/powerups/armor/armor_yel.md3 " ) ;
cgs . media . armorIcon = trap_R_RegisterShaderNoMip ( " icons/iconr_yellow " ) ;
cgs . media . machinegunBrassModel = trap_R_RegisterModel ( " models/weapons2/shells/m_shell.md3 " ) ;
cgs . media . largeBrassModel = trap_R_RegisterModel ( " models/weapons2/shells/l_shell.md3 " ) ;
cgs . media . shotgunBrassModel = trap_R_RegisterModel ( " models/weapons2/shells/s_shell.md3 " ) ;
cgs . media . HCBrassModel = trap_R_RegisterModel ( " models/weapons2/shells/hc_shell.md3 " ) ;
cgs . media . gibAbdomen = trap_R_RegisterModel ( " models/gibs/abdomen.md3 " ) ;
cgs . media . gibArm = trap_R_RegisterModel ( " models/gibs/arm.md3 " ) ;
cgs . media . gibChest = trap_R_RegisterModel ( " models/gibs/chest.md3 " ) ;
cgs . media . gibFist = trap_R_RegisterModel ( " models/gibs/fist.md3 " ) ;
cgs . media . gibFoot = trap_R_RegisterModel ( " models/gibs/foot.md3 " ) ;
cgs . media . gibForearm = trap_R_RegisterModel ( " models/gibs/forearm.md3 " ) ;
cgs . media . gibIntestine = trap_R_RegisterModel ( " models/gibs/intestine.md3 " ) ;
cgs . media . gibLeg = trap_R_RegisterModel ( " models/gibs/leg.md3 " ) ;
cgs . media . gibSkull = trap_R_RegisterModel ( " models/gibs/skull.md3 " ) ;
cgs . media . gibBrain = trap_R_RegisterModel ( " models/gibs/brain.md3 " ) ;
2002-04-03 03:13:49 +00:00
//Blaze: Delay loading the breakable stuff
/*
2001-06-08 04:35:50 +00:00
//Elder: additional debris
2001-07-24 01:49:02 +00:00
//Todo: load only if in the level
2002-03-21 00:26:46 +00:00
i + + ;
cgs . media . breakable_frag [ i ] [ 0 ] = cgs . media . wood01 = trap_R_RegisterModel ( " models/breakables/wood01.md3 " ) ;
cgs . media . breakable_frag [ i ] [ 1 ] = cgs . media . wood02 = trap_R_RegisterModel ( " models/breakables/wood02.md3 " ) ;
cgs . media . breakable_frag [ i ] [ 2 ] = cgs . media . wood03 = trap_R_RegisterModel ( " models/breakables/wood03.md3 " ) ;
2001-11-25 23:04:08 +00:00
2002-03-21 00:26:46 +00:00
i + + ;
cgs . media . breakable_frag [ i ] [ 0 ] = cgs . media . metal01 = trap_R_RegisterModel ( " models/breakables/metal01.md3 " ) ;
cgs . media . breakable_frag [ i ] [ 1 ] = cgs . media . metal02 = trap_R_RegisterModel ( " models/breakables/metal02.md3 " ) ;
cgs . media . breakable_frag [ i ] [ 2 ] = cgs . media . metal03 = trap_R_RegisterModel ( " models/breakables/metal03.md3 " ) ;
2001-11-25 23:04:08 +00:00
2002-03-21 00:26:46 +00:00
i + + ;
cgs . media . breakable_frag [ i ] [ 0 ] = cgs . media . ceramic01 = trap_R_RegisterModel ( " models/breakables/ceramic01.md3 " ) ;
cgs . media . breakable_frag [ i ] [ 1 ] = cgs . media . ceramic02 = trap_R_RegisterModel ( " models/breakables/ceramic02.md3 " ) ;
cgs . media . breakable_frag [ i ] [ 2 ] = cgs . media . ceramic03 = trap_R_RegisterModel ( " models/breakables/ceramic03.md3 " ) ;
2001-11-25 23:04:08 +00:00
2002-03-21 00:26:46 +00:00
i + + ;
cgs . media . breakable_frag [ i ] [ 0 ] = cgs . media . paper01 = trap_R_RegisterModel ( " models/breakables/paper01.md3 " ) ;
cgs . media . breakable_frag [ i ] [ 1 ] = cgs . media . paper02 = trap_R_RegisterModel ( " models/breakables/paper02.md3 " ) ;
cgs . media . breakable_frag [ i ] [ 2 ] = cgs . media . paper03 = trap_R_RegisterModel ( " models/breakables/paper03.md3 " ) ;
2001-11-25 23:04:08 +00:00
2002-03-21 00:26:46 +00:00
i + + ;
cgs . media . breakable_frag [ i ] [ 0 ] = cgs . media . brick01 = trap_R_RegisterModel ( " models/breakables/brick01.md3 " ) ;
cgs . media . breakable_frag [ i ] [ 1 ] = cgs . media . brick02 = trap_R_RegisterModel ( " models/breakables/brick02.md3 " ) ;
cgs . media . breakable_frag [ i ] [ 2 ] = cgs . media . brick03 = trap_R_RegisterModel ( " models/breakables/brick03.md3 " ) ;
2001-06-15 05:19:52 +00:00
2002-03-21 00:26:46 +00:00
i + + ;
cgs . media . breakable_frag [ i ] [ 0 ] = cgs . media . concrete01 = trap_R_RegisterModel ( " models/breakables/concrete01.md3 " ) ;
cgs . media . breakable_frag [ i ] [ 1 ] = cgs . media . concrete02 = trap_R_RegisterModel ( " models/breakables/concrete02.md3 " ) ;
cgs . media . breakable_frag [ i ] [ 2 ] = cgs . media . concrete03 = trap_R_RegisterModel ( " models/breakables/concrete03.md3 " ) ;
2002-04-03 03:13:49 +00:00
*/
2001-06-08 04:35:50 +00:00
//Elder: akimbos - some of the stuff isn't in yet :p
2002-06-16 20:06:15 +00:00
cgs . media . akimboModel = trap_R_RegisterModel ( " models/weapons2/akimbo/akimbo.md3 " ) ;
cgs . media . akimboFlashModel = trap_R_RegisterModel ( " models/weapons2/akimbo/akimbo_flash.md3 " ) ;
cgs . media . akimbo1stModel = trap_R_RegisterModel ( " models/weapons2/akimbo/akimbo_1st.md3 " ) ;
cgs . media . akimboHandModel = trap_R_RegisterModel ( " models/weapons2/akimbo/akimbo_hand.md3 " ) ;
2001-05-06 20:50:27 +00:00
2001-07-09 00:32:10 +00:00
//Elder: item cache
2003-03-29 15:04:03 +00:00
model = modelFromStr ( cg_RQ3_bandolier . string ) ;
cgs . media . rq3_bandolierModel = trap_R_RegisterModel ( va ( " models/items/%s.md3 " , model ) ) ;
model = modelFromStr ( cg_RQ3_kevlar . string ) ;
cgs . media . rq3_kevlarModel = trap_R_RegisterModel ( va ( " models/items/%s.md3 " , model ) ) ;
model = modelFromStr ( cg_RQ3_silencer . string ) ;
cgs . media . rq3_silencerModel = trap_R_RegisterModel ( va ( " models/items/%s.md3 " , model ) ) ;
model = modelFromStr ( cg_RQ3_laser . string ) ;
cgs . media . rq3_laserModel = trap_R_RegisterModel ( va ( " models/items/%s.md3 " , model ) ) ;
model = modelFromStr ( cg_RQ3_slippers . string ) ;
cgs . media . rq3_slippersModel = trap_R_RegisterModel ( va ( " models/items/%s.md3 " , model ) ) ;
2002-10-30 20:04:34 +00:00
// JBravo: adding the helmet
2003-03-29 15:04:03 +00:00
model = modelFromStr ( cg_RQ3_helmet . string ) ;
cgs . media . rq3_helmetModel = trap_R_RegisterModel ( va ( " models/items/%s.md3 " , model ) ) ;
2001-07-09 00:32:10 +00:00
2002-06-16 20:06:15 +00:00
cgs . media . smoke2 = trap_R_RegisterModel ( " models/weapons2/shells/s_shell.md3 " ) ;
2001-05-06 20:50:27 +00:00
2002-06-16 20:06:15 +00:00
cgs . media . balloonShader = trap_R_RegisterShader ( " sprites/balloon3 " ) ;
2001-05-06 20:50:27 +00:00
2002-06-16 20:06:15 +00:00
cgs . media . bloodExplosionShader = trap_R_RegisterShader ( " bloodExplosion " ) ;
2001-05-06 20:50:27 +00:00
cgs . media . bulletFlashModel = trap_R_RegisterModel ( " models/weaphits/bullet.md3 " ) ;
cgs . media . ringFlashModel = trap_R_RegisterModel ( " models/weaphits/ring02.md3 " ) ;
cgs . media . dishFlashModel = trap_R_RegisterModel ( " models/weaphits/boom01.md3 " ) ;
2001-11-25 23:04:08 +00:00
2001-11-12 08:59:46 +00:00
// Elder: added
cgs . media . hitSparkModel = trap_R_RegisterModel ( " models/weaphits/tracer/tracer.md3 " ) ;
cgs . media . hitSparkShader = trap_R_RegisterShader ( " models/weaphits/tracer/tracer " ) ;
2002-06-16 20:06:15 +00:00
cgs . media . teleportEffectModel = trap_R_RegisterModel ( " models/misc/telep.md3 " ) ;
cgs . media . teleportEffectShader = trap_R_RegisterShader ( " teleportEffect " ) ;
2001-05-06 20:50:27 +00:00
2002-06-16 20:06:15 +00:00
cgs . media . invulnerabilityPowerupModel = trap_R_RegisterModel ( " models/powerups/shield/shield.md3 " ) ;
cgs . media . medalImpressive = trap_R_RegisterShaderNoMip ( " medal_impressive " ) ;
cgs . media . medalExcellent = trap_R_RegisterShaderNoMip ( " medal_excellent " ) ;
cgs . media . medalGauntlet = trap_R_RegisterShaderNoMip ( " medal_gauntlet " ) ;
cgs . media . medalDefend = trap_R_RegisterShaderNoMip ( " medal_defend " ) ;
cgs . media . medalAssist = trap_R_RegisterShaderNoMip ( " medal_assist " ) ;
cgs . media . medalCapture = trap_R_RegisterShaderNoMip ( " medal_capture " ) ;
2001-05-06 20:50:27 +00:00
2001-07-28 14:12:11 +00:00
//Elder: C3A laser tutorial
2002-06-16 20:06:15 +00:00
cgs . media . laserShader = trap_R_RegisterShader ( " sprites/laser " ) ;
2001-07-28 14:12:11 +00:00
2001-06-08 04:35:50 +00:00
//Elder: added for sniper crosshairs
2002-06-16 20:06:15 +00:00
switch ( cg_RQ3_ssgCrosshair . integer ) {
2001-12-01 09:05:14 +00:00
case 0 :
2002-06-16 20:06:15 +00:00
cgs . media . ssgCrosshair [ 0 ] = trap_R_RegisterShaderNoMip ( " gfx/rq3_hud/ssg2x " ) ;
cgs . media . ssgCrosshair [ 1 ] = trap_R_RegisterShaderNoMip ( " gfx/rq3_hud/ssg4x " ) ;
cgs . media . ssgCrosshair [ 2 ] = trap_R_RegisterShaderNoMip ( " gfx/rq3_hud/ssg6x " ) ;
2001-12-01 09:05:14 +00:00
break ;
case 1 :
2002-06-16 20:06:15 +00:00
cgs . media . ssgCrosshair [ 0 ] = trap_R_RegisterShaderNoMip ( " gfx/rq3_hud/ssg2x-1 " ) ;
cgs . media . ssgCrosshair [ 1 ] = trap_R_RegisterShaderNoMip ( " gfx/rq3_hud/ssg4x-1 " ) ;
cgs . media . ssgCrosshair [ 2 ] = trap_R_RegisterShaderNoMip ( " gfx/rq3_hud/ssg6x-1 " ) ;
2001-12-01 09:05:14 +00:00
break ;
case 2 :
2002-06-16 20:06:15 +00:00
cgs . media . ssgCrosshair [ 0 ] = trap_R_RegisterShaderNoMip ( " gfx/rq3_hud/ssg2x-2 " ) ;
cgs . media . ssgCrosshair [ 1 ] = trap_R_RegisterShaderNoMip ( " gfx/rq3_hud/ssg4x-2 " ) ;
cgs . media . ssgCrosshair [ 2 ] = trap_R_RegisterShaderNoMip ( " gfx/rq3_hud/ssg6x-2 " ) ;
2001-12-01 09:05:14 +00:00
break ;
case 3 :
2002-06-16 20:06:15 +00:00
cgs . media . ssgCrosshair [ 0 ] = trap_R_RegisterShaderNoMip ( " gfx/rq3_hud/ssg2x-3 " ) ;
cgs . media . ssgCrosshair [ 1 ] = trap_R_RegisterShaderNoMip ( " gfx/rq3_hud/ssg4x-3 " ) ;
cgs . media . ssgCrosshair [ 2 ] = trap_R_RegisterShaderNoMip ( " gfx/rq3_hud/ssg6x-3 " ) ;
2001-12-01 09:05:14 +00:00
break ;
case 4 :
2002-06-16 20:06:15 +00:00
cgs . media . ssgCrosshair [ 0 ] = trap_R_RegisterShaderNoMip ( " gfx/rq3_hud/ssg2x-4 " ) ;
cgs . media . ssgCrosshair [ 1 ] = trap_R_RegisterShaderNoMip ( " gfx/rq3_hud/ssg4x-4 " ) ;
cgs . media . ssgCrosshair [ 2 ] = trap_R_RegisterShaderNoMip ( " gfx/rq3_hud/ssg6x-4 " ) ;
2001-12-01 09:05:14 +00:00
break ;
case 5 :
2002-06-16 20:06:15 +00:00
cgs . media . ssgCrosshair [ 0 ] = trap_R_RegisterShaderNoMip ( " gfx/rq3_hud/ssg2x-5 " ) ;
cgs . media . ssgCrosshair [ 1 ] = trap_R_RegisterShaderNoMip ( " gfx/rq3_hud/ssg4x-5 " ) ;
cgs . media . ssgCrosshair [ 2 ] = trap_R_RegisterShaderNoMip ( " gfx/rq3_hud/ssg6x-5 " ) ;
2001-12-01 09:05:14 +00:00
break ;
default :
2002-06-16 20:06:15 +00:00
cgs . media . ssgCrosshair [ 0 ] = trap_R_RegisterShaderNoMip ( " gfx/rq3_hud/ssg2x " ) ;
cgs . media . ssgCrosshair [ 1 ] = trap_R_RegisterShaderNoMip ( " gfx/rq3_hud/ssg4x " ) ;
cgs . media . ssgCrosshair [ 2 ] = trap_R_RegisterShaderNoMip ( " gfx/rq3_hud/ssg6x " ) ;
2001-12-01 09:05:14 +00:00
break ;
}
2001-06-08 04:35:50 +00:00
//Elder: other hud-related elements
2002-06-16 20:06:15 +00:00
cgs . media . rq3_healthicon = trap_R_RegisterShaderNoMip ( " gfx/rq3_hud/hud_health " ) ;
cgs . media . rq3_healthicon2 = trap_R_RegisterShaderNoMip ( " gfx/rq3_hud/hud_healthwarning " ) ;
2001-05-06 20:50:27 +00:00
2002-05-26 05:12:11 +00:00
cg . loadingMapPercent + = 0.05f ;
2002-06-16 20:06:15 +00:00
memset ( cg_items , 0 , sizeof ( cg_items ) ) ;
memset ( cg_weapons , 0 , sizeof ( cg_weapons ) ) ;
2001-05-06 20:50:27 +00:00
// only register the items that the server says we need
2002-06-16 20:06:15 +00:00
strcpy ( items , CG_ConfigString ( CS_ITEMS ) ) ;
2002-10-20 21:24:32 +00:00
CG_Printf ( " Items: (%s) \n " , items ) ;
2002-06-16 20:06:15 +00:00
for ( i = 1 ; i < bg_numItems ; i + + )
if ( items [ i ] = = ' 1 ' | | cg_buildScript . integer )
2002-05-26 05:12:11 +00:00
num + + ;
2002-06-16 20:06:15 +00:00
for ( i = 1 ; i < bg_numItems ; i + + ) {
if ( items [ i ] = = ' 1 ' | | cg_buildScript . integer ) {
2002-10-20 21:24:32 +00:00
2002-06-16 20:06:15 +00:00
CG_LoadingItem ( i ) ;
CG_RegisterItemVisuals ( i ) ;
if ( num )
cg . loadingMapPercent + = ( 0.25f / ( float ) num ) ;
2001-05-06 20:50:27 +00:00
}
}
2002-06-16 20:06:15 +00:00
if ( ! num )
cg . loadingMapPercent + = 0.25f ;
2001-05-06 20:50:27 +00:00
// wall marks
2002-06-16 20:06:15 +00:00
cgs . media . bulletMarkShader = trap_R_RegisterShader ( " gfx/damage/bullet_mrk " ) ;
cgs . media . burnMarkShader = trap_R_RegisterShader ( " gfx/damage/burn_med_mrk " ) ;
cgs . media . holeMarkShader = trap_R_RegisterShader ( " gfx/damage/hole_lg_mrk " ) ;
cgs . media . energyMarkShader = trap_R_RegisterShader ( " gfx/damage/plasma_mrk " ) ;
cgs . media . shadowMarkShader = trap_R_RegisterShader ( " markShadow " ) ;
cgs . media . wakeMarkShader = trap_R_RegisterShader ( " wake " ) ;
cgs . media . bloodMarkShader = trap_R_RegisterShader ( " bloodMark " ) ;
2002-08-27 05:10:42 +00:00
cgs . media . ctbXMarkSilver = trap_R_RegisterShader ( " ctbXMarkSilver " ) ;
cgs . media . ctbOMarkBlack = trap_R_RegisterShader ( " ctbOMarkBlack " ) ;
2002-06-16 20:06:15 +00:00
//Blaze: added for explosive boxes and grenades
cgs . media . grenadeExplosionShader = trap_R_RegisterShader ( " grenadeExplosion " ) ;
2001-08-18 20:01:21 +00:00
// Elder: added
2002-06-16 20:06:15 +00:00
cgs . media . slashMarkShader = trap_R_RegisterShader ( " gfx/damage/slash_mrk " ) ;
cgs . media . glassMarkShader = trap_R_RegisterShader ( " gfx/damage/glass_mrk " ) ;
cgs . media . metalMarkShader = trap_R_RegisterShader ( " gfx/damage/metal_mrk " ) ;
2002-07-13 22:43:59 +00:00
// Makro - added
//cgs.media.tileMarkShader = trap_R_RegisterShader("gfx/damage/tile_mrk");
2001-05-06 20:50:27 +00:00
2001-12-17 15:06:41 +00:00
// NiceAss: for foglaser
2002-07-08 00:52:14 +00:00
cgs . media . railCoreShader = trap_R_RegisterShader ( " fogLaser " ) ;
2001-12-17 15:06:41 +00:00
2001-05-06 20:50:27 +00:00
// register the inline models
cgs . numInlineModels = trap_CM_NumInlineModels ( ) ;
2002-06-16 20:06:15 +00:00
for ( i = 1 ; i < cgs . numInlineModels ; i + + ) {
char name [ 10 ] ;
vec3_t mins , maxs ;
int j ;
Com_sprintf ( name , sizeof ( name ) , " *%i " , i ) ;
cgs . inlineDrawModel [ i ] = trap_R_RegisterModel ( name ) ;
trap_R_ModelBounds ( cgs . inlineDrawModel [ i ] , mins , maxs ) ;
for ( j = 0 ; j < 3 ; j + + ) {
cgs . inlineModelMidpoints [ i ] [ j ] = mins [ j ] + 0.5 * ( maxs [ j ] - mins [ j ] ) ;
2001-05-06 20:50:27 +00:00
}
}
// register all the server specified models
2002-06-16 20:06:15 +00:00
for ( i = 1 ; i < MAX_MODELS ; i + + ) {
const char * modelName ;
2001-05-06 20:50:27 +00:00
2002-06-16 20:06:15 +00:00
modelName = CG_ConfigString ( CS_MODELS + i ) ;
if ( ! modelName [ 0 ] ) {
2001-05-06 20:50:27 +00:00
break ;
}
2002-06-16 20:06:15 +00:00
cgs . gameModels [ i ] = trap_R_RegisterModel ( modelName ) ;
2001-05-06 20:50:27 +00:00
}
2002-06-16 20:06:15 +00:00
CG_ClearParticles ( ) ;
2002-05-26 05:12:11 +00:00
/*
2002-06-16 20:06:15 +00:00
for ( i = 1 ; i < MAX_PARTICLES_AREAS ; i + + )
{
{
int rval ;
rval = CG_NewParticleArea ( CS_PARTICLES + i ) ;
if ( ! rval )
break ;
}
}
*/
2001-05-06 20:50:27 +00:00
}
2001-11-25 23:04:08 +00:00
/*
2001-05-06 20:50:27 +00:00
= = = = = = = = = = = = = = = = = = = = = = =
CG_BuildSpectatorString
= = = = = = = = = = = = = = = = = = = = = = =
*/
2002-06-16 20:06:15 +00:00
void CG_BuildSpectatorString ( )
{
2001-05-06 20:50:27 +00:00
int i ;
2002-06-16 20:06:15 +00:00
2001-05-06 20:50:27 +00:00
cg . spectatorList [ 0 ] = 0 ;
for ( i = 0 ; i < MAX_CLIENTS ; i + + ) {
2002-06-16 20:06:15 +00:00
if ( cgs . clientinfo [ i ] . infoValid & & cgs . clientinfo [ i ] . team = = TEAM_SPECTATOR ) {
2001-05-06 20:50:27 +00:00
Q_strcat ( cg . spectatorList , sizeof ( cg . spectatorList ) , va ( " %s " , cgs . clientinfo [ i ] . name ) ) ;
}
}
i = strlen ( cg . spectatorList ) ;
if ( i ! = cg . spectatorLen ) {
cg . spectatorLen = i ;
cg . spectatorWidth = - 1 ;
}
}
2001-11-25 23:04:08 +00:00
/*
2001-05-06 20:50:27 +00:00
= = = = = = = = = = = = = = = = = = =
CG_RegisterClients
= = = = = = = = = = = = = = = = = = =
*/
2002-06-16 20:06:15 +00:00
static void CG_RegisterClients ( void )
{
int i , num = 0 ;
2001-05-06 20:50:27 +00:00
CG_LoadingClient ( cg . clientNum ) ;
CG_NewClientInfo ( cg . clientNum ) ;
2002-06-16 20:06:15 +00:00
for ( i = 0 ; i < MAX_CLIENTS ; i + + ) {
const char * clientInfo ;
clientInfo = CG_ConfigString ( CS_PLAYERS + i ) ;
if ( cg . clientNum ! = i & & clientInfo [ 0 ] )
num + + ;
2002-05-26 05:12:11 +00:00
}
2002-06-16 20:06:15 +00:00
for ( i = 0 ; i < MAX_CLIENTS ; i + + ) {
const char * clientInfo ;
2001-05-06 20:50:27 +00:00
if ( cg . clientNum = = i ) {
continue ;
}
2002-06-16 20:06:15 +00:00
clientInfo = CG_ConfigString ( CS_PLAYERS + i ) ;
if ( ! clientInfo [ 0 ] ) {
2001-05-06 20:50:27 +00:00
continue ;
}
2002-06-16 20:06:15 +00:00
CG_LoadingClient ( i ) ;
CG_NewClientInfo ( i ) ;
if ( num )
cg . loadingMapPercent + = ( 0.2f / ( float ) num ) ;
2001-05-06 20:50:27 +00:00
}
2002-06-16 20:06:15 +00:00
if ( ! num )
cg . loadingMapPercent + = 0.2f ;
2001-05-06 20:50:27 +00:00
CG_BuildSpectatorString ( ) ;
}
//===========================================================================
/*
= = = = = = = = = = = = = = = = =
CG_ConfigString
= = = = = = = = = = = = = = = = =
*/
2002-06-16 20:06:15 +00:00
const char * CG_ConfigString ( int index )
{
if ( index < 0 | | index > = MAX_CONFIGSTRINGS ) {
CG_Error ( " CG_ConfigString: bad index: %i " , index ) ;
2001-05-06 20:50:27 +00:00
}
2002-06-16 20:06:15 +00:00
return cgs . gameState . stringData + cgs . gameState . stringOffsets [ index ] ;
2001-05-06 20:50:27 +00:00
}
//==================================================================
/*
= = = = = = = = = = = = = = = = = = = = = =
CG_StartMusic
= = = = = = = = = = = = = = = = = = = = = =
*/
2002-06-16 20:06:15 +00:00
void CG_StartMusic ( void )
{
char * s ;
char parm1 [ MAX_QPATH ] , parm2 [ MAX_QPATH ] ;
2001-05-06 20:50:27 +00:00
// start the background music
2002-06-16 20:06:15 +00:00
s = ( char * ) CG_ConfigString ( CS_MUSIC ) ;
Q_strncpyz ( parm1 , COM_Parse ( & s ) , sizeof ( parm1 ) ) ;
Q_strncpyz ( parm2 , COM_Parse ( & s ) , sizeof ( parm2 ) ) ;
2001-05-06 20:50:27 +00:00
2002-06-16 20:06:15 +00:00
trap_S_StartBackgroundTrack ( parm1 , parm2 ) ;
2001-05-06 20:50:27 +00:00
}
2003-01-08 04:46:26 +00:00
static qboolean JB_FileExists ( const char * filename )
{
int len ;
2003-03-22 20:29:26 +00:00
char hack [ MAX_QPATH ] ;
2003-01-08 04:46:26 +00:00
2003-03-22 20:29:26 +00:00
Com_sprintf ( hack , MAX_QPATH , " %s " , filename ) ;
len = trap_FS_FOpenFile ( hack , 0 , FS_READ ) ;
if ( len > 0 )
2003-01-08 04:46:26 +00:00
return qtrue ;
2003-03-22 20:29:26 +00:00
Com_sprintf ( hack , MAX_QPATH , " %s.tga " , filename ) ;
len = trap_FS_FOpenFile ( hack , 0 , FS_READ ) ;
if ( len > 0 )
return qtrue ;
2003-01-08 04:46:26 +00:00
return qfalse ;
}
/*
= = = = = = = = = = = = = = = = =
CG_ReplaceModels
2003-02-05 20:21:38 +00:00
Routine by JBravo to replace world_models in bg_itemlist
2003-01-08 04:46:26 +00:00
= = = = = = = = = = = = = = = = =
*/
void CG_ReplaceModels ( void )
{
gitem_t * item ;
2003-03-28 10:36:03 +00:00
char str [ 256 ] ;
2003-03-29 15:04:03 +00:00
char * model , * skin ;
2003-01-08 04:46:26 +00:00
for ( item = bg_itemlist + 1 ; item - > classname ; item + + ) {
2003-03-10 01:32:35 +00:00
if ( ! strcmp ( item - > classname , " weapon_knife " ) ) {
2003-03-28 10:36:03 +00:00
trap_Cvar_VariableStringBuffer ( " cg_RQ3_knife " , str , sizeof ( str ) ) ;
2003-03-29 15:04:03 +00:00
model = modelFromStr ( str ) ;
skin = skinFromStr ( str ) ;
if ( strcmp ( model , " knife " ) ) {
Com_sprintf ( RQ3_knife_model , MAX_MODEL_LEN , " models/weapons2/%s/knife.md3 " , model ) ;
Com_sprintf ( RQ3_knife_icon , MAX_MODEL_LEN , " icons/iconw_%s " , model ) ;
2003-03-10 01:32:35 +00:00
if ( JB_FileExists ( RQ3_knife_model ) & & ( strlen ( RQ3_knife_model ) < MAX_MODEL_LEN ) ) {
bg_itemlist [ item - bg_itemlist ] . world_model [ 0 ] = ( char * ) & RQ3_knife_model ;
bg_itemlist [ item - bg_itemlist ] . icon = ( char * ) & RQ3_knife_icon ;
} else
2003-03-29 15:04:03 +00:00
CG_Printf ( " ^1Error loading knife replacement model %s \n " , model ) ;
2003-03-10 01:32:35 +00:00
}
2003-03-29 15:04:03 +00:00
if ( strcmp ( skin , " default " ) ) {
Com_sprintf ( RQ3_knife_icon , MAX_MODEL_LEN , " icons/iconw_%s " , skin ) ;
2003-03-10 01:32:35 +00:00
if ( JB_FileExists ( RQ3_knife_icon ) )
bg_itemlist [ item - bg_itemlist ] . icon = ( char * ) & RQ3_knife_icon ;
else
2003-03-29 15:04:03 +00:00
CG_Printf ( " ^1Error loading knife replacement icon %s \n " , skin ) ;
2003-01-08 04:46:26 +00:00
}
}
2003-03-10 01:32:35 +00:00
if ( ! strcmp ( item - > classname , " weapon_pistol " ) ) {
2003-03-28 10:36:03 +00:00
trap_Cvar_VariableStringBuffer ( " cg_RQ3_mk23 " , str , sizeof ( str ) ) ;
2003-03-29 15:04:03 +00:00
model = modelFromStr ( str ) ;
skin = skinFromStr ( str ) ;
if ( strcmp ( model , " mk23 " ) ) {
Com_sprintf ( RQ3_pistol_model , MAX_MODEL_LEN , " models/weapons2/%s/mk23.md3 " , model ) ;
Com_sprintf ( RQ3_pistol_icon , MAX_MODEL_LEN , " icons/iconw_%s " , model ) ;
2003-03-10 01:32:35 +00:00
if ( JB_FileExists ( RQ3_pistol_model ) & & ( strlen ( RQ3_pistol_model ) < MAX_MODEL_LEN ) ) {
bg_itemlist [ item - bg_itemlist ] . world_model [ 0 ] = ( char * ) & RQ3_pistol_model ;
bg_itemlist [ item - bg_itemlist ] . icon = ( char * ) & RQ3_pistol_icon ;
} else
2003-03-29 15:04:03 +00:00
CG_Printf ( " ^1Error loading pistol replacement model %s \n " , model ) ;
2003-03-10 01:32:35 +00:00
}
2003-03-29 15:04:03 +00:00
if ( strcmp ( skin , " default " ) ) {
Com_sprintf ( RQ3_pistol_icon , MAX_MODEL_LEN , " icons/iconw_%s " , skin ) ;
2003-03-10 01:32:35 +00:00
if ( JB_FileExists ( RQ3_pistol_icon ) )
bg_itemlist [ item - bg_itemlist ] . icon = ( char * ) & RQ3_pistol_icon ;
else
2003-03-29 15:04:03 +00:00
CG_Printf ( " ^1Error loading mk23 replacement icon %s \n " , skin ) ;
2003-01-08 04:46:26 +00:00
}
}
2003-03-10 01:32:35 +00:00
if ( ! strcmp ( item - > classname , " weapon_m4 " ) ) {
2003-03-28 10:36:03 +00:00
trap_Cvar_VariableStringBuffer ( " cg_RQ3_m4 " , str , sizeof ( str ) ) ;
2003-03-29 15:04:03 +00:00
model = modelFromStr ( str ) ;
skin = skinFromStr ( str ) ;
if ( strcmp ( model , " m4 " ) ) {
Com_sprintf ( RQ3_m4_model , MAX_MODEL_LEN , " models/weapons2/%s/m4.md3 " , model ) ;
Com_sprintf ( RQ3_m4_icon , MAX_MODEL_LEN , " icons/iconw_%s " , model ) ;
2003-03-10 01:32:35 +00:00
if ( JB_FileExists ( RQ3_m4_model ) & & ( strlen ( RQ3_m4_model ) < MAX_MODEL_LEN ) ) {
bg_itemlist [ item - bg_itemlist ] . world_model [ 0 ] = ( char * ) & RQ3_m4_model ;
bg_itemlist [ item - bg_itemlist ] . icon = ( char * ) & RQ3_m4_icon ;
} else
2003-03-29 15:04:03 +00:00
CG_Printf ( " ^1Error loading m4 replacement model %s \n " , model ) ;
2003-03-10 01:32:35 +00:00
}
2003-03-29 15:04:03 +00:00
if ( strcmp ( skin , " default " ) ) {
Com_sprintf ( RQ3_m4_icon , MAX_MODEL_LEN , " icons/iconw_%s " , skin ) ;
2003-03-10 01:32:35 +00:00
if ( JB_FileExists ( RQ3_m4_icon ) )
bg_itemlist [ item - bg_itemlist ] . icon = ( char * ) & RQ3_m4_icon ;
else
2003-03-29 15:04:03 +00:00
CG_Printf ( " ^1Error loading m4 replacement icon %s \n " , skin ) ;
2003-01-08 04:46:26 +00:00
}
}
2003-03-10 01:32:35 +00:00
if ( ! strcmp ( item - > classname , " weapon_ssg3000 " ) ) {
2003-03-28 10:36:03 +00:00
trap_Cvar_VariableStringBuffer ( " cg_RQ3_ssg3000 " , str , sizeof ( str ) ) ;
2003-03-29 15:04:03 +00:00
model = modelFromStr ( str ) ;
skin = skinFromStr ( str ) ;
if ( strcmp ( model , " ssg3000 " ) ) {
Com_sprintf ( RQ3_ssg3000_model , MAX_MODEL_LEN , " models/weapons2/%s/ssg3000.md3 " , model ) ;
Com_sprintf ( RQ3_ssg3000_icon , MAX_MODEL_LEN , " icons/iconw_%s " , model ) ;
2003-03-10 01:32:35 +00:00
if ( JB_FileExists ( RQ3_ssg3000_model ) & & ( strlen ( RQ3_ssg3000_model ) < MAX_MODEL_LEN ) ) {
bg_itemlist [ item - bg_itemlist ] . world_model [ 0 ] = ( char * ) & RQ3_ssg3000_model ;
bg_itemlist [ item - bg_itemlist ] . icon = ( char * ) & RQ3_ssg3000_icon ;
} else
2003-03-29 15:04:03 +00:00
CG_Printf ( " ^1Error loading ssg3000 replacement model %s \n " , model ) ;
2003-03-10 01:32:35 +00:00
}
2003-03-29 15:04:03 +00:00
if ( strcmp ( skin , " default " ) ) {
Com_sprintf ( RQ3_ssg3000_icon , MAX_MODEL_LEN , " icons/iconw_%s " , skin ) ;
2003-03-10 01:32:35 +00:00
if ( JB_FileExists ( RQ3_ssg3000_icon ) )
bg_itemlist [ item - bg_itemlist ] . icon = ( char * ) & RQ3_ssg3000_icon ;
else
2003-03-29 15:04:03 +00:00
CG_Printf ( " ^1Error loading ssg3000 replacement icon %s \n " , skin ) ;
2003-01-08 04:46:26 +00:00
}
}
2003-03-10 01:32:35 +00:00
if ( ! strcmp ( item - > classname , " weapon_mp5 " ) ) {
2003-03-28 10:36:03 +00:00
trap_Cvar_VariableStringBuffer ( " cg_RQ3_mp5 " , str , sizeof ( str ) ) ;
2003-03-29 15:04:03 +00:00
model = modelFromStr ( str ) ;
skin = skinFromStr ( str ) ;
if ( strcmp ( model , " mp5 " ) ) {
Com_sprintf ( RQ3_mp5_model , MAX_MODEL_LEN , " models/weapons2/%s/mp5.md3 " , model ) ;
Com_sprintf ( RQ3_mp5_icon , MAX_MODEL_LEN , " icons/iconw_%s " , model ) ;
2003-03-10 01:32:35 +00:00
if ( JB_FileExists ( RQ3_mp5_model ) & & ( strlen ( RQ3_mp5_model ) < MAX_MODEL_LEN ) ) {
bg_itemlist [ item - bg_itemlist ] . world_model [ 0 ] = ( char * ) & RQ3_mp5_model ;
bg_itemlist [ item - bg_itemlist ] . icon = ( char * ) & RQ3_mp5_icon ;
} else
2003-03-29 15:04:03 +00:00
CG_Printf ( " ^1Error loading mp5 replacement model \n " , model ) ;
2003-03-10 01:32:35 +00:00
}
2003-03-29 15:04:03 +00:00
if ( strcmp ( skin , " default " ) ) {
Com_sprintf ( RQ3_mp5_icon , MAX_MODEL_LEN , " icons/iconw_%s " , skin ) ;
2003-03-10 01:32:35 +00:00
if ( JB_FileExists ( RQ3_mp5_icon ) )
bg_itemlist [ item - bg_itemlist ] . icon = ( char * ) & RQ3_mp5_icon ;
else
2003-03-29 15:04:03 +00:00
CG_Printf ( " ^1Error loading mp5 replacement icon %s \n " , skin ) ;
2003-01-08 04:46:26 +00:00
}
}
2003-03-10 01:32:35 +00:00
if ( ! strcmp ( item - > classname , " weapon_handcannon " ) ) {
2003-03-28 10:36:03 +00:00
trap_Cvar_VariableStringBuffer ( " cg_RQ3_handcannon " , str , sizeof ( str ) ) ;
2003-03-29 15:04:03 +00:00
model = modelFromStr ( str ) ;
skin = skinFromStr ( str ) ;
if ( strcmp ( model , " handcannon " ) ) {
Com_sprintf ( RQ3_handcannon_model , MAX_MODEL_LEN , " models/weapons2/%s/handcannon.md3 " , model ) ;
Com_sprintf ( RQ3_handcannon_icon , MAX_MODEL_LEN , " icons/iconw_%s " , model ) ;
2003-03-10 01:32:35 +00:00
if ( JB_FileExists ( RQ3_handcannon_model ) & & ( strlen ( RQ3_handcannon_model ) < MAX_MODEL_LEN ) ) {
bg_itemlist [ item - bg_itemlist ] . world_model [ 0 ] = ( char * ) & RQ3_handcannon_model ;
bg_itemlist [ item - bg_itemlist ] . icon = ( char * ) & RQ3_handcannon_icon ;
} else
2003-03-29 15:04:03 +00:00
CG_Printf ( " ^1Error loading handcannon replacement model %s \n " , model ) ;
2003-03-10 01:32:35 +00:00
}
2003-03-29 15:04:03 +00:00
if ( strcmp ( skin , " default " ) ) {
Com_sprintf ( RQ3_handcannon_icon , MAX_MODEL_LEN , " icons/iconw_%s " , skin ) ;
2003-03-10 01:32:35 +00:00
if ( JB_FileExists ( RQ3_handcannon_icon ) )
bg_itemlist [ item - bg_itemlist ] . icon = ( char * ) & RQ3_handcannon_icon ;
else
2003-03-29 15:04:03 +00:00
CG_Printf ( " ^1Error loading handcannon replacement icon %s \n " , skin ) ;
2003-01-08 04:46:26 +00:00
}
}
2003-03-10 01:32:35 +00:00
if ( ! strcmp ( item - > classname , " weapon_m3 " ) ) {
2003-03-28 10:36:03 +00:00
trap_Cvar_VariableStringBuffer ( " cg_RQ3_m3 " , str , sizeof ( str ) ) ;
2003-03-29 15:04:03 +00:00
model = modelFromStr ( str ) ;
skin = skinFromStr ( str ) ;
if ( strcmp ( model , " m3 " ) ) {
Com_sprintf ( RQ3_m3_model , MAX_MODEL_LEN , " models/weapons2/%s/m3.md3 " , model ) ;
Com_sprintf ( RQ3_m3_icon , MAX_MODEL_LEN , " icons/iconw_%s " , model ) ;
2003-03-10 01:32:35 +00:00
if ( JB_FileExists ( RQ3_m3_model ) & & ( strlen ( RQ3_m3_model ) < MAX_MODEL_LEN ) ) {
bg_itemlist [ item - bg_itemlist ] . world_model [ 0 ] = ( char * ) & RQ3_m3_model ;
bg_itemlist [ item - bg_itemlist ] . icon = ( char * ) & RQ3_m3_icon ;
} else
2003-03-29 15:04:03 +00:00
CG_Printf ( " ^1Error loading m3 replacement model %s \n " , model ) ;
2003-03-10 01:32:35 +00:00
}
2003-03-29 15:04:03 +00:00
if ( strcmp ( skin , " default " ) ) {
Com_sprintf ( RQ3_m3_icon , MAX_MODEL_LEN , " icons/iconw_%s " , skin ) ;
2003-03-10 01:32:35 +00:00
if ( JB_FileExists ( RQ3_m3_icon ) )
bg_itemlist [ item - bg_itemlist ] . icon = ( char * ) & RQ3_m3_icon ;
else
2003-03-29 15:04:03 +00:00
CG_Printf ( " ^1Error loading m3 replacement icon %s \n " , skin ) ;
2003-01-08 04:46:26 +00:00
}
}
2003-03-10 01:32:35 +00:00
if ( ! strcmp ( item - > classname , " weapon_akimbo " ) ) {
2003-03-28 10:36:03 +00:00
trap_Cvar_VariableStringBuffer ( " cg_RQ3_akimbo " , str , sizeof ( str ) ) ;
2003-03-29 15:04:03 +00:00
model = modelFromStr ( str ) ;
skin = skinFromStr ( str ) ;
if ( strcmp ( model , " akimbo " ) ) {
Com_sprintf ( RQ3_akimbo_model , MAX_MODEL_LEN , " models/weapons2/%s/akimbo.md3 " , model ) ;
Com_sprintf ( RQ3_akimbo_icon , MAX_MODEL_LEN , " icons/iconw_%s " , model ) ;
2003-03-10 01:32:35 +00:00
if ( JB_FileExists ( RQ3_akimbo_model ) & & ( strlen ( RQ3_akimbo_model ) < MAX_MODEL_LEN ) ) {
bg_itemlist [ item - bg_itemlist ] . world_model [ 0 ] = ( char * ) & RQ3_akimbo_model ;
bg_itemlist [ item - bg_itemlist ] . icon = ( char * ) & RQ3_akimbo_icon ;
} else
2003-03-29 15:04:03 +00:00
CG_Printf ( " ^1Error loading akimbo replacement model %s \n " , model ) ;
2003-03-10 01:32:35 +00:00
}
2003-03-29 15:04:03 +00:00
if ( strcmp ( skin , " default " ) ) {
Com_sprintf ( RQ3_akimbo_icon , MAX_MODEL_LEN , " icons/iconw_%s " , skin ) ;
2003-03-10 01:32:35 +00:00
if ( JB_FileExists ( RQ3_akimbo_icon ) )
bg_itemlist [ item - bg_itemlist ] . icon = ( char * ) & RQ3_akimbo_icon ;
else
2003-03-29 15:04:03 +00:00
CG_Printf ( " ^1Error loading akimbo replacement icon %s \n " , skin ) ;
2003-01-08 04:46:26 +00:00
}
}
2003-03-10 01:32:35 +00:00
if ( ! strcmp ( item - > classname , " weapon_grenade " ) ) {
2003-03-28 10:36:03 +00:00
trap_Cvar_VariableStringBuffer ( " cg_RQ3_grenade " , str , sizeof ( str ) ) ;
2003-03-29 15:04:03 +00:00
model = modelFromStr ( str ) ;
skin = skinFromStr ( str ) ;
if ( strcmp ( model , " grenade " ) ) {
Com_sprintf ( RQ3_grenade_model , MAX_MODEL_LEN , " models/weapons2/%s/grenade.md3 " , model ) ;
Com_sprintf ( RQ3_grenade_icon , MAX_MODEL_LEN , " icons/iconw_%s " , model ) ;
2003-03-10 01:32:35 +00:00
if ( JB_FileExists ( RQ3_grenade_model ) & & ( strlen ( RQ3_grenade_model ) < MAX_MODEL_LEN ) ) {
bg_itemlist [ item - bg_itemlist ] . world_model [ 0 ] = ( char * ) & RQ3_grenade_model ;
bg_itemlist [ item - bg_itemlist ] . icon = ( char * ) & RQ3_grenade_icon ;
} else
2003-03-29 15:04:03 +00:00
CG_Printf ( " ^1Error loading grenade replacement model %s \n " , model ) ;
2003-03-10 01:32:35 +00:00
}
2003-03-29 15:04:03 +00:00
if ( strcmp ( skin , " default " ) ) {
Com_sprintf ( RQ3_grenade_icon , MAX_MODEL_LEN , " icons/iconw_%s " , skin ) ;
2003-03-10 01:32:35 +00:00
if ( JB_FileExists ( RQ3_grenade_icon ) )
bg_itemlist [ item - bg_itemlist ] . icon = ( char * ) & RQ3_grenade_icon ;
else
2003-03-29 15:04:03 +00:00
CG_Printf ( " ^1Error loading grenade replacement icon %s \n " , skin ) ;
2003-01-08 04:46:26 +00:00
}
}
2003-03-28 10:36:03 +00:00
if ( ! strcmp ( item - > classname , " item_kevlar " ) ) {
trap_Cvar_VariableStringBuffer ( " cg_RQ3_kevlar " , str , sizeof ( str ) ) ;
2003-03-29 15:04:03 +00:00
model = modelFromStr ( str ) ;
skin = skinFromStr ( str ) ;
if ( strcmp ( model , " kevlar " ) ) {
Com_sprintf ( RQ3_kevlar_model , MAX_MODEL_LEN , " models/items/%s.md3 " , model ) ;
Com_sprintf ( RQ3_kevlar_icon , MAX_MODEL_LEN , " icons/iconi_%s " , model ) ;
2003-03-28 10:36:03 +00:00
if ( JB_FileExists ( RQ3_kevlar_model ) & & ( strlen ( RQ3_kevlar_model ) < MAX_MODEL_LEN ) ) {
bg_itemlist [ item - bg_itemlist ] . world_model [ 0 ] = ( char * ) & RQ3_kevlar_model ;
2003-03-22 20:19:20 +00:00
bg_itemlist [ item - bg_itemlist ] . icon = ( char * ) & RQ3_kevlar_icon ;
2003-03-28 10:36:03 +00:00
} else
2003-03-29 15:04:03 +00:00
CG_Printf ( " ^1Error loading kevlar replacement model %s \n " , model ) ;
}
if ( strcmp ( skin , " default " ) ) {
Com_sprintf ( RQ3_kevlar_icon , MAX_MODEL_LEN , " icons/iconi_%s " , skin ) ;
if ( JB_FileExists ( RQ3_kevlar_icon ) )
bg_itemlist [ item - bg_itemlist ] . icon = ( char * ) & RQ3_kevlar_icon ;
else
CG_Printf ( " ^1Error loading kevlar replacement icon %s \n " , skin ) ;
2003-02-01 02:15:31 +00:00
}
}
2003-03-28 10:36:03 +00:00
if ( ! strcmp ( item - > classname , " item_silencer " ) ) {
trap_Cvar_VariableStringBuffer ( " cg_RQ3_silencer " , str , sizeof ( str ) ) ;
2003-03-29 15:04:03 +00:00
model = modelFromStr ( str ) ;
skin = skinFromStr ( str ) ;
if ( strcmp ( model , " silencer " ) ) {
Com_sprintf ( RQ3_silencer_model , MAX_MODEL_LEN , " models/items/%s.md3 " , model ) ;
Com_sprintf ( RQ3_silencer_icon , MAX_MODEL_LEN , " icons/iconi_%s " , model ) ;
2003-03-28 10:36:03 +00:00
if ( JB_FileExists ( RQ3_silencer_model ) & & ( strlen ( RQ3_silencer_model ) < MAX_MODEL_LEN ) ) {
bg_itemlist [ item - bg_itemlist ] . world_model [ 0 ] = ( char * ) & RQ3_silencer_model ;
2003-03-22 20:19:20 +00:00
bg_itemlist [ item - bg_itemlist ] . icon = ( char * ) & RQ3_silencer_icon ;
2003-03-28 10:36:03 +00:00
} else
2003-03-29 15:04:03 +00:00
CG_Printf ( " ^1Error loading silencer replacement model %s \n " , model ) ;
}
if ( strcmp ( skin , " default " ) ) {
Com_sprintf ( RQ3_silencer_icon , MAX_MODEL_LEN , " icons/iconi_%s " , skin ) ;
if ( JB_FileExists ( RQ3_silencer_icon ) )
bg_itemlist [ item - bg_itemlist ] . icon = ( char * ) & RQ3_silencer_icon ;
else
CG_Printf ( " ^1Error loading silencer replacement icon %s \n " , skin ) ;
2003-02-01 02:15:31 +00:00
}
}
2003-03-28 10:36:03 +00:00
if ( ! strcmp ( item - > classname , " item_laser " ) ) {
trap_Cvar_VariableStringBuffer ( " cg_RQ3_laser " , str , sizeof ( str ) ) ;
2003-03-29 15:04:03 +00:00
model = modelFromStr ( str ) ;
skin = skinFromStr ( str ) ;
if ( strcmp ( model , " laser " ) ) {
Com_sprintf ( RQ3_laser_model , MAX_MODEL_LEN , " models/items/%s.md3 " , model ) ;
Com_sprintf ( RQ3_laser_icon , MAX_MODEL_LEN , " icons/iconi_%s " , model ) ;
2003-03-28 10:36:03 +00:00
if ( JB_FileExists ( RQ3_laser_model ) & & ( strlen ( RQ3_laser_model ) < MAX_MODEL_LEN ) ) {
bg_itemlist [ item - bg_itemlist ] . world_model [ 0 ] = ( char * ) & RQ3_laser_model ;
2003-03-22 20:19:20 +00:00
bg_itemlist [ item - bg_itemlist ] . icon = ( char * ) & RQ3_laser_icon ;
2003-03-28 10:36:03 +00:00
} else
2003-03-29 15:04:03 +00:00
CG_Printf ( " ^1Error loading laser replacement model %s \n " , model ) ;
}
if ( strcmp ( skin , " default " ) ) {
Com_sprintf ( RQ3_laser_icon , MAX_MODEL_LEN , " icons/iconi_%s " , skin ) ;
if ( JB_FileExists ( RQ3_laser_icon ) )
bg_itemlist [ item - bg_itemlist ] . icon = ( char * ) & RQ3_laser_icon ;
else
CG_Printf ( " ^1Error loading laser replacement icon %s \n " , skin ) ;
2003-02-01 02:15:31 +00:00
}
}
2003-03-28 10:36:03 +00:00
if ( ! strcmp ( item - > classname , " item_bandolier " ) ) {
trap_Cvar_VariableStringBuffer ( " cg_RQ3_bandolier " , str , sizeof ( str ) ) ;
2003-03-29 15:04:03 +00:00
model = modelFromStr ( str ) ;
skin = skinFromStr ( str ) ;
if ( strcmp ( model , " bandolier " ) ) {
Com_sprintf ( RQ3_bandolier_model , MAX_MODEL_LEN , " models/items/%s.md3 " , model ) ;
Com_sprintf ( RQ3_bandolier_icon , MAX_MODEL_LEN , " icons/iconi_%s " , model ) ;
2003-03-28 10:36:03 +00:00
if ( JB_FileExists ( RQ3_bandolier_model ) & & ( strlen ( RQ3_bandolier_model ) < MAX_MODEL_LEN ) ) {
bg_itemlist [ item - bg_itemlist ] . world_model [ 0 ] = ( char * ) & RQ3_bandolier_model ;
2003-03-22 20:19:20 +00:00
bg_itemlist [ item - bg_itemlist ] . icon = ( char * ) & RQ3_bandolier_icon ;
2003-03-28 10:36:03 +00:00
} else
2003-03-29 15:04:03 +00:00
CG_Printf ( " ^1Error loading bandolier replacement model %s \n " , model ) ;
}
if ( strcmp ( skin , " default " ) ) {
Com_sprintf ( RQ3_bandolier_icon , MAX_MODEL_LEN , " icons/iconi_%s " , skin ) ;
if ( JB_FileExists ( RQ3_bandolier_icon ) )
bg_itemlist [ item - bg_itemlist ] . icon = ( char * ) & RQ3_bandolier_icon ;
else
CG_Printf ( " ^1Error loading bandolier replacement icon %s \n " , skin ) ;
2003-02-01 02:15:31 +00:00
}
}
2003-03-28 10:36:03 +00:00
if ( ! strcmp ( item - > classname , " item_slippers " ) ) {
trap_Cvar_VariableStringBuffer ( " cg_RQ3_slippers " , str , sizeof ( str ) ) ;
2003-03-29 15:04:03 +00:00
model = modelFromStr ( str ) ;
skin = skinFromStr ( str ) ;
if ( strcmp ( model , " slippers " ) ) {
Com_sprintf ( RQ3_slippers_model , MAX_MODEL_LEN , " models/items/%s.md3 " , model ) ;
Com_sprintf ( RQ3_slippers_icon , MAX_MODEL_LEN , " icons/iconi_%s " , model ) ;
2003-03-28 10:36:03 +00:00
if ( JB_FileExists ( RQ3_slippers_model ) & & ( strlen ( RQ3_slippers_model ) < MAX_MODEL_LEN ) ) {
bg_itemlist [ item - bg_itemlist ] . world_model [ 0 ] = ( char * ) & RQ3_slippers_model ;
2003-03-22 20:19:20 +00:00
bg_itemlist [ item - bg_itemlist ] . icon = ( char * ) & RQ3_slippers_icon ;
2003-03-28 10:36:03 +00:00
} else
2003-03-29 15:04:03 +00:00
CG_Printf ( " ^1Error loading slippers replacement model %s \n " , model ) ;
}
if ( strcmp ( skin , " default " ) ) {
Com_sprintf ( RQ3_slippers_icon , MAX_MODEL_LEN , " icons/iconi_%s " , skin ) ;
if ( JB_FileExists ( RQ3_slippers_icon ) )
bg_itemlist [ item - bg_itemlist ] . icon = ( char * ) & RQ3_slippers_icon ;
else
CG_Printf ( " ^1Error loading slippers replacement icon %s \n " , skin ) ;
2003-02-01 02:15:31 +00:00
}
}
2003-03-28 10:36:03 +00:00
if ( ! strcmp ( item - > classname , " item_helmet " ) ) {
trap_Cvar_VariableStringBuffer ( " cg_RQ3_helmet " , str , sizeof ( str ) ) ;
2003-03-29 15:04:03 +00:00
model = modelFromStr ( str ) ;
skin = skinFromStr ( str ) ;
if ( strcmp ( model , " helmet " ) ) {
Com_sprintf ( RQ3_helmet_model , MAX_MODEL_LEN , " models/items/%s.md3 " , model ) ;
Com_sprintf ( RQ3_helmet_icon , MAX_MODEL_LEN , " icons/iconi_%s " , model ) ;
2003-03-28 10:36:03 +00:00
if ( JB_FileExists ( RQ3_helmet_model ) & & ( strlen ( RQ3_helmet_model ) < MAX_MODEL_LEN ) ) {
bg_itemlist [ item - bg_itemlist ] . world_model [ 0 ] = ( char * ) & RQ3_helmet_model ;
2003-03-22 20:19:20 +00:00
bg_itemlist [ item - bg_itemlist ] . icon = ( char * ) & RQ3_helmet_icon ;
2003-03-28 10:36:03 +00:00
} else
2003-03-29 15:04:03 +00:00
CG_Printf ( " ^1Error loading helmet replacement model %s \n " , model ) ;
}
if ( strcmp ( skin , " default " ) ) {
Com_sprintf ( RQ3_helmet_icon , MAX_MODEL_LEN , " icons/iconi_%s " , skin ) ;
if ( JB_FileExists ( RQ3_helmet_icon ) )
bg_itemlist [ item - bg_itemlist ] . icon = ( char * ) & RQ3_helmet_icon ;
else
CG_Printf ( " ^1Error loading helmet replacement icon %s \n " , skin ) ;
2003-02-01 02:15:31 +00:00
}
}
2003-03-28 10:36:03 +00:00
if ( ! strcmp ( item - > classname , " ammo_mk23 " ) ) {
trap_Cvar_VariableStringBuffer ( " cg_RQ3_ammo_mk23 " , str , sizeof ( str ) ) ;
2003-03-29 15:04:03 +00:00
model = modelFromStr ( str ) ;
skin = skinFromStr ( str ) ;
if ( strcmp ( model , " mk23 " ) ) {
Com_sprintf ( RQ3_ammo_mk23_model , MAX_MODEL_LEN , " models/ammo/%s.md3 " , model ) ;
Com_sprintf ( RQ3_ammo_mk23_icon , MAX_MODEL_LEN , " icons/icona_%s " , model ) ;
2003-03-28 10:36:03 +00:00
if ( JB_FileExists ( RQ3_ammo_mk23_model ) & & ( strlen ( RQ3_ammo_mk23_model ) < MAX_MODEL_LEN ) ) {
bg_itemlist [ item - bg_itemlist ] . world_model [ 0 ] = ( char * ) & RQ3_ammo_mk23_model ;
bg_itemlist [ item - bg_itemlist ] . icon = ( char * ) & RQ3_ammo_mk23_icon ;
} else
2003-03-29 15:04:03 +00:00
CG_Printf ( " ^1Error loading mk23 ammo replacement model %s \n " , model ) ;
}
if ( strcmp ( skin , " default " ) ) {
Com_sprintf ( RQ3_ammo_mk23_icon , MAX_MODEL_LEN , " icons/icona_%s " , skin ) ;
if ( JB_FileExists ( RQ3_ammo_mk23_icon ) )
bg_itemlist [ item - bg_itemlist ] . icon = ( char * ) & RQ3_ammo_mk23_icon ;
else
CG_Printf ( " ^1Error loading mk23 ammo replacement icon %s \n " , skin ) ;
2003-03-28 10:36:03 +00:00
}
2003-02-27 08:10:20 +00:00
}
2003-03-28 10:36:03 +00:00
if ( ! strcmp ( item - > classname , " ammo_shells " ) ) {
trap_Cvar_VariableStringBuffer ( " cg_RQ3_ammo_shells " , str , sizeof ( str ) ) ;
2003-03-29 15:04:03 +00:00
model = modelFromStr ( str ) ;
skin = skinFromStr ( str ) ;
if ( strcmp ( model , " shells " ) ) {
Com_sprintf ( RQ3_ammo_shells_model , MAX_MODEL_LEN , " models/ammo/%s.md3 " , model ) ;
Com_sprintf ( RQ3_ammo_shells_icon , MAX_MODEL_LEN , " icons/icona_%s " , model ) ;
2003-03-28 10:36:03 +00:00
if ( JB_FileExists ( RQ3_ammo_shells_model ) & & ( strlen ( RQ3_ammo_shells_model ) < MAX_MODEL_LEN ) ) {
bg_itemlist [ item - bg_itemlist ] . world_model [ 0 ] = ( char * ) & RQ3_ammo_shells_model ;
bg_itemlist [ item - bg_itemlist ] . icon = ( char * ) & RQ3_ammo_shells_icon ;
} else
2003-03-29 15:04:03 +00:00
CG_Printf ( " ^1Error loading shells ammo replacement model %s \n " , model ) ;
}
if ( strcmp ( skin , " default " ) ) {
Com_sprintf ( RQ3_ammo_shells_icon , MAX_MODEL_LEN , " icons/icona_%s " , skin ) ;
if ( JB_FileExists ( RQ3_ammo_shells_icon ) )
bg_itemlist [ item - bg_itemlist ] . icon = ( char * ) & RQ3_ammo_shells_icon ;
else
CG_Printf ( " ^1Error loading shells ammo replacement icon %s \n " , skin ) ;
2003-02-27 08:10:20 +00:00
}
}
2003-03-28 10:36:03 +00:00
if ( ! strcmp ( item - > classname , " ammo_ssg3000 " ) ) {
trap_Cvar_VariableStringBuffer ( " cg_RQ3_ammo_ssg3000 " , str , sizeof ( str ) ) ;
2003-03-29 15:04:03 +00:00
model = modelFromStr ( str ) ;
skin = skinFromStr ( str ) ;
if ( strcmp ( model , " ssg3000 " ) ) {
Com_sprintf ( RQ3_ammo_ssg3000_model , MAX_MODEL_LEN , " models/ammo/%s.md3 " , model ) ;
Com_sprintf ( RQ3_ammo_ssg3000_icon , MAX_MODEL_LEN , " icons/icona_%s " , model ) ;
2003-03-28 10:36:03 +00:00
if ( JB_FileExists ( RQ3_ammo_ssg3000_model ) & & ( strlen ( RQ3_ammo_ssg3000_model ) < MAX_MODEL_LEN ) ) {
bg_itemlist [ item - bg_itemlist ] . world_model [ 0 ] = ( char * ) & RQ3_ammo_ssg3000_model ;
bg_itemlist [ item - bg_itemlist ] . icon = ( char * ) & RQ3_ammo_ssg3000_icon ;
} else
2003-03-29 15:04:03 +00:00
CG_Printf ( " ^1Error loading ssg3000 ammo replacement model %s \n " , model ) ;
}
if ( strcmp ( skin , " default " ) ) {
Com_sprintf ( RQ3_ammo_ssg3000_icon , MAX_MODEL_LEN , " icons/icona_%s " , skin ) ;
if ( JB_FileExists ( RQ3_ammo_ssg3000_icon ) )
bg_itemlist [ item - bg_itemlist ] . icon = ( char * ) & RQ3_ammo_ssg3000_icon ;
else
CG_Printf ( " ^1Error loading ssg3000 ammo replacement icon %s \n " , skin ) ;
2003-02-27 08:10:20 +00:00
}
}
2003-03-28 10:36:03 +00:00
if ( ! strcmp ( item - > classname , " ammo_mp5 " ) ) {
trap_Cvar_VariableStringBuffer ( " cg_RQ3_ammo_mp5 " , str , sizeof ( str ) ) ;
2003-03-29 15:04:03 +00:00
model = modelFromStr ( str ) ;
skin = skinFromStr ( str ) ;
if ( strcmp ( model , " mp5 " ) ) {
Com_sprintf ( RQ3_ammo_mp5_model , MAX_MODEL_LEN , " models/ammo/%s.md3 " , model ) ;
Com_sprintf ( RQ3_ammo_mp5_icon , MAX_MODEL_LEN , " icons/icona_%s " , model ) ;
2003-03-28 10:36:03 +00:00
if ( JB_FileExists ( RQ3_ammo_mp5_model ) & & ( strlen ( RQ3_ammo_mp5_model ) < MAX_MODEL_LEN ) ) {
bg_itemlist [ item - bg_itemlist ] . world_model [ 0 ] = ( char * ) & RQ3_ammo_mp5_model ;
bg_itemlist [ item - bg_itemlist ] . icon = ( char * ) & RQ3_ammo_mp5_icon ;
} else
2003-03-29 15:04:03 +00:00
CG_Printf ( " ^1Error loading mp5 ammo replacement model %s \n " , model ) ;
}
if ( strcmp ( skin , " default " ) ) {
Com_sprintf ( RQ3_ammo_mp5_icon , MAX_MODEL_LEN , " icons/icona_%s " , skin ) ;
if ( JB_FileExists ( RQ3_ammo_mp5_icon ) )
bg_itemlist [ item - bg_itemlist ] . icon = ( char * ) & RQ3_ammo_mp5_icon ;
else
CG_Printf ( " ^1Error loading mp5 ammo replacement icon %s \n " , skin ) ;
2003-02-27 08:10:20 +00:00
}
}
2003-03-28 10:36:03 +00:00
if ( ! strcmp ( item - > classname , " ammo_m4 " ) ) {
trap_Cvar_VariableStringBuffer ( " cg_RQ3_ammo_m4 " , str , sizeof ( str ) ) ;
2003-03-29 15:04:03 +00:00
model = modelFromStr ( str ) ;
skin = skinFromStr ( str ) ;
if ( strcmp ( model , " m4 " ) ) {
Com_sprintf ( RQ3_ammo_m4_model , MAX_MODEL_LEN , " models/ammo/%s.md3 " , model ) ;
Com_sprintf ( RQ3_ammo_m4_icon , MAX_MODEL_LEN , " icons/icona_%s " , model ) ;
2003-03-28 10:36:03 +00:00
if ( JB_FileExists ( RQ3_ammo_m4_model ) & & ( strlen ( RQ3_ammo_m4_model ) < MAX_MODEL_LEN ) ) {
bg_itemlist [ item - bg_itemlist ] . world_model [ 0 ] = ( char * ) & RQ3_ammo_m4_model ;
bg_itemlist [ item - bg_itemlist ] . icon = ( char * ) & RQ3_ammo_m4_icon ;
} else
2003-03-29 15:04:03 +00:00
CG_Printf ( " ^1Error loading m4 ammo replacement model %s \n " , model ) ;
}
if ( strcmp ( skin , " default " ) ) {
Com_sprintf ( RQ3_ammo_m4_icon , MAX_MODEL_LEN , " icons/icona_%s " , skin ) ;
if ( JB_FileExists ( RQ3_ammo_m4_icon ) )
bg_itemlist [ item - bg_itemlist ] . icon = ( char * ) & RQ3_ammo_m4_icon ;
else
CG_Printf ( " ^1Error loading m4 ammo replacement icon %s \n " , skin ) ;
2003-02-27 08:10:20 +00:00
}
}
2003-01-08 04:46:26 +00:00
}
}
2001-05-06 20:50:27 +00:00
/*
= = = = = = = = = = = = = = = = =
CG_Init
Called after every level change or subsystem restart
Will perform callbacks to make the loading info screen update .
= = = = = = = = = = = = = = = = =
*/
2002-06-16 20:06:15 +00:00
void CG_Init ( int serverMessageNum , int serverCommandSequence , int clientNum )
{
const char * s ;
2001-05-06 20:50:27 +00:00
// clear everything
2002-06-16 20:06:15 +00:00
memset ( & cgs , 0 , sizeof ( cgs ) ) ;
memset ( & cg , 0 , sizeof ( cg ) ) ;
memset ( cg_entities , 0 , sizeof ( cg_entities ) ) ;
memset ( cg_weapons , 0 , sizeof ( cg_weapons ) ) ;
memset ( cg_items , 0 , sizeof ( cg_items ) ) ;
2001-05-06 20:50:27 +00:00
cg . clientNum = clientNum ;
cgs . processedSnapshotNum = serverMessageNum ;
cgs . serverCommandSequence = serverCommandSequence ;
// load a few needed things before we do any screen updates
2002-06-16 20:06:15 +00:00
cgs . media . charsetShader = trap_R_RegisterShader ( " gfx/2d/bigchars " ) ;
cgs . media . whiteShader = trap_R_RegisterShader ( " white " ) ;
cgs . media . charsetProp = trap_R_RegisterShaderNoMip ( " menu/art/font1_prop.tga " ) ;
cgs . media . charsetPropGlow = trap_R_RegisterShaderNoMip ( " menu/art/font1_prop_glo.tga " ) ;
cgs . media . charsetPropB = trap_R_RegisterShaderNoMip ( " menu/art/font2_prop.tga " ) ;
2001-05-06 20:50:27 +00:00
CG_RegisterCvars ( ) ;
2003-01-08 04:46:26 +00:00
CG_ReplaceModels ( ) ;
2001-05-06 20:50:27 +00:00
CG_InitConsoleCommands ( ) ;
//Blaze: Default weapon = Pistol
cg . weaponSelect = WP_PISTOL ;
2002-06-16 20:06:15 +00:00
cgs . redflag = cgs . blueflag = - 1 ; // For compatibily, default to unset for
2001-05-06 20:50:27 +00:00
cgs . flagStatus = - 1 ;
// old servers
// get the rendering configuration from the client system
2002-06-16 20:06:15 +00:00
trap_GetGlconfig ( & cgs . glconfig ) ;
2001-05-06 20:50:27 +00:00
cgs . screenXScale = cgs . glconfig . vidWidth / 640.0 ;
cgs . screenYScale = cgs . glconfig . vidHeight / 480.0 ;
// get the gamestate from the client system
2002-06-16 20:06:15 +00:00
trap_GetGameState ( & cgs . gameState ) ;
2001-05-06 20:50:27 +00:00
// check version
2002-06-16 20:06:15 +00:00
s = CG_ConfigString ( CS_GAME_VERSION ) ;
if ( strcmp ( s , GAME_VERSION ) ) {
CG_Error ( " Client/Server game mismatch: %s/%s " , GAME_VERSION , s ) ;
2001-05-06 20:50:27 +00:00
}
2002-06-16 20:06:15 +00:00
s = CG_ConfigString ( CS_LEVEL_START_TIME ) ;
cgs . levelStartTime = atoi ( s ) ;
2001-05-06 20:50:27 +00:00
CG_ParseServerinfo ( ) ;
// load the new map
2002-06-16 20:06:15 +00:00
CG_LoadingString ( " collision map " ) ;
2001-05-06 20:50:27 +00:00
2002-06-16 20:06:15 +00:00
trap_CM_LoadMap ( cgs . mapname ) ;
2001-05-06 20:50:27 +00:00
2002-06-16 20:06:15 +00:00
cg . loading = qtrue ; // force players to load instead of defer
2001-05-06 20:50:27 +00:00
2002-06-16 20:06:15 +00:00
CG_LoadingString ( " sounds " ) ;
2001-05-06 20:50:27 +00:00
CG_RegisterSounds ( ) ;
2002-05-26 05:12:11 +00:00
cg . loadingMapPercent + = 0.05f ;
2001-05-06 20:50:27 +00:00
2002-06-16 20:06:15 +00:00
CG_LoadingString ( " graphics " ) ;
2001-05-06 20:50:27 +00:00
CG_RegisterGraphics ( ) ;
2002-05-26 05:12:11 +00:00
//Blaze: Load breakables
2002-06-16 20:06:15 +00:00
CG_LoadingString ( " breakables " ) ;
2002-05-25 07:12:34 +00:00
2002-05-26 05:12:11 +00:00
CG_RegisterBreakables ( ) ;
2002-05-25 07:12:34 +00:00
2002-06-16 20:06:15 +00:00
CG_LoadingString ( " clients " ) ;
2001-05-06 20:50:27 +00:00
2002-06-16 20:06:15 +00:00
CG_RegisterClients ( ) ; // if low on memory, some clients will be deferred
2001-05-06 20:50:27 +00:00
2002-03-07 14:51:57 +00:00
//Makro - this should be moved out of missionpack eventually
2002-06-16 19:12:52 +00:00
# ifdef MAKROMISSIONPACK
2002-06-16 20:06:15 +00:00
CG_LoadingString ( " hud menu " ) ;
2001-05-06 20:50:27 +00:00
CG_AssetCache ( ) ;
2002-06-16 20:06:15 +00:00
CG_LoadHudMenu ( ) ; // load new hud stuff
2001-05-06 20:50:27 +00:00
# endif
cg . loading = qfalse ; // future players will be deferred
CG_InitLocalEntities ( ) ;
CG_InitMarkPolys ( ) ;
// remove the last loading update
cg . infoScreenText [ 0 ] = 0 ;
// Make sure we have update values (scores)
CG_SetConfigValues ( ) ;
CG_StartMusic ( ) ;
2002-06-16 20:06:15 +00:00
CG_LoadingString ( " " ) ;
2001-05-06 20:50:27 +00:00
CG_ShaderStateChanged ( ) ;
2002-06-16 20:06:15 +00:00
trap_S_ClearLoopingSounds ( qtrue ) ;
2002-06-12 15:30:24 +00:00
//Slicer: For the anti-cheat system
2002-06-12 22:32:24 +00:00
//trap_Cvar_Set("cg_RQ3_Auth","0");
trap_SendClientCommand ( " SendCheatCvars " ) ;
2001-05-06 20:50:27 +00:00
}
/*
= = = = = = = = = = = = = = = = =
CG_Shutdown
Called before every level change or subsystem restart
= = = = = = = = = = = = = = = = =
*/
2002-06-16 20:06:15 +00:00
void CG_Shutdown ( void )
{
2001-05-06 20:50:27 +00:00
// some mods may need to do cleanup work here,
// like closing files or archiving session data
}
/*
= = = = = = = = = = = = = = = = = =
CG_EventHandling
= = = = = = = = = = = = = = = = = =
type 0 - no event handling
1 - team menu
2 - hud editor
*/
2002-06-16 20:06:15 +00:00
void CG_EventHandling ( int type )
{
2001-05-06 20:50:27 +00:00
}
2002-06-16 20:06:15 +00:00
void CG_KeyEvent ( int key , qboolean down )
{
2001-07-09 00:32:10 +00:00
//Elder: Let's see what we're pressing
//CG_Printf("Key: %i, isDown: %d\n", key, down);
2001-05-06 20:50:27 +00:00
}
2002-06-16 20:06:15 +00:00
void CG_MouseEvent ( int x , int y )
{
2001-05-06 20:50:27 +00:00
}