Cleanup: Change instances of _x to [0], y to [1] and z to [2]
This commit is contained in:
parent
7e74f7adec
commit
8220ce4116
31 changed files with 119 additions and 120 deletions
|
@ -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;
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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 );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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' );
|
||||
|
|
|
@ -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 ) {
|
||||
|
|
|
@ -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 );
|
||||
|
|
|
@ -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 );
|
||||
}
|
||||
|
|
|
@ -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' );
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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];
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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 );
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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 );
|
||||
|
|
|
@ -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';
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue