diff --git a/Source/client/cstrike/entities.c b/Source/client/cstrike/entities.c index db3663f3..f85349a5 100755 --- a/Source/client/cstrike/entities.c +++ b/Source/client/cstrike/entities.c @@ -7,7 +7,7 @@ ****/ void CSQC_ambient_generic( string sSample, float fVolume, float fAttenuation, float fLoop, float lFORate ) { - //print( sprintf( "SOUND: %s, %f, %d\n%d %d %d", sSample, fVolume, fAttenuation, self.origin_x, self.origin_y, self.origin_z ) ); + //print( sprintf( "SOUND: %s, %f, %d\n%d %d %d", sSample, fVolume, fAttenuation, self.origin[0], self.origin[1], self.origin[2] ) ); static void LFOHack (void) { sound( self, CHAN_VOICE, self.classname, self.movetype, self.style, 0, 0 ); self.nextthink = self.solid + time; diff --git a/Source/client/cstrike/event.c b/Source/client/cstrike/event.c index b42c019a..fce6e52a 100755 --- a/Source/client/cstrike/event.c +++ b/Source/client/cstrike/event.c @@ -350,9 +350,9 @@ void Game_Parse_Event(float fHeader) { } else if (fHeader == EV_SMOKE) { vector vSmokePos; - vSmokePos_x = readcoord(); - vSmokePos_y = readcoord(); - vSmokePos_z = readcoord(); + vSmokePos[0] = readcoord(); + vSmokePos[1] = readcoord(); + vSmokePos[2] = readcoord(); Effect_CreateSmoke(vSmokePos); } else if (fHeader == EV_FLASH) { diff --git a/Source/client/cstrike/hudorbituaries.c b/Source/client/cstrike/hudorbituaries.c index bfc71dd5..06e8dc20 100755 --- a/Source/client/cstrike/hudorbituaries.c +++ b/Source/client/cstrike/hudorbituaries.c @@ -72,7 +72,7 @@ This actually displays the contents of orbBuffer ================= */ void HUD_DrawOrbituaries( void ) { - vector vOrbPos = video_mins + [ video_res_x - 200, 56 ]; + vector vOrbPos = video_mins + [ video_res[0] - 200, 56 ]; drawfont = FONT_CON; if ( fOrbituaryTime < time && iOrbituaryScroll >= 0 ) { // We are cheap, just clear the attacker and we're good. @@ -87,7 +87,7 @@ void HUD_DrawOrbituaries( void ) { } // Calculate the position based on the saved offsets - vOrbPos_x = video_mins_x + video_res_x - ( orbBuffer[ i ].fOffset1 + orbBuffer[ i ].fOffset2 + orbBuffer[ i ].fOffset3 ) - 16; + vOrbPos[0] = video_mins[0] + video_res[0] - ( orbBuffer[ i ].fOffset1 + orbBuffer[ i ].fOffset2 + orbBuffer[ i ].fOffset3 ) - 16; // Draw the attacker's name, shadow first drawstring( vOrbPos, orbBuffer[ i ].sAttacker, '12 12', orbBuffer[ i ].vColor1, VGUI_WINDOW_FGALPHA, 0 ); @@ -101,7 +101,7 @@ void HUD_DrawOrbituaries( void ) { // Draw the victim's name drawstring( vOrbPos + [ orbBuffer[ i ].fOffset2 + orbBuffer[ i ].fOffset1, 0 ], orbBuffer[ i ].sVictim, '12 12', orbBuffer[ i ].vColor2, VGUI_WINDOW_FGALPHA, 0 ); - vOrbPos_y += 18; + vOrbPos[1] += 18; } } diff --git a/Source/client/cstrike/hudscope.c b/Source/client/cstrike/hudscope.c index dcf6630b..cdd1ef6f 100755 --- a/Source/client/cstrike/hudscope.c +++ b/Source/client/cstrike/hudscope.c @@ -36,8 +36,8 @@ void HUD_DrawScope( void ) { drawpic( vScopePos, "sprites/sniper_scope.spr_0.tga", '256 256', '1 1 1', 1.0f, DRAWFLAG_NORMAL ); // Border scale to fit the screen - fSBScale = video_res_y / 480; - fSBOffset = ( video_res_x / 2 ) - ( ( 640 * fSBScale ) / 2 ); + fSBScale = video_res[1] / 480; + fSBOffset = ( video_res[0] / 2 ) - ( ( 640 * fSBScale ) / 2 ); // Type 1 Border... more coming soon? HUD_DrawScope_Pic( '0 0', '192 112', "sprites/top_left.spr_0.tga" ); @@ -51,7 +51,7 @@ void HUD_DrawScope( void ) { // Rect borders left and right if ( fSBOffset > 0 ) { - drawfill( '0 0', [ fSBOffset, video_res_y ], '0 0 0', 1.0f ); - drawfill( [ ( 640 * fSBScale ) + fSBOffset, 0 ], [ fSBOffset, video_res_y ], '0 0 0', 1.0f ); + drawfill( '0 0', [ fSBOffset, video_res[1] ], '0 0 0', 1.0f ); + drawfill( [ ( 640 * fSBScale ) + fSBOffset, 0 ], [ fSBOffset, video_res[1] ], '0 0 0', 1.0f ); } } diff --git a/Source/client/cstrike/hudweaponselect.c b/Source/client/cstrike/hudweaponselect.c index 7924cc7b..fe65ee44 100755 --- a/Source/client/cstrike/hudweaponselect.c +++ b/Source/client/cstrike/hudweaponselect.c @@ -327,7 +327,7 @@ void HUD_DrawWeaponSelect(void) if (pSeat->iHUDGrenadesSelected == WEAPON_HEGRENADE) { drawsubpic(vSelectPos + [0,20], [170,45], "sprites/640hud3.spr_0.tga", [0,0.703125], [0.6640625, 0.17578125], vHUDColor, 1, DRAWFLAG_ADDITIVE); } - vSelectPos_y += 45; + vSelectPos[1] += 45; ihasnade = TRUE; } if (getstati_punf(STAT_ITEM_FLASHBANG)) { @@ -335,7 +335,7 @@ void HUD_DrawWeaponSelect(void) if (pSeat->iHUDGrenadesSelected == WEAPON_FLASHBANG) { drawsubpic(vSelectPos + [0,20], [170,45], "sprites/640hud3.spr_0.tga", [0,0.703125], [0.6640625, 0.17578125], vHUDColor, 1, DRAWFLAG_ADDITIVE); } - vSelectPos_y += 45; + vSelectPos[1] += 45; ihasnade = TRUE; } if (getstati_punf(STAT_ITEM_SMOKEGRENADE)) { @@ -343,22 +343,22 @@ void HUD_DrawWeaponSelect(void) if (pSeat->iHUDGrenadesSelected == WEAPON_SMOKEGRENADE) { drawsubpic(vSelectPos + [0,20], [170,45], "sprites/640hud3.spr_0.tga", [0,0.703125], [0.6640625, 0.17578125], vHUDColor, 1, DRAWFLAG_ADDITIVE); } - vSelectPos_y += 45; + vSelectPos[1] += 45; ihasnade = TRUE; } } if (ihasnade) { - vSelectPos_x += 170; + vSelectPos[0] += 170; } else { - vSelectPos_x += 20; + vSelectPos[0] += 20; } } else { if (wptTable[pSeat->fHUDWeaponSelected].iSlot == i) { drawsubpic(vSelectPos + [0,20], [170,45], wpSymbolTable[pSeat->fHUDWeaponSelected].sSprite, wpSymbolTable[pSeat->fHUDWeaponSelected].vOrigin, [0.6640625, 0.17578125], vHUDColor, 1, DRAWFLAG_ADDITIVE); drawsubpic(vSelectPos + [0,20], [170,45], "sprites/640hud3.spr_0.tga", [0,0.703125], [0.6640625, 0.17578125], vHUDColor, 1, DRAWFLAG_ADDITIVE); - vSelectPos_x += 170; + vSelectPos[0] += 170; } else { - vSelectPos_x += 20; + vSelectPos[0] += 20; } } } diff --git a/Source/client/cstrike/overview.c b/Source/client/cstrike/overview.c index 63bb305d..a9f85da7 100755 --- a/Source/client/cstrike/overview.c +++ b/Source/client/cstrike/overview.c @@ -130,10 +130,10 @@ void Overview_DrawLayer( void ) { R_BeginPolygon( "sprites/iplayerblue.spr_0.tga" ); } } - R_PolygonVertex( [ eFind.absmax_x + 16, eFind.absmin_y - 16, ovMap.fHeight + 16 ], '1 0', '1 1 1', 1.0f ); // Top Right - R_PolygonVertex( [ eFind.absmin_x - 16, eFind.absmin_y - 16, ovMap.fHeight + 16 ], '0 0', '1 1 1', 1.0f ); // Top left - R_PolygonVertex( [ eFind.absmin_x - 16, eFind.absmax_y + 16, ovMap.fHeight + 16 ], '0 1', '1 1 1', 1.0f ); // Bottom left - R_PolygonVertex( [ eFind.absmax_x + 16, eFind.absmax_y + 16, ovMap.fHeight + 16 ], '1 1', '1 1 1', 1.0f ); // Bottom right + R_PolygonVertex( [ eFind.absmax[0] + 16, eFind.absmin[1] - 16, ovMap.fHeight + 16 ], '1 0', '1 1 1', 1.0f ); // Top Right + R_PolygonVertex( [ eFind.absmin[0] - 16, eFind.absmin[1] - 16, ovMap.fHeight + 16 ], '0 0', '1 1 1', 1.0f ); // Top left + R_PolygonVertex( [ eFind.absmin[0] - 16, eFind.absmax[1] + 16, ovMap.fHeight + 16 ], '0 1', '1 1 1', 1.0f ); // Bottom left + R_PolygonVertex( [ eFind.absmax[0] + 16, eFind.absmax[1] + 16, ovMap.fHeight + 16 ], '1 1', '1 1 1', 1.0f ); // Bottom right R_EndPolygon(); } diff --git a/Source/client/cstrike/vgui.c b/Source/client/cstrike/vgui.c index afb25191..c6cb54ea 100755 --- a/Source/client/cstrike/vgui.c +++ b/Source/client/cstrike/vgui.c @@ -44,8 +44,8 @@ float CSQC_VGUI_Draw( void ) { // Align the window to the center vVGUIWindowPos = video_mins; - vVGUIWindowPos_x += ( video_res_x / 2 ) - 320; - vVGUIWindowPos_y += ( video_res_y / 2 ) - 240; + vVGUIWindowPos[0] += ( video_res[0] / 2 ) - 320; + vVGUIWindowPos[1] += ( video_res[1] / 2 ) - 240; VGUI_Window( vguiMenus[ pSeat->fVGUI_Display - 1 ].sTitle, vVGUIWindowPos, '640 480 0' ); iVGUIKey = 48; diff --git a/Source/client/cstrike/vguibuymenu.c b/Source/client/cstrike/vguibuymenu.c index 9632bfde..ddc10485 100755 --- a/Source/client/cstrike/vguibuymenu.c +++ b/Source/client/cstrike/vguibuymenu.c @@ -138,7 +138,7 @@ void VGUI_BuyMenu_WeaponButton(float fWeapon) { VGUI_FakeButton(vguiWeaponTable[fWeapon].sName, vVGUIButtonPos, [264,24]); } - vVGUIButtonPos_y += 32; + vVGUIButtonPos[1] += 32; } /* @@ -160,7 +160,7 @@ void VGUI_BuyMenu_EquipmentButton(float fID) { VGUI_FakeButton(vguiEquipmentTable[fID].sName, vVGUIButtonPos, [180,24]); } - vVGUIButtonPos_y += 32; + vVGUIButtonPos[1] += 32; } /* @@ -176,7 +176,7 @@ void VGUI_BuyMenu_Handguns(vector vPos) { VGUI_BuyMenu_WeaponButton(WEAPON_DEAGLE); VGUI_BuyMenu_WeaponButton(WEAPON_P228); - vVGUIButtonPos_y += 32; + vVGUIButtonPos[1] += 32; if (stof(getplayerkeyvalue(player_localnum, "*team")) == TEAM_T) { VGUI_BuyMenu_WeaponButton(WEAPON_ELITES); @@ -214,7 +214,7 @@ void VGUI_BuyMenu_SMGs(vector vPos) { VGUI_BuyMenu_WeaponButton(WEAPON_P90); VGUI_BuyMenu_WeaponButton(WEAPON_UMP45); - vVGUIButtonPos_y += 32; + vVGUIButtonPos[1] += 32; if (stof(getplayerkeyvalue(player_localnum, "*team")) == TEAM_T) { VGUI_BuyMenu_WeaponButton(WEAPON_MAC10); diff --git a/Source/client/cstrike/vguimotd.c b/Source/client/cstrike/vguimotd.c index bdf2f775..8a1f4542 100755 --- a/Source/client/cstrike/vguimotd.c +++ b/Source/client/cstrike/vguimotd.c @@ -31,7 +31,7 @@ void VGUI_MessageOfTheDay( vector vPos ) { if ( sMOTDString[ i ] != "/" ) { VGUI_Text( sMOTDString[ i ], vTextPos, '12 12', FONT_CON ); } - vTextPos_y += 14; + vTextPos[1] += 14; } VGUI_Button( _("VGUI_OK"), MessageOfTheDay_ButtonOK, vPos + '16 440 0', '80 24 0' ); diff --git a/Source/client/cstrike/vguiradio.c b/Source/client/cstrike/vguiradio.c index 0258fed5..594142fe 100755 --- a/Source/client/cstrike/vguiradio.c +++ b/Source/client/cstrike/vguiradio.c @@ -69,47 +69,47 @@ void VGUI_Radio_Draw( void ) { vector vSize, vPos; if ( pSeat->fVGUI_Display == VGUI_RADIO1 ) { - vSize_x = 312; - vSize_y = ( 10 * VGUIRADIO_COMMANDS ) + 64; - vPos = video_mins + [ 16, video_res_y - 148 - vSize_y ]; + vSize[0] = 312; + vSize[1] = ( 10 * VGUIRADIO_COMMANDS ) + 64; + vPos = video_mins + [ 16, video_res[1] - 148 - vSize[1] ]; VGUI_WindowSmall( _("RADIO_TITLE1"), vPos, vSize ); - vPos_y += 24; - vPos_x += 8; + vPos[1] += 24; + vPos[0] += 8; for ( float i = 0; i < VGUIRADIO_COMMANDS; i++ ) { - vPos_y += 10; + vPos[1] += 10; VGUI_Radio_DrawCommand( i, fRadioCommands[ i ], vPos ); } } else if ( pSeat->fVGUI_Display == VGUI_RADIO2 ) { - vSize_x = 312; - vSize_y = ( 10 * VGUIRADIO_GROUPCOMMANDS ) + 64; - vPos = video_mins + [ 16, video_res_y - 148 - vSize_y ]; + vSize[0] = 312; + vSize[1] = ( 10 * VGUIRADIO_GROUPCOMMANDS ) + 64; + vPos = video_mins + [ 16, video_res[1] - 148 - vSize[1] ]; VGUI_WindowSmall( _("RADIO_TITLE2"), vPos, vSize ); - vPos_y += 24; - vPos_x += 8; + vPos[1] += 24; + vPos[0] += 8; for ( float i = 0; i < VGUIRADIO_GROUPCOMMANDS; i++ ) { - vPos_y += 10; + vPos[1] += 10; VGUI_Radio_DrawCommand( i, fRadioGroupCommands[ i ], vPos ); } } else { - vSize_x = 312; - vSize_y = ( 10 * VGUIRADIO_RESPONSES ) + 64; - vPos = video_mins + [ 16, video_res_y - 148 - vSize_y ]; + vSize[0] = 312; + vSize[1] = ( 10 * VGUIRADIO_RESPONSES ) + 64; + vPos = video_mins + [ 16, video_res[1] - 148 - vSize[1] ]; VGUI_WindowSmall( _("RADIO_TITLE3"), vPos, vSize ); - vPos_y += 24; - vPos_x += 8; + vPos[1] += 24; + vPos[0] += 8; for ( float i = 0; i < VGUIRADIO_RESPONSES; i++ ) { - vPos_y += 10; + vPos[1] += 10; VGUI_Radio_DrawCommand( i, fRadioResponses[ i ], vPos ); } } - vPos_y += 20; + vPos[1] += 20; VGUI_Text( sprintf( "0) %s", _("VGUI_BACK") ), vPos, '12 12', FONT_CON ); if ( pSeat->fInputKeyCode == 48 ) { diff --git a/Source/client/cstrike/vguiscoreboard.c b/Source/client/cstrike/vguiscoreboard.c index d2be3165..3f6deba8 100755 --- a/Source/client/cstrike/vguiscoreboard.c +++ b/Source/client/cstrike/vguiscoreboard.c @@ -85,7 +85,7 @@ vector VGUI_Scores_DrawTeam( vector vPos, float fTeam ) { // Now we know the playercount, so let's calculate the position next to the Teamname String and print it vector vCountPos = vPos + '24 6'; - vCountPos_x += stringwidth( sScoreTeams[ fTeam ], FALSE, '12 12' ) + 8; + vCountPos[0] += stringwidth( sScoreTeams[ fTeam ], FALSE, '12 12' ) + 8; CSQC_DrawText( vCountPos, sprintf( _("SCORE_PLAYERS"), iPlayerCount ), '12 12', vColor, 1.0f, 0, FONT_CON ); } return vNewPos + '0 24'; @@ -100,21 +100,21 @@ void VGUI_Scores_Show( void ) { vector vMainPos; vector vSize; - vSize_x = 540; - vSize_y = video_res_y - 112; + vSize[0] = 540; + vSize[1] = video_res[1] - 112; vMainPos = video_mins; - vMainPos_x += ( video_res_x / 2 ) - (vSize_x / 2); - vMainPos_y += 56; + vMainPos[0] += ( video_res[0] / 2 ) - (vSize[0] / 2); + vMainPos[1] += 56; // Draw the background drawfill( vMainPos, vSize, VGUI_WINDOW_BGCOLOR, VGUI_WINDOW_BGALPHA ); // Sides - drawfill( vMainPos, [vSize_x, 1], '0.35 0.35 0.35', 1.0f ); - drawfill( [vMainPos_x, vMainPos_y + vSize_y - 1], [vSize_x, 1], '0.35 0.35 0.35', 1.0f ); - drawfill( vMainPos, [1, vSize_y], '0.35 0.35 0.35', 1.0f ); - drawfill( [vMainPos_x + vSize_x - 1, vMainPos_y], [1, vSize_y], '0.35 0.35 0.35', 1.0f ); + drawfill( vMainPos, [vSize[0], 1], '0.35 0.35 0.35', 1.0f ); + drawfill( [vMainPos[0], vMainPos[1] + vSize[1] - 1], [vSize[0], 1], '0.35 0.35 0.35', 1.0f ); + drawfill( vMainPos, [1, vSize[1]], '0.35 0.35 0.35', 1.0f ); + drawfill( [vMainPos[0] + vSize[0] - 1, vMainPos[1]], [1, vSize[1]], '0.35 0.35 0.35', 1.0f ); // Server title CSQC_DrawText( vMainPos + '24 13', serverkey( "hostname" ), '12 12', VGUI_WINDOW_FGCOLOR, 1.0f, 0, FONT_CON ); diff --git a/Source/client/cstrike/vguispectator.c b/Source/client/cstrike/vguispectator.c index 16145123..8e563151 100755 --- a/Source/client/cstrike/vguispectator.c +++ b/Source/client/cstrike/vguispectator.c @@ -15,8 +15,8 @@ void VGUI_DrawSpectatorHUD( void ) { vHUDColor = autocvar_con_color * ( 1 / 255 ); // Draw the borders - drawfill( video_mins, [ video_res_x, 40 ], '0 0 0', 1 ); - drawfill( video_mins + [ 0, video_res_y - 40], [ video_res_x, 40 ], '0 0 0', 1 ); + drawfill( video_mins, [ video_res[0], 40 ], '0 0 0', 1 ); + drawfill( video_mins + [ 0, video_res[1] - 40], [ video_res[0], 40 ], '0 0 0', 1 ); // Draw the timer int iMinutes, iSeconds, iTens, iUnits; @@ -26,17 +26,17 @@ void VGUI_DrawSpectatorHUD( void ) { iUnits = iSeconds - 10 * iTens; - drawpic( video_mins + [ video_res_x - 70, 20 ], "gfx/vgui/640_timer", '14 14', '1 1 1', 1 ); - VGUI_RightText( video_mins + [ video_res_x - 16, 23 ], sprintf( "%i:%i%i", iMinutes, iTens, iUnits ), '12 12', '0.56 0.56 0.21', FONT_CON ); + drawpic( video_mins + [ video_res[0] - 70, 20 ], "gfx/vgui/640_timer", '14 14', '1 1 1', 1 ); + VGUI_RightText( video_mins + [ video_res[0] - 16, 23 ], sprintf( "%i:%i%i", iMinutes, iTens, iUnits ), '12 12', '0.56 0.56 0.21', FONT_CON ); // Draw the money - CSQC_DrawText( video_mins + [ video_res_x - 67, 6 ], "$", '12 12', '0.56 0.56 0.21', 1, 0, FONT_CON ); - VGUI_RightText( video_mins + [ video_res_x - 16, 6 ], sprintf( "%d", getstatf( STAT_MONEY ) ), '12 12', '0.56 0.56 0.21', FONT_CON ); + CSQC_DrawText( video_mins + [ video_res[0] - 67, 6 ], "$", '12 12', '0.56 0.56 0.21', 1, 0, FONT_CON ); + VGUI_RightText( video_mins + [ video_res[0] - 16, 6 ], sprintf( "%d", getstatf( STAT_MONEY ) ), '12 12', '0.56 0.56 0.21', FONT_CON ); // Seperator - drawfill( video_mins + [ video_res_x - 85, 6 ], [ 2, 28 ], '0.56 0.56 0.21', 1 ); + drawfill( video_mins + [ video_res[0] - 85, 6 ], [ 2, 28 ], '0.56 0.56 0.21', 1 ); // Team Stats - VGUI_RightText( video_mins + [ video_res_x - 96, 6 ], sprintf( _("VGUI_SPEC_TCOUNTER"), getstatf( STAT_WON_T ) ), '12 12', '0.56 0.56 0.21', FONT_CON ); - VGUI_RightText( video_mins + [ video_res_x - 96, 23 ], sprintf( _("VGUI_SPEC_CTCOUNTER"), getstatf( STAT_WON_CT ) ), '12 12', '0.56 0.56 0.21', FONT_CON ); + VGUI_RightText( video_mins + [ video_res[0] - 96, 6 ], sprintf( _("VGUI_SPEC_TCOUNTER"), getstatf( STAT_WON_T ) ), '12 12', '0.56 0.56 0.21', FONT_CON ); + VGUI_RightText( video_mins + [ video_res[0] - 96, 23 ], sprintf( _("VGUI_SPEC_CTCOUNTER"), getstatf( STAT_WON_CT ) ), '12 12', '0.56 0.56 0.21', FONT_CON ); } diff --git a/Source/client/cstrike/vguiteamselect.c b/Source/client/cstrike/vguiteamselect.c index ca78ed1e..ba807b29 100755 --- a/Source/client/cstrike/vguiteamselect.c +++ b/Source/client/cstrike/vguiteamselect.c @@ -115,7 +115,7 @@ void VGUI_TeamSelect_Main( vector vPos ) { vector vTextPos = vPos + '224 116 0'; for ( int i = 1; i < 35; i++ ) { VGUI_Text( sMapString[ i ], vTextPos, '12 12', FONT_CON ); - vTextPos_y += 14; + vTextPos[1] += 14; } VGUI_Button( _("VGUI_TEAM_T"), TeamSelect_Main_ButtonT, vPos + '16 116 0', '180 24 0' ); diff --git a/Source/client/text.c b/Source/client/text.c index 58c48e76..627d735c 100644 --- a/Source/client/text.c +++ b/Source/client/text.c @@ -41,7 +41,7 @@ void Print_Draw(void) { for (int i = 0; i < 5; i++) { drawstring(pos, g_printbuffer[i], [12,12], [1,1,1], 1.0f, 0); - pos_y += 14; + pos[1] += 14; } } @@ -75,11 +75,11 @@ void CSQC_DrawCenterprint(void) } } - vCenterPrintPos_y = video_mins_y + (video_res_y / 2) - (fCenterPrintLines - 4) - 69; + vCenterPrintPos[1] = video_mins[1] + (video_res[1] / 2) - (fCenterPrintLines - 4) - 69; for (int i = 0; i < (fCenterPrintLines); i++) { - vCenterPrintPos_x = video_mins_x + (video_res_x / 2) - (stringwidth(sCenterPrintBuffer[i], TRUE, '12 12') / 2); + vCenterPrintPos[0] = video_mins[0] + (video_res[0] / 2) - (stringwidth(sCenterPrintBuffer[i], TRUE, '12 12') / 2); drawstring(vCenterPrintPos, sCenterPrintBuffer[i], '12 12', '1 1 1', fCenterPrintAlpha, 0); - vCenterPrintPos_y += 8; + vCenterPrintPos[1] += 8; } } diff --git a/Source/client/view.c b/Source/client/view.c index 328fd455..8857ee2b 100644 --- a/Source/client/view.c +++ b/Source/client/view.c @@ -82,9 +82,9 @@ void View_CalcBob(void) } vel = pSeat->vPlayerVelocity; - vel_z = 0; + vel[2] = 0; - float fBob = sqrt(vel_x * vel_x + vel_y * vel_y) * autocvar_v_bob; + float fBob = sqrt(vel[0] * vel[0] + vel[1] * vel[1]) * autocvar_v_bob; fBob = fBob * 0.3 + fBob * 0.7 * sin(cycle); pSeat->fBob = bound(-7, fBob, 4); } @@ -170,7 +170,7 @@ void View_DrawViewModel(void) // Give the gun a tilt effect like in old HL/CS versions if (autocvar_v_bobclassic == 1) { - eViewModel.angles_z = -pSeat->fBob; + eViewModel.angles[2] = -pSeat->fBob; } // Only bother when zoomed out diff --git a/Source/gs-entbase/client/sprite.cpp b/Source/gs-entbase/client/sprite.cpp index e559877d..67ce20f7 100644 --- a/Source/gs-entbase/client/sprite.cpp +++ b/Source/gs-entbase/client/sprite.cpp @@ -34,9 +34,9 @@ void Sprite_Animated(void) { spawnfunc_sprite(); sprite me = (sprite)self; - me.origin_x = readcoord(); - me.origin_y = readcoord(); - me.origin_z = readcoord(); + me.origin[0] = readcoord(); + me.origin[1] = readcoord(); + me.origin[2] = readcoord(); me.modelindex = readfloat(); me.framerate = readfloat(); me.scale = readfloat(); diff --git a/Source/gs-entbase/server/func_breakable.cpp b/Source/gs-entbase/server/func_breakable.cpp index bf5cdf66..d23e8057 100755 --- a/Source/gs-entbase/server/func_breakable.cpp +++ b/Source/gs-entbase/server/func_breakable.cpp @@ -125,7 +125,7 @@ void func_breakable::PlayerTouch(void) } } - if ((spawnflags & SF_PRESSURE) && (other.absmin_z >= maxs_z - 2)) { + if ((spawnflags & SF_PRESSURE) && (other.absmin[2] >= maxs[2] - 2)) { touch = __NULL__; think = Trigger; diff --git a/Source/gs-entbase/server/func_ladder.cpp b/Source/gs-entbase/server/func_ladder.cpp index 691841c0..e125454e 100644 --- a/Source/gs-entbase/server/func_ladder.cpp +++ b/Source/gs-entbase/server/func_ladder.cpp @@ -23,7 +23,7 @@ class func_ladder:CBaseEntity void func_ladder::Sound(entity target) { int r; - if ((target.velocity_z == 0) || (target.fStepTime > time)) { + if ((target.velocity[2] == 0) || (target.fStepTime > time)) { return; } r = floor(random() * g_laddersnd.length); @@ -42,7 +42,7 @@ void func_ladder::touch(void) vPlayerVector = v_forward; vPlayerVector = (vPlayerVector * 240); - if (other.movement_x > 0) { + if (other.movement[0] > 0) { other.velocity = vPlayerVector; } else { other.velocity = [0,0,0]; diff --git a/Source/gs-entbase/server/trigger_camera.cpp b/Source/gs-entbase/server/trigger_camera.cpp index c2c6fdd0..509c6845 100644 --- a/Source/gs-entbase/server/trigger_camera.cpp +++ b/Source/gs-entbase/server/trigger_camera.cpp @@ -20,7 +20,7 @@ void trigger_camera::Trigger(void) entity e = find(world, CBaseTrigger::m_strTargetName, m_strTarget); if (e) { angles = vectoangles(e.origin - origin); - angles_x *= -1; + angles[0] *= -1; } } Client_TriggerCamera(eActivator, origin, angles, m_flWait); diff --git a/Source/math.h b/Source/math.h index 9d79958f..5f36993c 100755 --- a/Source/math.h +++ b/Source/math.h @@ -29,7 +29,7 @@ float Math_Lerp( float fA, float fB, float fPercent ) { float Math_VectorNormalize( vector v ) { float length, ilength; - length = v_x*v_x + v_y*v_y + v_z*v_z; + length = v[0]*v[0] + v[1]*v[1] + v[2]*v[2]; length = sqrt( length ); // FIXME if ( length ) { @@ -43,9 +43,9 @@ float Math_VectorNormalize( vector v ) { } void Math_VectorScale( vector in, float scale, __inout vector out ) { - out_x = in_x * scale; - out_y = in_y * scale; - out_z = in_z * scale; + out[0] = in[0] * scale; + out[1] = in[1] * scale; + out[2] = in[2] * scale; } float Math_FixDelta( float fDelta ) { @@ -83,7 +83,7 @@ void QPhysics_Run ( entity eTarget ) entity eOld = self; self = eTarget; - float flFallVel = ( self.flags & FL_ONGROUND ) ? 0 : -self.velocity_z; + float flFallVel = ( self.flags & FL_ONGROUND ) ? 0 : -self.velocity[2]; #ifdef CSTRIKE self.maxspeed = Game_GetMaxSpeed( self ); diff --git a/Source/server/cstrike/main.c b/Source/server/cstrike/main.c index e9643628..b6264d13 100644 --- a/Source/server/cstrike/main.c +++ b/Source/server/cstrike/main.c @@ -515,7 +515,7 @@ void Game_Worldspawn(void) clientstat(0, EV_FLOAT, health); clientstat(10, EV_FLOAT, weapon); - clientstat(16, EV_FLOAT, view_ofs_z); + clientstat(16, EV_FLOAT, view_ofs[2]); clientstat(21, EV_FLOAT, viewzoom); /* FIXME: Turn those into bitflags */ diff --git a/Source/server/cstrike/player.c b/Source/server/cstrike/player.c index d497e01d..e40efc2e 100644 --- a/Source/server/cstrike/player.c +++ b/Source/server/cstrike/player.c @@ -27,15 +27,15 @@ float Player_SendEntity(entity ePEnt, float fChanged) WriteByte(MSG_ENTITY, ENT_PLAYER); WriteShort(MSG_ENTITY, self.modelindex); - WriteCoord(MSG_ENTITY, self.origin_x); - WriteCoord(MSG_ENTITY, self.origin_y); - WriteCoord(MSG_ENTITY, self.origin_z); - WriteCoord(MSG_ENTITY, self.v_angle_x); - WriteCoord(MSG_ENTITY, self.angles_y); - WriteCoord(MSG_ENTITY, self.angles_z); - WriteCoord(MSG_ENTITY, self.velocity_x); - WriteCoord(MSG_ENTITY, self.velocity_y); - WriteCoord(MSG_ENTITY, self.velocity_z); + WriteCoord(MSG_ENTITY, self.origin[0]); + WriteCoord(MSG_ENTITY, self.origin[1]); + WriteCoord(MSG_ENTITY, self.origin[2]); + WriteCoord(MSG_ENTITY, self.v_angle[0]); + WriteCoord(MSG_ENTITY, self.angles[1]); + WriteCoord(MSG_ENTITY, self.angles[2]); + WriteCoord(MSG_ENTITY, self.velocity[0]); + WriteCoord(MSG_ENTITY, self.velocity[1]); + WriteCoord(MSG_ENTITY, self.velocity[2]); WriteFloat(MSG_ENTITY, self.flags); WriteFloat(MSG_ENTITY, self.pmove_flags); WriteByte(MSG_ENTITY, self.weapon); @@ -83,7 +83,7 @@ void Player_Death(int iHitBody) setorigin(eCorpse, self.origin); setmodel(eCorpse, self.model); setsize(eCorpse, self.mins, self.maxs); - eCorpse.angles = [ 0, self.angles_y, 0 ]; + eCorpse.angles = [ 0, self.angles[1], 0 ]; eCorpse.movetype = MOVETYPE_BOUNCE; // Drop primary weapon as well as the bomb if present diff --git a/Source/server/cstrike/spawn.c b/Source/server/cstrike/spawn.c index 46482225..5f26c6ca 100644 --- a/Source/server/cstrike/spawn.c +++ b/Source/server/cstrike/spawn.c @@ -82,7 +82,7 @@ void Spawn_ObserverCam(void) eTarget = find(world, targetname, eCamera.target); if (eTarget) { self.angles = vectoangles(eTarget.origin - eCamera.origin); - self.angles_x *= -1; + self.angles[0] *= -1; } } } else { @@ -96,7 +96,7 @@ void Spawn_ObserverCam(void) eTarget = find(world, targetname, eCamera.target); if (eTarget) { self.angles = vectoangles(eTarget.origin - eCamera.origin); - self.angles_x *= -1; + self.angles[0] *= -1; } } } diff --git a/Source/server/footsteps.c b/Source/server/footsteps.c index 77199d51..470baea9 100755 --- a/Source/server/footsteps.c +++ b/Source/server/footsteps.c @@ -26,7 +26,7 @@ void Footsteps_Update( void ) { } if ( ( self.movetype == MOVETYPE_WALK ) && ( self.flags & FL_ONGROUND ) ) { - if ( ( self.velocity_x == 0 && self.velocity_y == 0 ) || self.fStepTime > time ) { + if ( ( self.velocity[0] == 0 && self.velocity[1] == 0 ) || self.fStepTime > time ) { return; } diff --git a/Source/shared/cstrike/animations.c b/Source/shared/cstrike/animations.c index 47b77242..7ebde2cb 100755 --- a/Source/shared/cstrike/animations.c +++ b/Source/shared/cstrike/animations.c @@ -242,9 +242,9 @@ void Animation_PlayerUpdate( void ) { self.baseframe1time = 0.0f; } - self.bonecontrol1 = self.angles_x; + self.bonecontrol1 = self.angles[0]; #endif - self.angles_x = self.angles_z = 0; + self.angles[0] = self.angles[2] = 0; if ( !( self.flags & FL_ONGROUND ) ) { self.frame = ANIM_JUMP; @@ -259,7 +259,7 @@ void Animation_PlayerUpdate( void ) { #ifdef SSQC // On the CSQC it's done in Player.c - self.subblend2frac = self.v_angle_x / 90; + self.subblend2frac = self.v_angle[0] / 90; #endif } diff --git a/Source/shared/cstrike/basegun.c b/Source/shared/cstrike/basegun.c index 94c3eaf4..3e587574 100644 --- a/Source/shared/cstrike/basegun.c +++ b/Source/shared/cstrike/basegun.c @@ -64,8 +64,8 @@ void BaseGun_ShotMultiplierHandle( float fShots ) { pSeat->iShotMultiplier += fShots; } - vPunch_x = -2 * ( pSeat->iShotMultiplier / 6 ); - vPunch_y = random( -1, 1 ); + vPunch[0] = -2 * ( pSeat->iShotMultiplier / 6 ); + vPunch[1] = random( -1, 1 ); View_AddPunchAngle( vPunch ); #endif } diff --git a/Source/shared/cstrike/weaponc4bomb.c b/Source/shared/cstrike/weaponc4bomb.c index 6e1a536e..b5303d9d 100755 --- a/Source/shared/cstrike/weaponc4bomb.c +++ b/Source/shared/cstrike/weaponc4bomb.c @@ -163,7 +163,7 @@ void WeaponC4BOMB_Drop( vector vBombPos, vector vNormal ) { // Align the bomb to the wall vector vBombAngles = self.angles + '0 90 0'; - vBombAngles_x *= -1; + vBombAngles[0] *= -1; makevectors( vBombAngles ); vector vCoplanar = v_forward - ( v_forward * vNormal ) * vNormal; eBomb.angles = vectoangles( vCoplanar, vNormal ); diff --git a/Source/shared/spraylogo.cpp b/Source/shared/spraylogo.cpp index 4bada135..ea88e06e 100644 --- a/Source/shared/spraylogo.cpp +++ b/Source/shared/spraylogo.cpp @@ -20,12 +20,12 @@ void Spray_RemoveAll(entity entOwner) float Spray_SendEntity(entity ePVSEnt, float fChanged) { WriteByte(MSG_ENTITY, ENT_SPRAY); - WriteCoord(MSG_ENTITY, self.origin_x); - WriteCoord(MSG_ENTITY, self.origin_y); - WriteCoord(MSG_ENTITY, self.origin_z); - WriteCoord(MSG_ENTITY, self.angles_x); - WriteCoord(MSG_ENTITY, self.angles_y); - WriteCoord(MSG_ENTITY, self.angles_z); + WriteCoord(MSG_ENTITY, self.origin[0]); + WriteCoord(MSG_ENTITY, self.origin[1]); + WriteCoord(MSG_ENTITY, self.origin[2]); + WriteCoord(MSG_ENTITY, self.angles[0]); + WriteCoord(MSG_ENTITY, self.angles[1]); + WriteCoord(MSG_ENTITY, self.angles[2]); WriteEntity(MSG_ENTITY, self.owner); return TRUE; } @@ -49,13 +49,13 @@ void CSEv_Spraylogo(void) eSpray.solid = SOLID_NOT; setorigin(eSpray, trace_endpos); vector vSprayAngles = self.v_angle; - vSprayAngles_x *= -1; + vSprayAngles[0] *= -1; makevectors(vSprayAngles); vector vecCoplanar = v_forward -(v_forward * trace_plane_normal) * trace_plane_normal; - if (trace_plane_normal_z == 0) { + if (trace_plane_normal[2] == 0) { vecCoplanar = '0 0 1'; } diff --git a/Source/shared/valve/animations.c b/Source/shared/valve/animations.c index fb8332af..73705896 100755 --- a/Source/shared/valve/animations.c +++ b/Source/shared/valve/animations.c @@ -143,9 +143,9 @@ void Animation_PlayerUpdate( void ) { self.baseframe1time = 0.0f; } - self.bonecontrol1 = self.angles_x; + self.bonecontrol1 = self.angles[0]; #endif - self.angles_x = self.angles_z = 0; + self.angles[0] = self.angles[2] = 0; if ( !( self.flags & FL_ONGROUND ) ) { /*self.frame = ANIM_JUMP;*/ @@ -160,7 +160,7 @@ void Animation_PlayerUpdate( void ) { #ifdef SSQC // On the CSQC it's done in Player.c - self.subblend2frac = self.v_angle_x / 90; + self.subblend2frac = self.v_angle[0] / 90; #endif } diff --git a/Source/shared/valve/w_snark.c b/Source/shared/valve/w_snark.c index 26725621..d5e8124e 100644 --- a/Source/shared/valve/w_snark.c +++ b/Source/shared/valve/w_snark.c @@ -77,7 +77,7 @@ string w_snark_vmodel(void) } string w_snark_wmodel(void) { - return "models/w_squeak.mdl"; + return "models/w_sqknest.mdl"; } string w_snark_pmodel(void) { diff --git a/Source/shared/valve/w_tripmine.c b/Source/shared/valve/w_tripmine.c index e3cb05e8..4e64ce4c 100644 --- a/Source/shared/valve/w_tripmine.c +++ b/Source/shared/valve/w_tripmine.c @@ -22,12 +22,11 @@ enum void w_tripmine_precache(void) { precache_model("models/v_tripmine.mdl"); - precache_model("models/w_tripmine.mdl"); precache_model("models/p_tripmine.mdl"); } string w_tripmine_vmodel(void) { - return "models/v_tripmine.mdl"; + return "models/w_tripmine.mdl"; } string w_tripmine_wmodel(void) {