diff --git a/code/cgame/cg_parsemsg.cpp b/code/cgame/cg_parsemsg.cpp index d87f04d4..a8053a3c 100644 --- a/code/cgame/cg_parsemsg.cpp +++ b/code/cgame/cg_parsemsg.cpp @@ -541,7 +541,7 @@ void CG_ParseCGMessage() // get the integer as string snprintf(cTmp, sizeof(cTmp), "%d", iLarge); - if (iType == 23) { + if (iType == 26) { sEffect = "models/fx/crates/debris_"; } else { diff --git a/code/game/barrels.cpp b/code/game/barrels.cpp index b1f804ce..368b28b4 100644 --- a/code/game/barrels.cpp +++ b/code/game/barrels.cpp @@ -238,11 +238,11 @@ void BarrelObject::BarrelThink if( m_iBarrelType == BARREL_OIL ) { - gi.MSG_StartCGM( 15 ); + gi.MSG_StartCGM(CGM_MAKE_EFFECT_1); } else { - gi.MSG_StartCGM( 19 ); + gi.MSG_StartCGM(CGM_MAKE_EFFECT_5); } m_fFluidAmount -= 1.0f; @@ -254,11 +254,11 @@ void BarrelObject::BarrelThink if( m_iBarrelType == BARREL_OIL ) { - gi.MSG_StartCGM( 16 ); + gi.MSG_StartCGM(CGM_MAKE_EFFECT_2); } else { - gi.MSG_StartCGM( 20 ); + gi.MSG_StartCGM(CGM_MAKE_EFFECT_6); } m_fFluidAmount -= 0.75f; @@ -271,11 +271,11 @@ void BarrelObject::BarrelThink if( m_iBarrelType == BARREL_OIL ) { - gi.MSG_StartCGM( 17 ); + gi.MSG_StartCGM(CGM_MAKE_EFFECT_3); } else { - gi.MSG_StartCGM( 21 ); + gi.MSG_StartCGM(CGM_MAKE_EFFECT_7); } m_fFluidAmount -= 0.5f; @@ -294,11 +294,11 @@ void BarrelObject::BarrelThink if( m_iBarrelType == BARREL_OIL ) { - gi.MSG_StartCGM( 17 ); + gi.MSG_StartCGM(CGM_MAKE_EFFECT_3); } else { - gi.MSG_StartCGM( 21 ); + gi.MSG_StartCGM(CGM_MAKE_EFFECT_7); } gi.MSG_WriteCoord( m_vLeaks[ i ][ 0 ] ); @@ -506,18 +506,18 @@ void BarrelObject::BarrelDamaged gi.SetBroadcastVisible( vHitPos, vHitPos ); if( m_iBarrelType == BARREL_OIL ) - gi.MSG_StartCGM( 18 ); + gi.MSG_StartCGM(CGM_MAKE_EFFECT_4); else - gi.MSG_StartCGM( 22 ); + gi.MSG_StartCGM(CGM_MAKE_EFFECT_8); } else { gi.SetBroadcastVisible( vHitPos, vHitPos ); if( m_iBarrelType == BARREL_OIL ) - gi.MSG_StartCGM( 17 ); + gi.MSG_StartCGM(CGM_MAKE_EFFECT_3); else - gi.MSG_StartCGM( 21 ); + gi.MSG_StartCGM(CGM_MAKE_EFFECT_7); } gi.MSG_WriteCoord( vHitPos[ 0 ] ); diff --git a/code/game/bg_public.h b/code/game/bg_public.h index cd39a841..a341003b 100644 --- a/code/game/bg_public.h +++ b/code/game/bg_public.h @@ -707,6 +707,51 @@ enum vmAnim_e { VM_ANIM_IDLE_2, }; +enum cg_message_e { + CGM_NONE, + CGM_BULLET_1, + CGM_BULLET_2, + CGM_BULLET_3, + CGM_BULLET_4, + CGM_BULLET_5, + CGM_BULLET_6, + CGM_BULLET_7, + CGM_BULLET_8, + CGM_BULLET_9, + CGM_BULLET_10, + CGM_BULLET_11, + CGM_MELEE_IMPACT, + CGM_EXPLOSION_EFFECT_1, + CGM_EXPLOSION_EFFECT_2, + CGM_EXPLOSION_EFFECT_3, + CGM_EXPLOSION_EFFECT_4, + CGM_PADDING_1, + CGM_MAKE_EFFECT_1, + CGM_MAKE_EFFECT_2, + CGM_MAKE_EFFECT_3, + CGM_MAKE_EFFECT_4, + CGM_MAKE_EFFECT_5, + CGM_MAKE_EFFECT_6, + CGM_MAKE_EFFECT_7, + CGM_MAKE_EFFECT_8, + CGM_MAKE_CRATE_DEBRIS, + CGM_MAKE_WINDOW_DEBRIS, + CGM_BULLET_NO_BARREL_1, + CGM_BULLET_NO_BARREL_2, + CGM_HUDDRAW_SHADER, + CGM_HUDDRAW_ALIGN, + CGM_HUDDRAW_RECT, + CGM_HUDDRAW_VIRTUALSIZE, + CGM_HUDDRAW_COLOR, + CGM_HUDDRAW_ALPHA, + CGM_HUDDRAW_STRING, + CGM_HUDDRAW_FONT, + CGM_NOTIFY_KILL, + CGM_NOTIFY_HIT, + CGM_VOICE_CHAT, + CGM_UNKNOWN_1, +}; + #else enum vmAnim_e { @@ -727,8 +772,79 @@ enum vmAnim_e { VM_ANIM_DISABLED, }; +enum cg_message_e { + CGM_NONE, + CGM_BULLET_1, + CGM_BULLET_2, + CGM_BULLET_3, + CGM_BULLET_4, + CGM_BULLET_5, + CGM_BULLET_6, + CGM_BULLET_7, + CGM_BULLET_8, + CGM_BULLET_9, + CGM_BULLET_10, + CGM_MELEE_IMPACT, + CGM_EXPLOSION_EFFECT_1, + CGM_EXPLOSION_EFFECT_2, + CGM_PADDING_1, + CGM_MAKE_EFFECT_1, + CGM_MAKE_EFFECT_2, + CGM_MAKE_EFFECT_3, + CGM_MAKE_EFFECT_4, + CGM_MAKE_EFFECT_5, + CGM_MAKE_EFFECT_6, + CGM_MAKE_EFFECT_7, + CGM_MAKE_EFFECT_8, + CGM_MAKE_CRATE_DEBRIS, + CGM_MAKE_WINDOW_DEBRIS, + CGM_BULLET_NO_BARREL_1, + CGM_BULLET_NO_BARREL_2, + CGM_HUDDRAW_SHADER, + CGM_HUDDRAW_ALIGN, + CGM_HUDDRAW_RECT, + CGM_HUDDRAW_VIRTUALSIZE, + CGM_HUDDRAW_COLOR, + CGM_HUDDRAW_ALPHA, + CGM_HUDDRAW_STRING, + CGM_HUDDRAW_FONT, + CGM_NOTIFY_KILL, + CGM_NOTIFY_HIT, + CGM_VOICE_CHAT, +}; + #endif +/* +#define CGM_HUDDRAW_SHADER 27 +#define CGM_HUDDRAW_ALIGN 28 +#define CGM_HUDDRAW_RECT 29 +#define CGM_HUDDRAW_VIRTUALSIZE 30 +#define CGM_HUDDRAW_COLOR 31 +#define CGM_HUDDRAW_ALPHA 32 +#define CGM_HUDDRAW_STRING 33 +#define CGM_HUDDRAW_FONT 34 +#define CGM_HUDDRAW_TIMER 38 +#define CGM_HUDDRAW_3D 39 +#define CGM_HUDDRAW_BREAK3D 40 +#define CGM_HUDDRAW_FADE 41 +#define CGM_HUDDRAW_MOVE 42 +#define CGM_HUDDRAW_SCALE 43 +#define CGM_VIEWMODELANIM 44 +#define CGM_VIEWMODELPREFIX 45 +#define CGM_MODHEIGHTFLOAT 46 +#define CGM_SETVMASPEED 47 +#define CGM_HINTSTRING 48 +#define CGM_PLAYLOCALSOUND 49 +#define CGM_SETLOCALSOUNDRATE 50 +#define CGM_STOPLOCALSOUND 51 +#define CGM_HUDDRAW_RECTX 52 +#define CGM_HUDDRAW_RECTY 53 +#define CGM_HUDDRAW_RECTWH 54 +#define CGM_REPLICATION 55 +#define CGM_HUDDRAW_DELETE 56 +*/ + #ifdef __cplusplus } #endif diff --git a/code/game/crateobject.cpp b/code/game/crateobject.cpp index 6fca59fc..506be1a9 100644 --- a/code/game/crateobject.cpp +++ b/code/game/crateobject.cpp @@ -465,7 +465,7 @@ void CrateObject::CrateKilled // Tell clients around that a crate is destroyed gi.SetBroadcastVisible( origin, origin ); - gi.MSG_StartCGM( 23 ); + gi.MSG_StartCGM(CGM_MAKE_CRATE_DEBRIS); gi.MSG_WriteCoord( vCenter[ 0 ] ); gi.MSG_WriteCoord( vCenter[ 1 ] ); gi.MSG_WriteCoord( vCenter[ 2 ] ); diff --git a/code/game/entity.cpp b/code/game/entity.cpp index 59ed9445..0fc921c0 100644 --- a/code/game/entity.cpp +++ b/code/game/entity.cpp @@ -6912,12 +6912,15 @@ void Entity::ProcessHint(gentity_t* client, bool bShow) { if (sv_reborn->integer) { + // FIXME: delete + /* gi.MSG_SetClient(client - g_entities); // Send the hint string once gi.MSG_StartCGM(CGM_HINTSTRING); gi.MSG_WriteString(m_HintString); gi.MSG_EndCGM(); + */ } } else diff --git a/code/game/hud.cpp b/code/game/hud.cpp index 2a343356..0b63571c 100644 --- a/code/game/hud.cpp +++ b/code/game/hud.cpp @@ -503,6 +503,7 @@ Hud::~Hud() SetNon3D(); } + /* #ifdef GAME_DLL SetBroadcast(); @@ -510,6 +511,7 @@ Hud::~Hud() WriteNumber(); gi.MSG_EndCGM(); #endif +*/ hudElements.RemoveObject( this ); } @@ -952,7 +954,9 @@ void Hud::FadeOverTime( float time ) fade_alpha_start = alpha; fade_alpha_target = alpha; - + + // FIXME: delete + /* #ifdef GAME_DLL SetBroadcast(); @@ -961,6 +965,7 @@ void Hud::FadeOverTime( float time ) gi.MSG_WriteFloat( time ); gi.MSG_EndCGM(); #endif +*/ } void Hud::MoveOverTime( float time ) @@ -982,6 +987,7 @@ void Hud::MoveOverTime( float time ) fade_move_x_target = x; fade_move_y_target = y; + /* #ifdef GAME_DLL SetBroadcast(); @@ -990,6 +996,7 @@ void Hud::MoveOverTime( float time ) gi.MSG_WriteFloat( time ); gi.MSG_EndCGM(); #endif +*/ } void Hud::Refresh( int clientNumber ) @@ -1092,6 +1099,7 @@ void Hud::Refresh( int clientNumber ) { SetBroadcast(); + /* gi.MSG_StartCGM( CGM_HUDDRAW_3D ); WriteNumber(); gi.MSG_WriteCoord( org[ 0 ] ); @@ -1103,16 +1111,19 @@ void Hud::Refresh( int clientNumber ) gi.MSG_WriteBits( !!always_show, 1 ); gi.MSG_WriteBits( !!depth, 1 ); gi.MSG_EndCGM(); + */ } if( fade_alpha ) { SetBroadcast(); + /* gi.MSG_StartCGM( CGM_HUDDRAW_FADE ); WriteNumber(); gi.MSG_WriteFloat( fade_alpha_current ); gi.MSG_EndCGM(); + */ SetBroadcast(); @@ -1126,6 +1137,7 @@ void Hud::Refresh( int clientNumber ) { SetBroadcast(); + /* gi.MSG_StartCGM( CGM_HUDDRAW_MOVE ); WriteNumber(); gi.MSG_WriteFloat( fade_move_current ); @@ -1138,10 +1150,12 @@ void Hud::Refresh( int clientNumber ) gi.MSG_WriteShort( ( short )fade_move_x_target ); gi.MSG_WriteShort( ( short )fade_move_y_target ); gi.MSG_EndCGM(); + */ } if( fade_timer_flags & TIMER_ACTIVE ) { + /* SetBroadcast(); gi.MSG_StartCGM( CGM_HUDDRAW_TIMER ); @@ -1156,6 +1170,7 @@ void Hud::Refresh( int clientNumber ) } gi.MSG_EndCGM(); + */ } } #endif @@ -1182,7 +1197,8 @@ void Hud::ScaleOverTime( float time, short w, short h ) fade_scale_w_target = w; fade_scale_h_target = h; -#ifdef GAME_DLL + // FIXME: delete +/* width = w; height = h; @@ -1194,7 +1210,7 @@ void Hud::ScaleOverTime( float time, short w, short h ) gi.MSG_WriteShort( w ); gi.MSG_WriteShort( h ); gi.MSG_EndCGM(); -#endif +*/ } #ifdef GAME_DLL @@ -1235,6 +1251,7 @@ void Hud::Set3D( Vector vector_or_offset, qboolean alwaysOnScreen, qboolean hasD isDimensional = true; + /* #ifdef GAME_DLL SetBroadcast(); @@ -1250,19 +1267,20 @@ void Hud::Set3D( Vector vector_or_offset, qboolean alwaysOnScreen, qboolean hasD gi.MSG_WriteBits( !!hasDepth, 1 ); gi.MSG_EndCGM(); #endif +*/ } - void Hud::SetNon3D() { isDimensional = false; -#ifdef GAME_DLL + // FIXME? +/* SetBroadcast(); gi.MSG_StartCGM( CGM_HUDDRAW_BREAK3D ); WriteNumber(); gi.MSG_EndCGM(); -#endif +*/ } void Hud::SetAlignX( hudAlign_t align ) @@ -1418,29 +1436,18 @@ void Hud::SetRectX( short value ) #ifdef GAME_DLL SetBroadcast(); - if( sv_reborn->integer ) - { - gi.MSG_StartCGM( CGM_HUDDRAW_RECTX ); - WriteNumber(); - gi.MSG_WriteShort( ( short )value ); - gi.MSG_EndCGM(); - } - else - { - gi.MSG_StartCGM( CGM_HUDDRAW_RECT ); - WriteNumber(); - gi.MSG_WriteShort( ( short )fade_move_x_target ); - gi.MSG_WriteShort( ( short )fade_move_y_target ); - gi.MSG_WriteShort( ( short )width ); - gi.MSG_WriteShort( ( short )height ); - gi.MSG_EndCGM(); - } + gi.MSG_StartCGM(CGM_HUDDRAW_RECT); + WriteNumber(); + gi.MSG_WriteShort((short)fade_move_x_target); + gi.MSG_WriteShort((short)fade_move_y_target); + gi.MSG_WriteShort((short)width); + gi.MSG_WriteShort((short)height); + gi.MSG_EndCGM(); #endif } void Hud::SetRectY( short value ) { -//#ifdef CGAME_DLL if( fade_move_y_first ) { fade_move_y_target = value; @@ -1451,30 +1458,17 @@ void Hud::SetRectY( short value ) y = value; fade_move = false; } -//#else -// y = value; -//#endif #ifdef GAME_DLL SetBroadcast(); - if( sv_reborn->integer ) - { - gi.MSG_StartCGM( CGM_HUDDRAW_RECTY ); - WriteNumber(); - gi.MSG_WriteShort( ( short )value ); - gi.MSG_EndCGM(); - } - else - { - gi.MSG_StartCGM( CGM_HUDDRAW_RECT ); - WriteNumber(); - gi.MSG_WriteShort( ( short )fade_move_x_target ); - gi.MSG_WriteShort( ( short )fade_move_y_target ); - gi.MSG_WriteShort( ( short )width ); - gi.MSG_WriteShort( ( short )height ); - gi.MSG_EndCGM(); - } + gi.MSG_StartCGM(CGM_HUDDRAW_RECT); + WriteNumber(); + gi.MSG_WriteShort((short)fade_move_x_target); + gi.MSG_WriteShort((short)fade_move_y_target); + gi.MSG_WriteShort((short)width); + gi.MSG_WriteShort((short)height); + gi.MSG_EndCGM(); #endif } @@ -1519,24 +1513,13 @@ void Hud::SetShader( const char * s, float w, float h ) #ifdef GAME_DLL SetBroadcast(); - if( sv_reborn->integer ) - { - gi.MSG_StartCGM( CGM_HUDDRAW_RECTWH ); - WriteNumber(); - gi.MSG_WriteShort( ( short )width ); - gi.MSG_WriteShort( ( short )height ); - gi.MSG_EndCGM(); - } - else - { - gi.MSG_StartCGM( CGM_HUDDRAW_RECT ); - WriteNumber(); - gi.MSG_WriteShort( ( short )x ); - gi.MSG_WriteShort( ( short )y ); - gi.MSG_WriteShort( ( short )width ); - gi.MSG_WriteShort( ( short )height ); - gi.MSG_EndCGM(); - } + gi.MSG_StartCGM(CGM_HUDDRAW_RECT); + WriteNumber(); + gi.MSG_WriteShort((short)x); + gi.MSG_WriteShort((short)y); + gi.MSG_WriteShort((short)width); + gi.MSG_WriteShort((short)height); + gi.MSG_EndCGM(); SetBroadcast(); @@ -1586,7 +1569,8 @@ void Hud::SetTimer( float time, float fade_at_time ) fade_timer_flags = TIMER_ACTIVE; -#ifdef GAME_DLL + // FIXME... +/* SetBroadcast(); gi.MSG_StartCGM( CGM_HUDDRAW_TIMER ); @@ -1595,7 +1579,7 @@ void Hud::SetTimer( float time, float fade_at_time ) gi.MSG_WriteFloat( fade_at_time ); gi.MSG_WriteBits( 0, 1 ); gi.MSG_EndCGM(); -#endif +*/ } void Hud::SetTimerUp( float time, float fade_at_time ) @@ -1612,6 +1596,7 @@ void Hud::SetTimerUp( float time, float fade_at_time ) fade_timer_flags = TIMER_ACTIVE | TIMER_UP; + /* #ifdef GAME_DLL SetBroadcast(); @@ -1622,6 +1607,7 @@ void Hud::SetTimerUp( float time, float fade_at_time ) gi.MSG_WriteBits( 1, 1 ); gi.MSG_EndCGM(); #endif +*/ } void Hud::SetVirtualSize( qboolean v ) diff --git a/code/game/huddraw.cpp b/code/game/huddraw.cpp index 4b804d5c..9d4dc377 100644 --- a/code/game/huddraw.cpp +++ b/code/game/huddraw.cpp @@ -38,7 +38,7 @@ void HudWriteNumber( int num ) void HudDrawShader( int info, const char *name ) { gi.SetBroadcastAll(); - gi.MSG_StartCGM(0x1B); + gi.MSG_StartCGM(CGM_HUDDRAW_SHADER); HudWriteNumber( info ); // c = info gi.MSG_WriteString(name); // s = name (shader_name) gi.MSG_EndCGM(); @@ -47,7 +47,7 @@ void HudDrawShader( int info, const char *name ) void HudDrawAlign( int info, int horizontalAlign, int verticalAlign ) { gi.SetBroadcastAll(); - gi.MSG_StartCGM(0x1C); + gi.MSG_StartCGM(CGM_HUDDRAW_ALIGN); HudWriteNumber( info ); // c = probably "info" gi.MSG_WriteBits(horizontalAlign, 2); // value = 0,1,2 bits = 2 // 0 - left \ @@ -66,7 +66,7 @@ void HudDrawAlign( int info, int horizontalAlign, int verticalAlign ) void HudDrawRect(int info, int x, int y, int width, int height) { gi.SetBroadcastAll(); - gi.MSG_StartCGM(0x1D); + gi.MSG_StartCGM(CGM_HUDDRAW_RECT); HudWriteNumber( info ); // c = probably "info" gi.MSG_WriteShort(x); // c = probably "x" gi.MSG_WriteShort(y); // c = probably "y" @@ -79,7 +79,7 @@ void HudDrawRect(int info, int x, int y, int width, int height) void HudDrawVirtualSize(int info, int virtualScreen) { gi.SetBroadcastAll(); - gi.MSG_StartCGM(0x1E); + gi.MSG_StartCGM(CGM_HUDDRAW_VIRTUALSIZE); HudWriteNumber( info ); // c = info /*__asm @@ -116,7 +116,7 @@ void HudDrawColor(int info, float *color) gi.SetBroadcastAll(); - gi.MSG_StartCGM(0x1F); + gi.MSG_StartCGM(CGM_HUDDRAW_COLOR); HudWriteNumber( info ); // c = info gi.MSG_WriteByte(temp[0]); // c = color[2] gi.MSG_WriteByte(temp[1]); // c = color[1] - Values can be messed up. To be tested. @@ -132,7 +132,7 @@ void HudDrawAlpha(int info, float alpha) temp = (long int)(alpha*255.0f); gi.SetBroadcastAll(); - gi.MSG_StartCGM(0x20); + gi.MSG_StartCGM(CGM_HUDDRAW_ALPHA); HudWriteNumber( info ); // c = info gi.MSG_WriteByte(temp); // c = alpha gi.MSG_EndCGM(); @@ -144,7 +144,7 @@ void HudDrawAlpha(int info, float alpha) void HudDrawString(int info, const char *string) { gi.SetBroadcastAll(); - gi.MSG_StartCGM(0x21); + gi.MSG_StartCGM(CGM_HUDDRAW_STRING); HudWriteNumber( info ); // c = info gi.MSG_WriteString(string); // s = string (to show) gi.MSG_EndCGM(); @@ -154,7 +154,7 @@ void HudDrawString(int info, const char *string) void HudDrawFont(int info, const char *fontName) { gi.SetBroadcastAll(); - gi.MSG_StartCGM(0x22); + gi.MSG_StartCGM(CGM_HUDDRAW_FONT); HudWriteNumber( info ); // c = info gi.MSG_WriteString(fontName); // s = fontName (to use) gi.MSG_EndCGM(); @@ -163,6 +163,8 @@ void HudDrawFont(int info, const char *fontName) void HudDraw3d( int index, vec3_t vector, int ent_num, qboolean bAlwaysShow, qboolean depth ) { + // FIXME... + /* gi.SetBroadcastAll(); gi.MSG_StartCGM( CGM_HUDDRAW_3D ); @@ -176,10 +178,12 @@ void HudDraw3d( int index, vec3_t vector, int ent_num, qboolean bAlwaysShow, qbo gi.MSG_WriteByte( bAlwaysShow ); gi.MSG_WriteByte( depth ); gi.MSG_EndCGM(); + */ } void HudDrawTimer( int index, float duration, float fade_out_time ) { +/* gi.SetBroadcastAll(); gi.MSG_StartCGM( CGM_HUDDRAW_TIMER ); @@ -187,12 +191,13 @@ void HudDrawTimer( int index, float duration, float fade_out_time ) gi.MSG_WriteFloat( duration ); gi.MSG_WriteFloat( fade_out_time ); gi.MSG_EndCGM(); +*/ } void iHudDrawShader( int cl_num, int info, const char *name ) { gi.MSG_SetClient(cl_num); - gi.MSG_StartCGM(0x1B); + gi.MSG_StartCGM(CGM_HUDDRAW_SHADER); HudWriteNumber( info ); // c = info gi.MSG_WriteString(name); // s = name (shader_name) gi.MSG_EndCGM(); @@ -202,7 +207,7 @@ void iHudDrawShader( int cl_num, int info, const char *name ) void iHudDrawAlign(int cl_num, int info, int horizontalAlign, int verticalAlign ) { gi.MSG_SetClient(cl_num); - gi.MSG_StartCGM(0x1C); + gi.MSG_StartCGM(CGM_HUDDRAW_ALIGN); HudWriteNumber( info ); // c = probably "info" gi.MSG_WriteBits(horizontalAlign, 2); // value = 0,1,2 bits = 2 // 0 - left \ @@ -221,7 +226,7 @@ void iHudDrawAlign(int cl_num, int info, int horizontalAlign, int verticalAlign void iHudDrawRect(int cl_num, int info, int x, int y, int width, int height) { gi.MSG_SetClient(cl_num); - gi.MSG_StartCGM(0x1D); + gi.MSG_StartCGM(CGM_HUDDRAW_RECT); HudWriteNumber( info ); // c = probably "info" gi.MSG_WriteShort(x); // c = probably "x" gi.MSG_WriteShort(y); // c = probably "y" @@ -232,6 +237,7 @@ void iHudDrawRect(int cl_num, int info, int x, int y, int width, int height) void iHudDraw3d( int cl_num, int index, vec3_t vector, int ent_num, qboolean bAlwaysShow, qboolean depth ) { + /* gi.MSG_SetClient( cl_num ); gi.MSG_StartCGM( CGM_HUDDRAW_3D ); @@ -245,10 +251,12 @@ void iHudDraw3d( int cl_num, int index, vec3_t vector, int ent_num, qboolean bAl gi.MSG_WriteByte( bAlwaysShow ); gi.MSG_WriteByte( depth ); gi.MSG_EndCGM(); + */ } void iHudDrawTimer( int cl_num, int index, float duration, float fade_out_time ) { +/* gi.MSG_SetClient( cl_num ); gi.MSG_StartCGM( CGM_HUDDRAW_TIMER ); @@ -256,12 +264,13 @@ void iHudDrawTimer( int cl_num, int index, float duration, float fade_out_time ) gi.MSG_WriteFloat( duration ); gi.MSG_WriteFloat( fade_out_time ); gi.MSG_EndCGM(); +*/ } void iHudDrawVirtualSize(int cl_num, int info, int virtualScreen) { gi.MSG_SetClient(cl_num); - gi.MSG_StartCGM(0x1E); + gi.MSG_StartCGM(CGM_HUDDRAW_VIRTUALSIZE); HudWriteNumber( info ); // c = info gi.MSG_WriteBits(!!virtualScreen, 1); // value = ? bits = 1 @@ -285,7 +294,7 @@ void iHudDrawColor(int cl_num, int info, float *color) temp[2] = (long int)(color[2]*255.0f); gi.MSG_SetClient(cl_num); - gi.MSG_StartCGM(0x1F); + gi.MSG_StartCGM(CGM_HUDDRAW_COLOR); HudWriteNumber( info ); // c = info gi.MSG_WriteByte(temp[0]); // c = color[2] gi.MSG_WriteByte(temp[1]); // c = color[1] - Values can be messed up. To be tested. @@ -301,7 +310,7 @@ void iHudDrawAlpha(int cl_num, int info, float alpha) temp = (long int)(alpha*255.0f); gi.MSG_SetClient(cl_num); - gi.MSG_StartCGM(0x20); + gi.MSG_StartCGM(CGM_HUDDRAW_ALPHA); HudWriteNumber( info ); // c = info gi.MSG_WriteByte(temp); // c = alpha gi.MSG_EndCGM(); @@ -313,7 +322,7 @@ void iHudDrawAlpha(int cl_num, int info, float alpha) void iHudDrawString( int cl_num, int info, const char *string ) { gi.MSG_SetClient(cl_num); - gi.MSG_StartCGM(0x21); + gi.MSG_StartCGM(CGM_HUDDRAW_STRING); HudWriteNumber( info ); // c = info gi.MSG_WriteString(string); // s = string (to show) gi.MSG_EndCGM(); @@ -323,7 +332,7 @@ void iHudDrawString( int cl_num, int info, const char *string ) void iHudDrawFont( int cl_num, int info, const char *fontName ) { gi.MSG_SetClient(cl_num); - gi.MSG_StartCGM(0x22); + gi.MSG_StartCGM(CGM_HUDDRAW_FONT); HudWriteNumber( info ); // c = info gi.MSG_WriteString(fontName); // s = fontName (to use) gi.MSG_EndCGM(); diff --git a/code/game/item.cpp b/code/game/item.cpp index fb8f9bca..cc9c71f9 100644 --- a/code/game/item.cpp +++ b/code/game/item.cpp @@ -1149,6 +1149,8 @@ void Item::updatePrefix return; } + // FIXME: delete + /* Entity *ent = ev->GetEntity( 1 ); gi.MSG_SetClient( ent->edict - g_entities ); @@ -1157,6 +1159,7 @@ void Item::updatePrefix gi.MSG_WriteString( item_name.c_str() ); gi.MSG_WriteString( m_sVMprefix.c_str() ); gi.MSG_EndCGM(); + */ } qboolean Item::IsItemCool diff --git a/code/game/player.cpp b/code/game/player.cpp index 094f1358..d91c7764 100644 --- a/code/game/player.cpp +++ b/code/game/player.cpp @@ -5790,9 +5790,9 @@ void Player::Pain { gi.MSG_SetClient( attacker->edict - g_entities ); if( IsDead() ) - gi.MSG_StartCGM( 36 ); + gi.MSG_StartCGM(CGM_NOTIFY_KILL); else - gi.MSG_StartCGM( 35 ); + gi.MSG_StartCGM(CGM_NOTIFY_HIT); gi.MSG_EndCGM(); } @@ -6528,6 +6528,8 @@ void Player::ClientMove { m_bShowingHint = false; + // FIXME: delete + /* if (sv_reborn->integer) { gi.MSG_SetClient(edict - g_entities); @@ -6537,6 +6539,7 @@ void Player::ClientMove gi.MSG_WriteString(""); gi.MSG_EndCGM(); } + */ } oldorigin = origin; @@ -13221,7 +13224,7 @@ void Player::EventDMMessage if( bInstaMessage ) { gi.MSG_SetClient( i ); - gi.MSG_StartCGM( 37 ); + gi.MSG_StartCGM(CGM_VOICE_CHAT); gi.MSG_WriteCoord( m_vViewPos[ 0 ] ); gi.MSG_WriteCoord( m_vViewPos[ 1 ] ); gi.MSG_WriteCoord( m_vViewPos[ 2 ] ); @@ -14288,15 +14291,15 @@ void Player::ModifyHeightFloat client->ps.pm_flags &= ~( PMF_DUCKED | PMF_VIEW_PRONE | PMF_VIEW_DUCK_RUN | PMF_VIEW_JUMP_START ); - if( sv_reborn->integer ) - { - gi.MSG_SetClient( edict - g_entities); + // FIXME... + /* + gi.MSG_SetClient(edict - g_entities); - gi.MSG_StartCGM( CGM_MODHEIGHTFLOAT ); - gi.MSG_WriteLong( height ); - gi.MSG_WriteFloat( max_z ); - gi.MSG_EndCGM(); - } + gi.MSG_StartCGM(CGM_MODHEIGHTFLOAT); + gi.MSG_WriteLong(height); + gi.MSG_WriteFloat(max_z); + gi.MSG_EndCGM(); + */ } void Player::PlayLocalSound @@ -14330,8 +14333,8 @@ void Player::PlayLocalSound return; } - if( sv_reborn->integer ) - { + // FIXME... + /* gi.MSG_SetClient( client->ps.clientNum ); gi.MSG_StartCGM( CGM_PLAYLOCALSOUND ); @@ -14342,7 +14345,7 @@ void Player::PlayLocalSound gi.MSG_EndCGM(); return; - } + */ if( loop ) { @@ -14499,11 +14502,14 @@ void Player::SetLocalSoundRate gi.MSG_SetClient( client->ps.clientNum ); + // FIXME... + /* gi.MSG_StartCGM( CGM_SETLOCALSOUNDRATE ); gi.MSG_WriteString( found ); gi.MSG_WriteFloat( rate ); gi.MSG_WriteFloat( time ); gi.MSG_EndCGM(); + */ } void Player::SetSpeed @@ -14588,12 +14594,15 @@ void Player::SetVMASpeed vma->name = name; vma->speed = speed; + // FIXME... + /* gi.MSG_SetClient( edict - g_entities ); gi.MSG_StartCGM( CGM_SETVMASPEED ); gi.MSG_WriteString( name ); gi.MSG_WriteFloat( speed ); gi.MSG_EndCGM(); + */ } void Player::StopLocalSound @@ -14621,20 +14630,8 @@ void Player::StopLocalSound return; } - if( level.reborn ) - { - gi.MSG_SetClient( client->ps.clientNum ); - - gi.MSG_StartCGM( CGM_STOPLOCALSOUND ); - gi.MSG_WriteString( found ); - gi.MSG_WriteFloat( time ); - gi.MSG_EndCGM(); - } - else - { - edict->s.loopSound = 0; - gi.StopSound( entnum, CHAN_LOCAL ); - } + edict->s.loopSound = 0; + gi.StopSound(entnum, CHAN_LOCAL); } void Player::UseHeld diff --git a/code/game/weaputils.cpp b/code/game/weaputils.cpp index bcb0eacd..111687d1 100644 --- a/code/game/weaputils.cpp +++ b/code/game/weaputils.cpp @@ -1785,11 +1785,11 @@ void Explosion::MakeExplosionEffect if( !sEffect.icmp( "grenade" ) ) { - gi.MSG_StartCGM( 12 ); + gi.MSG_StartCGM(CGM_EXPLOSION_EFFECT_1); } else { - gi.MSG_StartCGM( 13 ); + gi.MSG_StartCGM(CGM_EXPLOSION_EFFECT_2); } gi.MSG_WriteCoord( origin[ 0 ] ); @@ -2034,7 +2034,7 @@ float BulletAttack if( ent->edict->solid == 3 && trace.shaderNum >= 0 ) { gi.SetBroadcastVisible( trace.endpos, 0 ); - gi.MSG_StartCGM( 6 ); + gi.MSG_StartCGM(CGM_BULLET_6); gi.MSG_WriteCoord( trace.endpos[ 0 ] ); gi.MSG_WriteCoord( trace.endpos[ 1 ] ); gi.MSG_WriteCoord( trace.endpos[ 2 ] ); @@ -2192,7 +2192,7 @@ float BulletAttack if( trace.contents > 0 && trace.surfaceFlags & 0xFFFE000 ) { gi.SetBroadcastVisible( trace.endpos, NULL ); - gi.MSG_StartCGM( 6 ); + gi.MSG_StartCGM(CGM_BULLET_6); gi.MSG_WriteCoord( trace.endpos[ 0 ] ); gi.MSG_WriteCoord( trace.endpos[ 1 ] ); gi.MSG_WriteCoord( trace.endpos[ 2 ] ); @@ -2203,7 +2203,7 @@ float BulletAttack else if( trace.location >= 0 && ent->IsSubclassOfPlayer() ) { gi.SetBroadcastVisible( trace.endpos, NULL ); - gi.MSG_StartCGM( 7 ); + gi.MSG_StartCGM(CGM_BULLET_7); gi.MSG_WriteCoord( trace.endpos[ 0 ] ); gi.MSG_WriteCoord( trace.endpos[ 1 ] ); gi.MSG_WriteCoord( trace.endpos[ 2 ] ); @@ -2250,7 +2250,7 @@ float BulletAttack { if( iTracerCount ) { - gi.MSG_StartCGM( 1 ); + gi.MSG_StartCGM(CGM_BULLET_1); gi.MSG_WriteCoord( vBarrel[ 0 ] ); gi.MSG_WriteCoord( vBarrel[ 1 ] ); @@ -2258,7 +2258,7 @@ float BulletAttack } else { - gi.MSG_StartCGM( 2 ); + gi.MSG_StartCGM(CGM_BULLET_2); } gi.MSG_WriteCoord( start[ 0 ] ); @@ -2273,7 +2273,7 @@ float BulletAttack { if( iTracerCount ) { - gi.MSG_StartCGM( 3 ); + gi.MSG_StartCGM(CGM_BULLET_3); gi.MSG_WriteCoord( vBarrel[ 0 ] ); gi.MSG_WriteCoord( vBarrel[ 1 ] ); @@ -2286,7 +2286,7 @@ float BulletAttack } else { - gi.MSG_StartCGM( 4 ); + gi.MSG_StartCGM(CGM_BULLET_4); } gi.MSG_WriteCoord( start[ 0 ] ); @@ -2349,7 +2349,7 @@ void FakeBulletAttack ( *piTracerCount )++; if( *piTracerCount == iTracerFrequency ) { - gi.MSG_StartCGM( 25 ); + gi.MSG_StartCGM(CGM_BULLET_NO_BARREL_1); gi.MSG_WriteCoord( vBarrel[ 0 ] ); gi.MSG_WriteCoord( vBarrel[ 1 ] ); gi.MSG_WriteCoord( vBarrel[ 2 ] ); @@ -2357,12 +2357,12 @@ void FakeBulletAttack } else { - gi.MSG_StartCGM( 26 ); + gi.MSG_StartCGM(CGM_BULLET_NO_BARREL_2); } } else { - gi.MSG_StartCGM( 26 ); + gi.MSG_StartCGM(CGM_BULLET_NO_BARREL_2); } gi.MSG_WriteCoord( start[ 0 ] ); diff --git a/code/game/windows.cpp b/code/game/windows.cpp index 2d3398b9..93053e5c 100644 --- a/code/game/windows.cpp +++ b/code/game/windows.cpp @@ -151,7 +151,7 @@ void WindowObject::WindowKilled( Event *ev ) vCenter = origin + mins + maxs; gi.SetBroadcastVisible( vCenter, vCenter ); - gi.MSG_StartCGM( 24 ); + gi.MSG_StartCGM(CGM_MAKE_WINDOW_DEBRIS); gi.MSG_WriteCoord( vCenter[ 0 ] ); gi.MSG_WriteCoord( vCenter[ 1 ] ); gi.MSG_WriteCoord( vCenter[ 2 ] ); diff --git a/code/qcommon/q_shared.h b/code/qcommon/q_shared.h index f5d148c7..6679ce5c 100644 --- a/code/qcommon/q_shared.h +++ b/code/qcommon/q_shared.h @@ -485,34 +485,6 @@ enum { #define HUD_MESSAGE_CHAT_WHITE "\x02" #define HUD_MESSAGE_CHAT_RED "\x04" -#define CGM_HUDDRAW_SHADER 27 -#define CGM_HUDDRAW_ALIGN 28 -#define CGM_HUDDRAW_RECT 29 -#define CGM_HUDDRAW_VIRTUALSIZE 30 -#define CGM_HUDDRAW_COLOR 31 -#define CGM_HUDDRAW_ALPHA 32 -#define CGM_HUDDRAW_STRING 33 -#define CGM_HUDDRAW_FONT 34 -#define CGM_HUDDRAW_TIMER 38 -#define CGM_HUDDRAW_3D 39 -#define CGM_HUDDRAW_BREAK3D 40 -#define CGM_HUDDRAW_FADE 41 -#define CGM_HUDDRAW_MOVE 42 -#define CGM_HUDDRAW_SCALE 43 -#define CGM_VIEWMODELANIM 44 -#define CGM_VIEWMODELPREFIX 45 -#define CGM_MODHEIGHTFLOAT 46 -#define CGM_SETVMASPEED 47 -#define CGM_HINTSTRING 48 -#define CGM_PLAYLOCALSOUND 49 -#define CGM_SETLOCALSOUNDRATE 50 -#define CGM_STOPLOCALSOUND 51 -#define CGM_HUDDRAW_RECTX 52 -#define CGM_HUDDRAW_RECTY 53 -#define CGM_HUDDRAW_RECTWH 54 -#define CGM_REPLICATION 55 -#define CGM_HUDDRAW_DELETE 56 - extern vec4_t g_color_table[8]; #define MAKERGB( v, r, g, b ) v[0]=r;v[1]=g;v[2]=b