Initial Commit
This commit is contained in:
parent
2fd206d49d
commit
0d58529b79
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,40 @@
|
|||
/*
|
||||
OpenCS Project
|
||||
Copyright (C) 2015 Marco "eukara" Hladik
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
// flags for 2d drawing
|
||||
#define DRAWFLAG_NORMAL 0
|
||||
#define DRAWFLAG_ADDITIVE 1
|
||||
#define DRAWFLAG_MODULATE 2
|
||||
#define DRAWFLAG_2XMODULATE 3
|
||||
|
||||
float fVGUI_Display; // The VGUI menu currently being drawn
|
||||
|
||||
vector vVideoResolution; // Updated every frame
|
||||
|
||||
// Input globals, feel free to use them since they are updated upon input
|
||||
float fInputKeyCode;
|
||||
float fInputKeyASCII;
|
||||
float fInputKeyDown;
|
||||
|
||||
// Input globals for the mouse
|
||||
float fMouseClick;
|
||||
vector vMousePos;
|
||||
|
||||
void View_PlayAnimation( int iSequence );
|
|
@ -0,0 +1,41 @@
|
|||
/*
|
||||
OpenCS Project
|
||||
Copyright (C) 2015 Marco "eukara" Hladik
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
void CSQC_UpdateView( float fWinWidth, float fWinHeight, float fGameFocus ) {
|
||||
vVideoResolution_x = fWinWidth;
|
||||
vVideoResolution_y = fWinHeight;
|
||||
|
||||
clearscene();
|
||||
setproperty( VF_DRAWENGINESBAR, 0 );
|
||||
setproperty( VF_DRAWCROSSHAIR, 0 );
|
||||
|
||||
addentities( MASK_ENGINE );
|
||||
View_DrawViewModel();
|
||||
renderscene();
|
||||
|
||||
if( fGameFocus == TRUE ) {
|
||||
HUD_Draw();
|
||||
CSQC_VGUI_Draw();
|
||||
}
|
||||
}
|
||||
|
||||
void CSQC_UpdateViewLoading( float fWinWidth, float fWinHeight, float fGameFocus ) {
|
||||
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
/*
|
||||
OpenCS Project
|
||||
Copyright (C) 2015 Marco "eukara" Hladik
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
void CSQC_Ent_Update( float isnew ) {
|
||||
|
||||
}
|
||||
|
||||
void CSQC_Ent_Remove( void ) {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,88 @@
|
|||
/*
|
||||
OpenCS Project
|
||||
Copyright (C) 2015 Marco "eukara" Hladik
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
void CSQC_ConsoleCommand_Init( void ) {
|
||||
registercommand( "vgui_buymenu" );
|
||||
}
|
||||
|
||||
float CSQC_ConsoleCommand( string sCMD ) {
|
||||
tokenize( sCMD );
|
||||
switch ( argv(0) )
|
||||
{
|
||||
case "vgui_buymenu":
|
||||
if( getstatf( 34 ) == TRUE ) {
|
||||
fVGUI_Display = VGUI_BM_MAIN;
|
||||
}
|
||||
return TRUE;
|
||||
break;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void CSQC_Parse_Event( void ) {
|
||||
float fHeader = readbyte();
|
||||
|
||||
if ( fHeader == EV_WEAPON_DRAW ) {
|
||||
Weapon_Draw( getstatf( STAT_ACTIVEWEAPON ) );
|
||||
} else if ( fHeader == EV_WEAPON_PRIMARYATTACK ) {
|
||||
Weapon_PrimaryAttack( getstatf( STAT_ACTIVEWEAPON ) );
|
||||
} else if ( fHeader == EV_WEAPON_SECONDARYATTACK ) {
|
||||
Weapon_SecondaryAttack( getstatf( STAT_ACTIVEWEAPON ) );
|
||||
} else if ( fHeader == EV_WEAPON_RELOAD ) {
|
||||
Weapon_Reload( getstatf( STAT_ACTIVEWEAPON ) );
|
||||
}
|
||||
}
|
||||
|
||||
float CSQC_InputEvent( float fEventType, float fKey, float fCharacter, float fDeviceID ) {
|
||||
if ( fEventType == IE_KEYDOWN ) {
|
||||
if ( fKey == K_MOUSE1 ) {
|
||||
fMouseClick = 1;
|
||||
} else {
|
||||
fInputKeyDown = 1;
|
||||
}
|
||||
|
||||
fInputKeyCode = fKey;
|
||||
fInputKeyASCII = fCharacter;
|
||||
} else if ( fEventType == IE_KEYUP ) {
|
||||
if ( fKey == K_MOUSE1 ) {
|
||||
fMouseClick = 0;
|
||||
} else {
|
||||
fInputKeyDown = 0;
|
||||
}
|
||||
fInputKeyCode = 0;
|
||||
fInputKeyASCII = 0;
|
||||
} else if ( fEventType == IE_MOUSEABS ) {
|
||||
vMousePos_x = fKey;
|
||||
vMousePos_y = fCharacter;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void CSQC_Input_Frame( void ) {
|
||||
// If we are inside a VGUI, don't let the client do stuff outside
|
||||
if ( fVGUI_Display != VGUI_NONE ) {
|
||||
input_angles = '0 0 0';
|
||||
input_movevalues = '0 0 0';
|
||||
input_buttons = 0;
|
||||
input_impulse = 0;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,152 @@
|
|||
/*
|
||||
OpenCS Project
|
||||
Copyright (C) 2015 Marco "eukara" Hladik
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#define HUD_NUMFILE "sprites/640hud7.spr" // We'll precache this
|
||||
#define HUD_NUMFILE_LAYER "sprites/640hud7.spr_0.tga" // And only use the first frame for drawing (needs precache)
|
||||
|
||||
#define NUMSIZE_X 0.09375
|
||||
#define NUMSIZE_Y 0.09765625
|
||||
|
||||
float vHUDNumPos[10] = {
|
||||
0,
|
||||
0.09375,
|
||||
0.1875,
|
||||
0.28125,
|
||||
0.375,
|
||||
0.46875,
|
||||
0.5625,
|
||||
0.65625,
|
||||
0.75,
|
||||
0.84375,
|
||||
};
|
||||
|
||||
vector vHUDCalPos[10] = {
|
||||
'0 0 0',
|
||||
'0.09375 0.28125 0', // 50AE
|
||||
'0.28125 0.28125 0', // 762MM
|
||||
'0 0.375 0', // 556MM
|
||||
'0.09375 0.375 0', // 338MAG
|
||||
'0.1875 0.28125 0', // 9MM
|
||||
'0 0.28125 0', // BUCKSHOT
|
||||
'0.375 0.28125 0', // 45ACP
|
||||
'0.46875 0.28125 0', // 357SIG
|
||||
'0.46875 0.375 0', // 57MM
|
||||
};
|
||||
|
||||
// Draws an individual number
|
||||
void HUD_DrawNumber( int iNumber, vector vPos ) {
|
||||
if (iNumber < 0) iNumber = 0;
|
||||
if (iNumber > 9) iNumber = 9;
|
||||
|
||||
drawsubpic( vPos, '24 25 0', HUD_NUMFILE_LAYER, [ vHUDNumPos[ iNumber ], 0], [ NUMSIZE_X, NUMSIZE_Y ], VGUI_WINDOW_FGCOLOR, 1, DRAWFLAG_ADDITIVE );
|
||||
}
|
||||
|
||||
// Draws numerals quickly with a maximum length of 3 - e.g. for health, armor etc.
|
||||
void HUD_DrawNums( float fNumber, vector vPos ) {
|
||||
int iNumber = fNumber;
|
||||
if ( iNumber > 0 ) {
|
||||
while ( iNumber > 0 ) {
|
||||
HUD_DrawNumber( (float)iNumber % 10, vPos );
|
||||
iNumber = iNumber / 10;
|
||||
vPos_x -= 24;
|
||||
}
|
||||
} else {
|
||||
HUD_DrawNumber( 0, vPos );
|
||||
}
|
||||
}
|
||||
|
||||
// Called every frame
|
||||
void HUD_Draw( void ) {
|
||||
if( getplayerkeyvalue( player_localnum, "*spectator" ) == "1" ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Health
|
||||
vector vHealthPos = [ 16, vVideoResolution_y - 42 ];
|
||||
drawsubpic( vHealthPos, '24 24 0', HUD_NUMFILE_LAYER, [ NUMSIZE_X * 2, NUMSIZE_Y], [ NUMSIZE_X, NUMSIZE_X ], VGUI_WINDOW_FGCOLOR, 1, DRAWFLAG_ADDITIVE );
|
||||
HUD_DrawNums( getstatf( STAT_HEALTH ), vHealthPos + '72 0' );
|
||||
|
||||
// Armor
|
||||
vector vArmorPos = [ 136, vVideoResolution_y - 42 ];
|
||||
drawsubpic( vArmorPos, '24 24 0', HUD_NUMFILE_LAYER, [ 0, NUMSIZE_Y], [ NUMSIZE_X, NUMSIZE_X ], VGUI_WINDOW_FGCOLOR, 1, DRAWFLAG_ADDITIVE );
|
||||
HUD_DrawNums( getstatf( STAT_ARMOR ), vArmorPos + '72 0' );
|
||||
|
||||
// BuyZone Icon
|
||||
if( getstatf( STAT_BUYZONE ) == TRUE ) {
|
||||
vector vBuyIconPos = [ 16, ( vVideoResolution_y / 2 ) - 12 ];
|
||||
drawsubpic( vBuyIconPos, '32 32 0', HUD_NUMFILE_LAYER, [ 0.125 * 3, 0.125 * 5 - 0.046875], [ 0.125, 0.125 ], '0 1 0', 1, DRAWFLAG_ADDITIVE );
|
||||
}
|
||||
|
||||
// Hostage-Rescue Area Icon
|
||||
if( getstatf( STAT_HOSTAGEZONE ) == TRUE ) {
|
||||
vector vRIconPos = [ 16, ( vVideoResolution_y / 2 ) + 48 ];
|
||||
drawsubpic( vRIconPos, '32 32 0', HUD_NUMFILE_LAYER, [ 0.125 * 2, 0.125 * 5 - 0.046875], [ 0.125, 0.125 ], '0 1 0', 1, DRAWFLAG_ADDITIVE );
|
||||
}
|
||||
|
||||
// Bomb-Area
|
||||
if( getstatf( STAT_BOMBZONE ) == TRUE ) {
|
||||
vector vBIconPos = [ 16, ( vVideoResolution_y / 2 ) + 48 ];
|
||||
drawsubpic( vBIconPos, '32 32 0', HUD_NUMFILE_LAYER, [ 0, 0.125 * 5 - 0.046875], [ 0.125, 0.125 ], '0 1 0', 1, DRAWFLAG_ADDITIVE );
|
||||
}
|
||||
|
||||
// The Timer
|
||||
int iMinutes, iSeconds, iTens, iUnits;
|
||||
vector vTimePos = [ ( vVideoResolution_x / 2 ) - 60, vVideoResolution_y - 42 ];
|
||||
|
||||
if( serverkey( "timelimit" ) ) {
|
||||
float fTimeLeft = ( stof(serverkey( "timelimit" )) * 60 ) - time;
|
||||
if( fTimeLeft < 0 ) {
|
||||
iMinutes = iSeconds = iTens = iUnits = 0;
|
||||
} else {
|
||||
iMinutes = fTimeLeft / 60;
|
||||
iSeconds = fTimeLeft - 60 * iMinutes;
|
||||
iTens = iSeconds / 10;
|
||||
iUnits = iSeconds - 10*iTens;
|
||||
}
|
||||
} else {
|
||||
iMinutes = time / 60;
|
||||
iSeconds = time - 60*iMinutes;
|
||||
iTens = iSeconds / 10;
|
||||
iUnits = iSeconds - 10*iTens;
|
||||
}
|
||||
|
||||
drawsubpic( vTimePos, '24 25 0', HUD_NUMFILE_LAYER, [ NUMSIZE_X * 6, NUMSIZE_Y * 3], [ NUMSIZE_X, NUMSIZE_Y ], VGUI_WINDOW_FGCOLOR, 1, DRAWFLAG_ADDITIVE );
|
||||
HUD_DrawNumber( iMinutes, vTimePos + '48 0 0');
|
||||
HUD_DrawNumber( iTens, vTimePos + '70 0 0');
|
||||
HUD_DrawNumber( iUnits, vTimePos + '94 0 0' );
|
||||
|
||||
// The money
|
||||
vector vMoneyPos = [ vVideoResolution_x - 160, vVideoResolution_y - 72 ];
|
||||
|
||||
drawsubpic( vMoneyPos, '18 25 0', HUD_NUMFILE_LAYER, [ NUMSIZE_X * 8, NUMSIZE_Y * 1], [ NUMSIZE_X * 0.75, NUMSIZE_Y ], VGUI_WINDOW_FGCOLOR, 1, DRAWFLAG_ADDITIVE );
|
||||
vMoneyPos_x += ( 24 * 5 );
|
||||
|
||||
HUD_DrawNums( getstatf( STAT_MONEY ), vMoneyPos );
|
||||
|
||||
// Ammo
|
||||
vector vAmmoClipPos = [ vVideoResolution_x - 160, vVideoResolution_y - 42 ];
|
||||
HUD_DrawNums( getstatf( STAT_CURRENT_CLIP ), vAmmoClipPos );
|
||||
|
||||
vector vAmmoCalPos = [ vVideoResolution_x - 88, vVideoResolution_y - 42 ];
|
||||
HUD_DrawNums( getstatf( STAT_CURRENT_CALIBER ), vAmmoCalPos );
|
||||
|
||||
// Caliber icon
|
||||
drawsubpic( vVideoResolution - '42 42 0', '24 24 0', HUD_NUMFILE_LAYER, vHUDCalPos[ wptTable[ getstatf( STAT_ACTIVEWEAPON ) ].iCaliber ], [ NUMSIZE_X, NUMSIZE_X ], VGUI_WINDOW_FGCOLOR, 1, DRAWFLAG_ADDITIVE );
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
/*
|
||||
OpenCS Project
|
||||
Copyright (C) 2015 Marco "eukara" Hladik
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
void CSQC_Init(float apilevel, string enginename, float engineversion) {
|
||||
precache_model( HUD_NUMFILE );
|
||||
|
||||
for( int i = 0; i < CS_WEAPON_COUNT; i++ ) {
|
||||
precache_model( sViewModels[ i ] );
|
||||
}
|
||||
|
||||
CSQC_ConsoleCommand_Init();
|
||||
CSQC_VGUI_Init();
|
||||
}
|
||||
|
||||
void CSQC_WorldLoaded( void ) {
|
||||
|
||||
}
|
||||
|
||||
void CSQC_Shutdown( void ) {
|
||||
|
||||
}
|
|
@ -0,0 +1,59 @@
|
|||
[editor]
|
||||
line_wrapping=false
|
||||
line_break_column=72
|
||||
auto_continue_multiline=true
|
||||
|
||||
[file_prefs]
|
||||
final_new_line=true
|
||||
ensure_convert_new_lines=false
|
||||
strip_trailing_spaces=false
|
||||
replace_tabs=false
|
||||
|
||||
[indentation]
|
||||
indent_width=4
|
||||
indent_type=1
|
||||
indent_hard_tab_width=8
|
||||
detect_indent=false
|
||||
detect_indent_width=false
|
||||
indent_mode=2
|
||||
|
||||
[project]
|
||||
name=OpenCS: Client
|
||||
base_path=/home/eukara/Projects/OpenCS/Source/Client/
|
||||
description=
|
||||
file_patterns=
|
||||
|
||||
[long line marker]
|
||||
long_line_behaviour=1
|
||||
long_line_column=72
|
||||
|
||||
[files]
|
||||
current_page=1
|
||||
FILE_NAME_0=1317;C;0;EUTF-8;1;1;0;%2Fhome%2Feukara%2FProjects%2FOpenCS%2FSource%2FShared%2FWeaponUSP45.c;0;4
|
||||
FILE_NAME_1=3034;C;0;EUTF-8;1;1;0;%2Fhome%2Feukara%2FProjects%2FOpenCS%2FSource%2FShared%2FWeaponGlock18.c;0;4
|
||||
FILE_NAME_2=0;C;0;EUTF-8;1;1;0;%2Fhome%2Feukara%2FProjects%2FOpenCS%2FSource%2FServer%2FInput.c;0;4
|
||||
FILE_NAME_3=740;C;0;EUTF-8;1;1;0;%2Fhome%2Feukara%2FProjects%2FOpenCS%2FSource%2FClient%2FView.c;0;4
|
||||
|
||||
[VTE]
|
||||
last_dir=/home/eukara
|
||||
|
||||
[build-menu]
|
||||
NF_00_LB=_Make
|
||||
NF_00_CM=fteqcc
|
||||
NF_00_WD=
|
||||
NF_01_LB=Make Custom _Target...
|
||||
NF_01_CM=fteqcc
|
||||
NF_01_WD=
|
||||
NF_02_LB=Make _Object
|
||||
NF_02_CM=fteqcc
|
||||
NF_02_WD=
|
||||
CFT_00_LB=_Compile
|
||||
CFT_00_CM=fteqcc
|
||||
CFT_00_WD=
|
||||
CFT_01_LB=_Build
|
||||
CFT_01_CM=fteqcc"
|
||||
CFT_01_WD=
|
||||
CFT_02_LB=_Lint
|
||||
CFT_02_CM=fteqcc
|
||||
CFT_02_WD=
|
||||
filetypes=C;
|
|
@ -0,0 +1,23 @@
|
|||
/*
|
||||
OpenCS Project
|
||||
Copyright (C) 2015 Marco "eukara" Hladik
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
float CSQC_Event_Sound( float entnum, float channel, string soundname, float vol, float attenuation, vector pos, float pitchmod, float flags ) {
|
||||
|
||||
}
|
|
@ -0,0 +1,62 @@
|
|||
/*
|
||||
OpenCS Project
|
||||
Copyright (C) 2015 Marco "eukara" Hladik
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "VGUI.h"
|
||||
|
||||
// Menus with their window titles and draw functions
|
||||
vguiwindow_t vguiMenus[11] = {
|
||||
{ "Message Of The Day", VGUI_MessageOfTheDay },
|
||||
{ "Team Selection", VGUI_TeamSelect_Main },
|
||||
{ "Terrorist Selection", VGUI_TeamSelect_T },
|
||||
{ "Counter-Terrorist Selection", VGUI_TeamSelect_CT },
|
||||
{ "Buy Menu", VGUI_BuyMenu_Main },
|
||||
{ "Handguns", VGUI_BuyMenu_Handguns },
|
||||
{ "Shotgun", VGUI_BuyMenu_Shotguns },
|
||||
{ "Sub-Machine-Guns", VGUI_BuyMenu_SMGs },
|
||||
{ "Rifles", VGUI_BuyMenu_Rifles },
|
||||
{ "Machineguns", VGUI_BuyMenu_Machineguns },
|
||||
{ "Equipment", VGUI_BuyMenu_Equipment }
|
||||
};
|
||||
|
||||
// Called every frame
|
||||
void CSQC_VGUI_Draw( void ) {
|
||||
if ( fVGUI_Display == VGUI_NONE ) {
|
||||
setcursormode( FALSE );
|
||||
return;
|
||||
}
|
||||
|
||||
setcursormode( TRUE );
|
||||
|
||||
// Align the window to the center
|
||||
vVGUIWindowPos_x = ( vVideoResolution_x / 2 ) - 320;
|
||||
vVGUIWindowPos_y = ( vVideoResolution_y / 2 ) - 240;
|
||||
VGUI_Window( vguiMenus[ fVGUI_Display - 1 ].sTitle, vVGUIWindowPos, '640 480 0' );
|
||||
|
||||
// Display the contents of whatever we have selected
|
||||
vguiMenus[ fVGUI_Display - 1 ].vDraw( vVGUIWindowPos );
|
||||
}
|
||||
|
||||
// Called by CSQC_Init
|
||||
void CSQC_VGUI_Init( void ) {
|
||||
// We start on the MOTD, always
|
||||
fVGUI_Display = VGUI_MOTD;
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,52 @@
|
|||
/*
|
||||
OpenCS Project
|
||||
Copyright (C) 2015 Marco "eukara" Hladik
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#define VGUI_WINDOW_BGCOLOR '0.0 0.0 0.0'
|
||||
#define VGUI_WINDOW_FGCOLOR '1.0 0.5 0.0'
|
||||
#define VGUI_WINDOW_BGALPHA 0.8
|
||||
#define VGUI_WINDOW_FGALPHA 1.0
|
||||
|
||||
enum {
|
||||
VGUI_NONE = 0,
|
||||
VGUI_MOTD,
|
||||
VGUI_TEAMSELECT,
|
||||
VGUI_TEAM_T,
|
||||
VGUI_TEAM_CT,
|
||||
VGUI_BM_MAIN,
|
||||
VGUI_BM_HANDGUNS,
|
||||
VGUI_BM_SHOTGUNS,
|
||||
VGUI_BM_SMG,
|
||||
VGUI_BM_RIFLES,
|
||||
VGUI_BM_MGS,
|
||||
VGUI_BM_EQUIPMENT
|
||||
};
|
||||
|
||||
vector vVGUIWindowPos;
|
||||
vector vVGUIButtonPos;
|
||||
|
||||
typedef struct {
|
||||
string sTitle;
|
||||
void( vector vPos ) vDraw;
|
||||
} vguiwindow_t;
|
||||
|
||||
typedef struct {
|
||||
string sName;
|
||||
string sImage;
|
||||
} vguiweapon_t;
|
|
@ -0,0 +1,261 @@
|
|||
/*
|
||||
OpenCS Project
|
||||
Copyright (C) 2015 Marco "eukara" Hladik
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "VGUI.h"
|
||||
|
||||
vguiweapon_t vguiWeaponTable[ CS_WEAPON_COUNT ] = {
|
||||
{ "None", "" },
|
||||
{ "Knife", "" },
|
||||
{ "H&K USP .45 Tactical", "gfx/vgui/640_usp" },
|
||||
{ "Glock18 Select Fire", "gfx/vgui/640_glock18" },
|
||||
{ "Desert Eagle .50AE", "gfx/vgui/640_deagle" },
|
||||
{ "SIG P228", "gfx/vgui/640_p228" },
|
||||
{ "Dual Beretta 96G Elite", "gfx/vgui/640_elite" },
|
||||
{ "FN Five-Seven", "gfx/vgui/640_fiveseven" },
|
||||
{ "Benelli M3 Super90", "gfx/vgui/640_m3" },
|
||||
{ "Benelli XM1014", "gfx/vgui/640_xm1014" },
|
||||
{ "H&K MP5-Navy", "gfx/vgui/640_mp5" },
|
||||
{ "FN P90", "gfx/vgui/640_p90" },
|
||||
{ "H&K UMP45", "gfx/vgui/640_ump45" },
|
||||
{ "Ingram MAC-10", "gfx/vgui/640_mac10" },
|
||||
{ "Steyr Tactical Machine Pistol", "gfx/vgui/640_tmp" },
|
||||
{ "AK-47", "gfx/vgui/640_ak47" },
|
||||
{ "Sig SG-552 Commando", "gfx/vgui/640_sg552" },
|
||||
{ "Colt M4A1 Carbine", "gfx/vgui/640_m4a1" },
|
||||
{ "Steyr Aug", "gfx/vgui/640_aug" },
|
||||
{ "Steyr Scout", "gfx/vgui/640_scout" },
|
||||
{ "AI Arctic Warfare/Magnum", "gfx/vgui/640_awp" },
|
||||
{ "H&K G3/SG-1 Sniper Rifle", "gfx/vgui/640_g3sg1" },
|
||||
{ "Sig SG-550 Sniper", "gfx/vgui/640_sg550" },
|
||||
{ "FN M249 Para", "gfx/vgui/640_m249" }
|
||||
};
|
||||
|
||||
// TODO: Clean this up
|
||||
void VGUI_BuyMenu_Main( vector vPos ) {
|
||||
static void BuyMenu_Main_1( void ) {
|
||||
fVGUI_Display = VGUI_BM_HANDGUNS;
|
||||
}
|
||||
static void BuyMenu_Main_2( void ) {
|
||||
fVGUI_Display = VGUI_BM_SHOTGUNS;
|
||||
}
|
||||
static void BuyMenu_Main_3( void ) {
|
||||
fVGUI_Display = VGUI_BM_SMG;
|
||||
}
|
||||
static void BuyMenu_Main_4( void ) {
|
||||
fVGUI_Display = VGUI_BM_RIFLES;
|
||||
}
|
||||
static void BuyMenu_Main_5( void ) {
|
||||
fVGUI_Display = VGUI_BM_MGS;
|
||||
}
|
||||
static void BuyMenu_Main_6( void ) {
|
||||
fVGUI_Display = VGUI_NONE;
|
||||
}
|
||||
static void BuyMenu_Main_7( void ) {
|
||||
fVGUI_Display = VGUI_NONE;
|
||||
}
|
||||
static void BuyMenu_Main_8( void ) {
|
||||
fVGUI_Display = VGUI_BM_EQUIPMENT;
|
||||
}
|
||||
|
||||
VGUI_Button( "Handguns", BuyMenu_Main_1, vPos + '16 116 0', '180 24 0' );
|
||||
VGUI_Button( "Shotguns", BuyMenu_Main_2, vPos + '16 148 0', '180 24 0' );
|
||||
VGUI_Button( "SMGs", BuyMenu_Main_3, vPos + '16 180 0', '180 24 0' );
|
||||
VGUI_Button( "Rifles", BuyMenu_Main_4, vPos + '16 212 0', '180 24 0' );
|
||||
VGUI_Button( "Machine Gun", BuyMenu_Main_5, vPos + '16 244 0', '180 24 0' );
|
||||
|
||||
VGUI_Button( "Primary Ammo", BuyMenu_Main_6, vPos + '16 308 0', '180 24 0' );
|
||||
VGUI_Button( "Secondary Ammo", BuyMenu_Main_7, vPos + '16 340 0', '180 24 0' );
|
||||
VGUI_Button( "Equipment", BuyMenu_Main_8, vPos + '16 372 0', '180 24 0' );
|
||||
|
||||
VGUI_Button( "Exit", BuyMenu_Main_7, vPos + '16 440 0', '180 24 0' );
|
||||
}
|
||||
|
||||
void VGUI_BuyMenu_Back( void ) {
|
||||
fVGUI_Display = VGUI_BM_MAIN;
|
||||
}
|
||||
|
||||
/*
|
||||
====================
|
||||
VGUI_BuyMenu_BuyWeapon
|
||||
|
||||
This is kinda ugly, but it will work for now
|
||||
====================
|
||||
*/
|
||||
float iLastSelected;
|
||||
void VGUI_BuyMenu_BuyWeapon( void ) {
|
||||
if( iLastSelected ) {
|
||||
sendevent( "GamePlayerBuy", "f", iLastSelected );
|
||||
fVGUI_Display = VGUI_NONE;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
====================
|
||||
VGUI_BuyMenu_Button
|
||||
|
||||
Draws a button that displays whether or not you can purchase said weapon etc.
|
||||
====================
|
||||
*/
|
||||
void VGUI_BuyMenu_Button( float fWeapon ) {
|
||||
iLastSelected = fWeapon;
|
||||
|
||||
if ( wptTable[ fWeapon ].iPrice <= getstatf( STAT_MONEY ) ) {
|
||||
if ( VGUI_Button( vguiWeaponTable[ fWeapon ].sName, VGUI_BuyMenu_BuyWeapon, vVGUIButtonPos, '180 24 0' ) == TRUE ) {
|
||||
drawpic( vVGUIWindowPos + '290 116', vguiWeaponTable[ fWeapon ].sImage, '256 64', '1 1 1', 1 );
|
||||
VGUI_Text( sprintf( "Price: %d", (float)wptTable[ fWeapon ].iPrice ) , vVGUIWindowPos + '256 250', '8 8 0' );
|
||||
VGUI_Text( sprintf( "Caliber: %d", (float)wptTable[ fWeapon ].iCaliber ) , vVGUIWindowPos + '256 260', '8 8 0' );
|
||||
VGUI_Text( sprintf( "Rounds Per Minute: %d", ( wptTable[ fWeapon ].fAttackFinished) * 3600 ) , vVGUIWindowPos + '256 270', '8 8 0' );
|
||||
}
|
||||
} else {
|
||||
VGUI_FakeButton( vguiWeaponTable[ fWeapon ].sName, vVGUIButtonPos, '180 24 0' );
|
||||
}
|
||||
|
||||
vVGUIButtonPos_y += 32;
|
||||
}
|
||||
|
||||
/*
|
||||
====================
|
||||
VGUI_BuyMenu_Handguns
|
||||
====================
|
||||
*/
|
||||
void VGUI_BuyMenu_Handguns( vector vPos ) {
|
||||
vVGUIButtonPos = vPos + '16 116 0';
|
||||
|
||||
VGUI_BuyMenu_Button( WEAPON_USP45 );
|
||||
VGUI_BuyMenu_Button( WEAPON_GLOCK18 );
|
||||
VGUI_BuyMenu_Button( WEAPON_DEAGLE );
|
||||
VGUI_BuyMenu_Button( WEAPON_P228 );
|
||||
|
||||
vVGUIButtonPos_y += 32;
|
||||
|
||||
if ( getplayerkeyvalue( player_localnum, "team" ) == "t" ) {
|
||||
VGUI_BuyMenu_Button( WEAPON_ELITES );
|
||||
}
|
||||
|
||||
if ( getplayerkeyvalue( player_localnum, "team" ) == "ct" ) {
|
||||
VGUI_BuyMenu_Button( WEAPON_FIVESEVEN );
|
||||
}
|
||||
VGUI_Button( "Back", VGUI_BuyMenu_Back, vPos + '16 440 0', '180 24 0' );
|
||||
}
|
||||
|
||||
/*
|
||||
====================
|
||||
VGUI_BuyMenu_Shotguns
|
||||
====================
|
||||
*/
|
||||
void VGUI_BuyMenu_Shotguns( vector vPos ) {
|
||||
vVGUIButtonPos = vPos + '16 116 0';
|
||||
|
||||
VGUI_BuyMenu_Button( WEAPON_M3 );
|
||||
VGUI_BuyMenu_Button( WEAPON_XM1014 );
|
||||
|
||||
VGUI_Button( "Back", VGUI_BuyMenu_Back, vPos + '16 440 0', '180 24 0' );
|
||||
}
|
||||
|
||||
/*
|
||||
====================
|
||||
VGUI_BuyMenu_SMGs
|
||||
====================
|
||||
*/
|
||||
void VGUI_BuyMenu_SMGs( vector vPos ) {
|
||||
vVGUIButtonPos = vPos + '16 116 0';
|
||||
|
||||
|
||||
VGUI_BuyMenu_Button( WEAPON_MP5 );
|
||||
VGUI_BuyMenu_Button( WEAPON_P90 );
|
||||
VGUI_BuyMenu_Button( WEAPON_UMP45 );
|
||||
|
||||
vVGUIButtonPos_y += 32;
|
||||
|
||||
if ( getplayerkeyvalue( player_localnum, "team" ) == "t" ) {
|
||||
VGUI_BuyMenu_Button( WEAPON_MAC10 );
|
||||
}
|
||||
|
||||
if ( getplayerkeyvalue( player_localnum, "team" ) == "ct" ) {
|
||||
VGUI_BuyMenu_Button( WEAPON_TMP );
|
||||
}
|
||||
|
||||
VGUI_Button( "Back", VGUI_BuyMenu_Back, vPos + '16 440 0', '180 24 0' );
|
||||
}
|
||||
|
||||
/*
|
||||
====================
|
||||
VGUI_BuyMenu_Rifles
|
||||
====================
|
||||
*/
|
||||
void VGUI_BuyMenu_Rifles( vector vPos ) {
|
||||
vVGUIButtonPos = vPos + '16 116 0';
|
||||
|
||||
if ( getplayerkeyvalue( player_localnum, "team" ) == "t" ) {
|
||||
VGUI_BuyMenu_Button( WEAPON_AK47 );
|
||||
VGUI_BuyMenu_Button( WEAPON_SG552 );
|
||||
|
||||
VGUI_BuyMenu_Button( WEAPON_SCOUT );
|
||||
VGUI_BuyMenu_Button( WEAPON_AWP );
|
||||
|
||||
VGUI_BuyMenu_Button( WEAPON_G3SG1 );
|
||||
}
|
||||
|
||||
if ( getplayerkeyvalue( player_localnum, "team" ) == "ct" ) {
|
||||
VGUI_BuyMenu_Button( WEAPON_M4A1 );
|
||||
VGUI_BuyMenu_Button( WEAPON_AUG );
|
||||
|
||||
VGUI_BuyMenu_Button( WEAPON_SCOUT );
|
||||
VGUI_BuyMenu_Button( WEAPON_AWP );
|
||||
|
||||
VGUI_BuyMenu_Button( WEAPON_SG550 );
|
||||
}
|
||||
|
||||
VGUI_Button( "Back", VGUI_BuyMenu_Back, vPos + '16 440 0', '180 24 0' );
|
||||
}
|
||||
|
||||
/*
|
||||
====================
|
||||
VGUI_BuyMenu_Machineguns
|
||||
====================
|
||||
*/
|
||||
void VGUI_BuyMenu_Machineguns( vector vPos ) {
|
||||
vVGUIButtonPos = vPos + '16 116 0';
|
||||
|
||||
VGUI_BuyMenu_Button( WEAPON_PARA );
|
||||
|
||||
VGUI_Button( "Back", VGUI_BuyMenu_Back, vPos + '16 440 0', '180 24 0' );
|
||||
}
|
||||
|
||||
/*
|
||||
====================
|
||||
VGUI_BuyMenu_Equipment
|
||||
====================
|
||||
*/
|
||||
void VGUI_BuyMenu_Equipment( vector vPos ) {
|
||||
|
||||
/*VGUI_BuyMenu_Button( "Kevlar Vest", "", BuyMenu_Equipment_1, vPos + '16 116 0', '180 24 0' );
|
||||
VGUI_BuyMenu_Button( "Kevlar Vest & Helmet", "", BuyMenu_Equipment_1, vPos + '16 148 0', '180 24 0' );
|
||||
VGUI_BuyMenu_Button( "Flashbang", "gfx/vgui/640_flashbang", BuyMenu_Equipment_1, vPos + '16 180 0', '180 24 0' );
|
||||
VGUI_BuyMenu_Button( "HE Grenade", "gfx/vgui/640_hegrenade", BuyMenu_Equipment_1, vPos + '16 212 0', '180 24 0' );
|
||||
VGUI_BuyMenu_Button( "Smoke Grenade", "gfx/vgui/640_smokegrenade", BuyMenu_Equipment_1, vPos + '16 244 0', '180 24 0' );
|
||||
VGUI_BuyMenu_Button( "NightVision Goggles", "", BuyMenu_Equipment_1, vPos + '16 276 0', '180 24 0' );*/
|
||||
|
||||
if ( getplayerkeyvalue( player_localnum, "team" ) == "ct" ) {
|
||||
//VGUI_BuyMenu_Button( "Defuse Kit", "", BuyMenu_Equipment_1, vPos + '16 308 0', '180 24 0' );
|
||||
}
|
||||
|
||||
VGUI_Button( "Back", VGUI_BuyMenu_Back, vPos + '16 440 0', '180 24 0' );
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
/*
|
||||
OpenCS Project
|
||||
Copyright (C) 2015 Marco "eukara" Hladik
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "VGUI.h"
|
||||
|
||||
// TODO: Read motd.txt and display that instead
|
||||
void VGUI_MessageOfTheDay( vector vPos ) {
|
||||
static void MessageOfTheDay_ButtonOK( void ) {
|
||||
fVGUI_Display = VGUI_TEAMSELECT;
|
||||
}
|
||||
|
||||
VGUI_Text( serverkey( "hostname" ), vPos + '16 64 0', '16 16 0');
|
||||
|
||||
VGUI_Text( "You are playing an early preview of this game.", vPos + '16 116 0', '8 8 0' );
|
||||
VGUI_Text( "Just press OK to proceed, or whatever.", vPos + '16 132 0', '8 8 0' );
|
||||
|
||||
VGUI_Button( "OK", MessageOfTheDay_ButtonOK, vPos + '16 440 0', '80 24 0' );
|
||||
}
|
|
@ -0,0 +1,136 @@
|
|||
/*
|
||||
OpenCS Project
|
||||
Copyright (C) 2015 Marco "eukara" Hladik
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "VGUI.h"
|
||||
|
||||
// Returns whether or not our mouse cursor hovers over a region
|
||||
float VGUI_CheckMouse( vector vPos, vector vReg ) {
|
||||
vector vSMins, vSMaxs;
|
||||
|
||||
vSMins = vPos;
|
||||
vSMaxs = vPos;
|
||||
vSMins_x = vPos_x;
|
||||
vSMaxs_y = vPos_y - 1;
|
||||
|
||||
vSMaxs_x = vPos_x + vReg_x;
|
||||
vSMaxs_y = vPos_y + vReg_y;
|
||||
|
||||
if ( vMousePos_x >= vSMins_x && vMousePos_x <= vSMaxs_x ) {
|
||||
if (vMousePos_y >= vSMins_y && vMousePos_y <= vSMaxs_y ) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Draws window with outline, border and title
|
||||
void VGUI_Window( string sTitle, vector vPos, vector vSize ) {
|
||||
vector v1, v2, v3;
|
||||
|
||||
// Draw the background
|
||||
drawfill( vPos, vSize - '1 1 0', VGUI_WINDOW_BGCOLOR, VGUI_WINDOW_BGALPHA );
|
||||
|
||||
// Draw the outline START
|
||||
v1_x = vPos_x + vSize_x;
|
||||
v1_y = vPos_y;
|
||||
drawline( 1.0, vPos - '1 0 0', v1, VGUI_WINDOW_FGCOLOR, VGUI_WINDOW_FGALPHA, DRAWFLAG_ADDITIVE );
|
||||
|
||||
v2_x = vPos_x;
|
||||
v2_y = vPos_y + vSize_y;
|
||||
drawline( 1.0, vPos, v2, VGUI_WINDOW_FGCOLOR, VGUI_WINDOW_FGALPHA, DRAWFLAG_ADDITIVE );
|
||||
|
||||
v3 = vPos + vSize;
|
||||
drawline( 1.0, v1, v3, VGUI_WINDOW_FGCOLOR, VGUI_WINDOW_FGALPHA, DRAWFLAG_ADDITIVE );
|
||||
drawline( 1.0, v2, v3, VGUI_WINDOW_FGCOLOR, VGUI_WINDOW_FGALPHA, DRAWFLAG_ADDITIVE );
|
||||
// Draw the outline END
|
||||
|
||||
// Draw the window title
|
||||
drawstring( vPos + '16 16 0', sTitle, '16 16 0', VGUI_WINDOW_FGCOLOR, VGUI_WINDOW_FGALPHA, DRAWFLAG_ADDITIVE );
|
||||
drawline( 1.0, vPos + '0 48 0', v1 + '0 48 0', VGUI_WINDOW_FGCOLOR, VGUI_WINDOW_FGALPHA, DRAWFLAG_ADDITIVE );
|
||||
}
|
||||
|
||||
// Draws a button, returns whether or not a mouse is hovering over it (for inheritance' sake)
|
||||
float VGUI_Button( string sLabel, void() vFunction, vector vPos, vector vSize ) {
|
||||
vector v1, v2, v3, v4;
|
||||
|
||||
// Draw the outline START
|
||||
v1_x = vPos_x + vSize_x;
|
||||
v1_y = vPos_y;
|
||||
drawline( 1.0, vPos - '1 0 0', v1, VGUI_WINDOW_FGCOLOR, VGUI_WINDOW_FGALPHA, DRAWFLAG_ADDITIVE );
|
||||
|
||||
v2_x = vPos_x;
|
||||
v2_y = vPos_y + vSize_y;
|
||||
drawline( 1.0, vPos, v2, VGUI_WINDOW_FGCOLOR, VGUI_WINDOW_FGALPHA, DRAWFLAG_ADDITIVE );
|
||||
|
||||
v3 = vPos + vSize;
|
||||
drawline( 1.0, v1, v3, VGUI_WINDOW_FGCOLOR, VGUI_WINDOW_FGALPHA, DRAWFLAG_ADDITIVE );
|
||||
drawline( 1.0, v2, v3, VGUI_WINDOW_FGCOLOR, VGUI_WINDOW_FGALPHA, DRAWFLAG_ADDITIVE );
|
||||
// Draw the outline END
|
||||
|
||||
// Draw the button label
|
||||
v4_x = vPos_x + 16;
|
||||
v4_y = vPos_y + ( ( vSize_y / 2 ) - 4 );
|
||||
|
||||
if( VGUI_CheckMouse( vPos, vSize ) ) {
|
||||
if ( fMouseClick == TRUE ) {
|
||||
vFunction();
|
||||
fMouseClick = FALSE;
|
||||
}
|
||||
|
||||
drawstring( v4, sLabel, '8 8 0', VGUI_WINDOW_FGCOLOR, VGUI_WINDOW_FGALPHA, DRAWFLAG_ADDITIVE );
|
||||
drawline( 1.0, v4 + '0 10 0', v4 + '0 10 0' + [ (strlen( sLabel ) * 8 ), 0 ], VGUI_WINDOW_FGCOLOR, VGUI_WINDOW_FGALPHA, DRAWFLAG_ADDITIVE );
|
||||
return TRUE;
|
||||
} else {
|
||||
drawstring( v4, sLabel, '8 8 0', VGUI_WINDOW_FGCOLOR * 0.8, VGUI_WINDOW_FGALPHA, DRAWFLAG_ADDITIVE );
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void VGUI_FakeButton( string sLabel, vector vPos, vector vSize ) {
|
||||
vector v1, v2, v3, v4;
|
||||
|
||||
// Draw the outline START
|
||||
v1_x = vPos_x + vSize_x;
|
||||
v1_y = vPos_y;
|
||||
drawline( 1.0, vPos - '1 0 0', v1, VGUI_WINDOW_FGCOLOR, VGUI_WINDOW_FGALPHA * 0.5, DRAWFLAG_ADDITIVE );
|
||||
|
||||
v2_x = vPos_x;
|
||||
v2_y = vPos_y + vSize_y;
|
||||
drawline( 1.0, vPos, v2, VGUI_WINDOW_FGCOLOR, VGUI_WINDOW_FGALPHA * 0.5, DRAWFLAG_ADDITIVE );
|
||||
|
||||
v3 = vPos + vSize;
|
||||
drawline( 1.0, v1, v3, VGUI_WINDOW_FGCOLOR, VGUI_WINDOW_FGALPHA * 0.5, DRAWFLAG_ADDITIVE );
|
||||
drawline( 1.0, v2, v3, VGUI_WINDOW_FGCOLOR, VGUI_WINDOW_FGALPHA * 0.5, DRAWFLAG_ADDITIVE );
|
||||
// Draw the outline END
|
||||
|
||||
// Draw the button label
|
||||
v4_x = vPos_x + 16;
|
||||
v4_y = vPos_y + ( ( vSize_y / 2 ) - 4 );
|
||||
|
||||
|
||||
drawstring( v4, sLabel, '8 8 0', VGUI_WINDOW_FGCOLOR * 0.5, VGUI_WINDOW_FGALPHA, DRAWFLAG_ADDITIVE );
|
||||
}
|
||||
|
||||
// Wrapper for simple VGUI Text labels
|
||||
void VGUI_Text( string sText, vector vPos, vector vSize ) {
|
||||
drawstring( vPos, sText, vSize, VGUI_WINDOW_FGCOLOR, VGUI_WINDOW_FGALPHA, DRAWFLAG_ADDITIVE );
|
||||
}
|
|
@ -0,0 +1,119 @@
|
|||
/*
|
||||
OpenCS Project
|
||||
Copyright (C) 2015 Marco "eukara" Hladik
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "VGUI.h"
|
||||
|
||||
void VGUI_TeamSelect_Main( vector vPos ) {
|
||||
static void TeamSelect_Main_ButtonT( void ) {
|
||||
fVGUI_Display = VGUI_TEAM_T;
|
||||
}
|
||||
static void TeamSelect_Main_ButtonCT( void ) {
|
||||
fVGUI_Display = VGUI_TEAM_CT;
|
||||
}
|
||||
static void TeamSelect_Main_ButtonAuto( void ) {
|
||||
fVGUI_Display = VGUI_NONE;
|
||||
}
|
||||
static void TeamSelect_Main_ButtonSpectate( void ) {
|
||||
sendevent( "GamePlayerSpawn", "f", 0 );
|
||||
fVGUI_Display = VGUI_NONE;
|
||||
}
|
||||
|
||||
VGUI_Text( "Gamemode Title", vPos + '16 64 0', '16 16 0');
|
||||
|
||||
VGUI_Text( "This is a description of the gamemode that you are playing.", vPos + '16 116 0', '8 8 0' );
|
||||
VGUI_Text( "As you can see, that stuff is not implemented yet.", vPos + '16 132 0', '8 8 0' );
|
||||
|
||||
VGUI_Button( "Terrorists", TeamSelect_Main_ButtonT, vPos + '16 240 0', '180 24 0' );
|
||||
VGUI_Button( "Counter-Terrorists", TeamSelect_Main_ButtonCT, vPos + '16 272 0', '180 24 0' );
|
||||
|
||||
VGUI_Button( "Auto-Assign", TeamSelect_Main_ButtonAuto, vPos + '16 336 0', '180 24 0' );
|
||||
VGUI_Button( "Spectate", TeamSelect_Main_ButtonSpectate, vPos + '16 368 0', '180 24 0' );
|
||||
}
|
||||
|
||||
void VGUI_TeamSelect_Back( void ) {
|
||||
fVGUI_Display = VGUI_TEAMSELECT;
|
||||
}
|
||||
|
||||
void VGUI_TeamSelect_Button( string sLabel, string sImage, void() vFunc, vector vPos, vector vSize ) {
|
||||
|
||||
if( VGUI_Button( sLabel, vFunc, vPos, vSize ) == TRUE ) {
|
||||
drawpic( vVGUIWindowPos + '355 174', sImage, '128 256', '1 1 1', 1 );
|
||||
}
|
||||
}
|
||||
|
||||
void VGUI_TeamSelect_T( vector vPos ) {
|
||||
static void TeamSelect_T1( void ) {
|
||||
sendevent( "GamePlayerSpawn", "f", 1 );
|
||||
fVGUI_Display = VGUI_NONE;
|
||||
}
|
||||
static void TeamSelect_T2( void ) {
|
||||
sendevent( "GamePlayerSpawn", "f", 2 );
|
||||
fVGUI_Display = VGUI_NONE;
|
||||
}
|
||||
static void TeamSelect_T3( void ) {
|
||||
sendevent( "GamePlayerSpawn", "f", 3 );
|
||||
fVGUI_Display = VGUI_NONE;
|
||||
}
|
||||
static void TeamSelect_T4( void ) {
|
||||
sendevent( "GamePlayerSpawn", "f", 4 );
|
||||
fVGUI_Display = VGUI_NONE;
|
||||
}
|
||||
|
||||
VGUI_Text( "Team Description", vPos + '16 64 0', '16 16 0');
|
||||
|
||||
VGUI_Text( "This describes the object of your current team.", vPos + '16 116 0', '8 8 0' );
|
||||
VGUI_Text( "As a T, you will most likely watch the hostages or plant bombs.", vPos + '16 132 0', '8 8 0' );
|
||||
|
||||
VGUI_TeamSelect_Button( "Phoenix Connexion", "gfx/vgui/640_terror", TeamSelect_T1, vPos + '16 240 0', '180 24 0' );
|
||||
VGUI_TeamSelect_Button( "L337 Krew", "gfx/vgui/640_leet", TeamSelect_T2, vPos + '16 272 0', '180 24 0' );
|
||||
VGUI_TeamSelect_Button( "Arctic Avengers", "gfx/vgui/640_arctic", TeamSelect_T3, vPos + '16 306 0', '180 24 0' );
|
||||
VGUI_TeamSelect_Button( "Guerilla Warfare", "gfx/vgui/640_guerilla", TeamSelect_T4, vPos + '16 336 0', '180 24 0' );
|
||||
VGUI_Button( "Back", VGUI_TeamSelect_Back, vPos + '16 440 0', '120 24 0' );
|
||||
}
|
||||
|
||||
void VGUI_TeamSelect_CT ( vector vPos ) {
|
||||
static void TeamSelect_CT1( void ) {
|
||||
sendevent( "GamePlayerSpawn", "f", 5 );
|
||||
fVGUI_Display = VGUI_NONE;
|
||||
}
|
||||
static void TeamSelect_CT2( void ) {
|
||||
sendevent( "GamePlayerSpawn", "f", 6 );
|
||||
fVGUI_Display = VGUI_NONE;
|
||||
}
|
||||
static void TeamSelect_CT3( void ) {
|
||||
sendevent( "GamePlayerSpawn", "f", 7 );
|
||||
fVGUI_Display = VGUI_NONE;
|
||||
}
|
||||
static void TeamSelect_CT4( void ) {
|
||||
sendevent( "GamePlayerSpawn", "f", 8 );
|
||||
fVGUI_Display = VGUI_NONE;
|
||||
}
|
||||
|
||||
VGUI_Text( "Team Description", vPos + '16 64 0', '16 16 0');
|
||||
|
||||
VGUI_Text( "This describes the object of your current team.", vPos + '16 116 0', '8 8 0' );
|
||||
VGUI_Text( "As a CT, you will most likely rescue hostages or defuse bombs.", vPos + '16 132 0', '8 8 0' );
|
||||
|
||||
VGUI_TeamSelect_Button( "Seal Team 6", "gfx/vgui/640_urban", TeamSelect_CT1, vPos + '16 240 0', '180 24 0' );
|
||||
VGUI_TeamSelect_Button( "German GSG9", "gfx/vgui/640_gsg9", TeamSelect_CT2, vPos + '16 272 0', '180 24 0' );
|
||||
VGUI_TeamSelect_Button( "UK SAS", "gfx/vgui/640_sas", TeamSelect_CT3, vPos + '16 306 0', '180 24 0' );
|
||||
VGUI_TeamSelect_Button( "French GIGN", "gfx/vgui/640_gign", TeamSelect_CT4, vPos + '16 336 0', '180 24 0' );
|
||||
VGUI_Button( "Back", VGUI_TeamSelect_Back, vPos + '16 440 0', '120 24 0' );
|
||||
}
|
|
@ -0,0 +1,69 @@
|
|||
/*
|
||||
OpenCS Project
|
||||
Copyright (C) 2015 Marco "eukara" Hladik
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
string sViewModels[ CS_WEAPON_COUNT ] = {
|
||||
"",
|
||||
"models/v_knife.mdl",
|
||||
"models/v_usp.mdl",
|
||||
"models/v_glock18.mdl",
|
||||
"models/v_deagle.mdl",
|
||||
"models/v_p228.mdl",
|
||||
"models/v_elite.mdl",
|
||||
"models/v_fiveseven.mdl",
|
||||
"models/v_m3.mdl",
|
||||
"models/v_xm1014.mdl",
|
||||
"models/v_mp5.mdl",
|
||||
"models/v_p90.mdl",
|
||||
"models/v_ump45.mdl",
|
||||
"models/v_mac10.mdl",
|
||||
"models/v_tmp.mdl",
|
||||
"models/v_ak47.mdl",
|
||||
"models/v_sg552.mdl",
|
||||
"models/v_m4a1.mdl",
|
||||
"models/v_aug.mdl",
|
||||
"models/v_scout.mdl",
|
||||
"models/v_awp.mdl",
|
||||
"models/v_g3sg1.mdl",
|
||||
"models/v_sg550.mdl",
|
||||
"models/v_m249.mdl"
|
||||
};
|
||||
|
||||
entity eViewModel;
|
||||
void View_DrawViewModel( void ) {
|
||||
if( !eViewModel ) {
|
||||
eViewModel = spawn();
|
||||
eViewModel.renderflags = RF_DEPTHHACK;
|
||||
}
|
||||
|
||||
eViewModel.origin = getproperty( VF_ORIGIN ) + '0 0 -1';
|
||||
eViewModel.angles = getproperty( VF_ANGLES );
|
||||
|
||||
if( getstatf( STAT_ACTIVEWEAPON ) < CS_WEAPON_COUNT ) {
|
||||
setmodel( eViewModel, sViewModels[ getstatf( STAT_ACTIVEWEAPON ) ] );
|
||||
}
|
||||
|
||||
addentity( eViewModel );
|
||||
eViewModel.frame1time += frametime;
|
||||
}
|
||||
|
||||
void View_PlayAnimation( int iSequence ) {
|
||||
eViewModel.frame = (float)iSequence;
|
||||
eViewModel.frame1time = 0;
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,49 @@
|
|||
#pragma target fte
|
||||
|
||||
#pragma progs_dat "../../Main/csprogs.dat"
|
||||
|
||||
#define CSQC
|
||||
|
||||
#includelist
|
||||
../Builtins.h
|
||||
../Globals.h
|
||||
Defs.h
|
||||
|
||||
../Shared/WeaponAK47.c
|
||||
../Shared/WeaponAUG.c
|
||||
../Shared/WeaponAWP.c
|
||||
../Shared/WeaponDeagle.c
|
||||
../Shared/WeaponElites.c
|
||||
../Shared/WeaponFiveSeven.c
|
||||
../Shared/WeaponG3SG1.c
|
||||
../Shared/WeaponGlock18.c
|
||||
../Shared/WeaponM3.c
|
||||
../Shared/WeaponM4A1.c
|
||||
../Shared/WeaponMac10.c
|
||||
../Shared/WeaponMP5.c
|
||||
../Shared/WeaponP228.c
|
||||
../Shared/WeaponP90.c
|
||||
../Shared/WeaponPara.c
|
||||
../Shared/WeaponScout.c
|
||||
../Shared/WeaponSG550.c
|
||||
../Shared/WeaponSG552.c
|
||||
../Shared/WeaponTMP.c
|
||||
../Shared/WeaponUMP45.c
|
||||
../Shared/WeaponUSP45.c
|
||||
../Shared/WeaponXM1014.c
|
||||
../Shared/WeaponBase.c
|
||||
../Shared/Weapons.c
|
||||
|
||||
View.c
|
||||
VGUI_Objects.c
|
||||
VGUI_MOTD.c
|
||||
VGUI_BuyMenu.c
|
||||
VGUI_TeamSelect.c
|
||||
VGUI.c
|
||||
HUD.c
|
||||
Draw.c
|
||||
Sound.c
|
||||
Entities.c
|
||||
Event.c
|
||||
Init.c
|
||||
#endlist
|
|
@ -0,0 +1,163 @@
|
|||
/*
|
||||
OpenCS Project
|
||||
Copyright (C) 2015 Marco "eukara" Hladik
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
// Stuff that applies to all codebases
|
||||
enum {
|
||||
TEAM_T = 1,
|
||||
TEAM_CT
|
||||
};
|
||||
|
||||
enum {
|
||||
STAT_BUYZONE = 34,
|
||||
STAT_HOSTAGEZONE,
|
||||
STAT_BOMBZONE,
|
||||
STAT_MONEY,
|
||||
STAT_SESSIONINFO,
|
||||
STAT_SLOT_MELEE,
|
||||
STAT_SLOT_PRIMARY,
|
||||
STAT_SLOT_SECONDARY,
|
||||
STAT_SLOT_GRENADE,
|
||||
STAT_CURRENT_CLIP,
|
||||
STAT_CURRENT_CALIBER
|
||||
};
|
||||
|
||||
enum {
|
||||
GAME_INACTIVE,
|
||||
GAME_FREEZE,
|
||||
GAME_ACTIVE,
|
||||
GAME_END
|
||||
};
|
||||
|
||||
#define CS_WEAPON_COUNT 24
|
||||
enum {
|
||||
WEAPON_NONE = 0,
|
||||
WEAPON_KNIFE,
|
||||
WEAPON_USP45,
|
||||
WEAPON_GLOCK18,
|
||||
WEAPON_DEAGLE,
|
||||
WEAPON_P228,
|
||||
WEAPON_ELITES,
|
||||
WEAPON_FIVESEVEN,
|
||||
WEAPON_M3,
|
||||
WEAPON_XM1014,
|
||||
WEAPON_MP5,
|
||||
WEAPON_P90,
|
||||
WEAPON_UMP45,
|
||||
WEAPON_MAC10,
|
||||
WEAPON_TMP,
|
||||
WEAPON_AK47,
|
||||
WEAPON_SG552,
|
||||
WEAPON_M4A1,
|
||||
WEAPON_AUG,
|
||||
WEAPON_SCOUT,
|
||||
WEAPON_AWP,
|
||||
WEAPON_G3SG1,
|
||||
WEAPON_SG550,
|
||||
WEAPON_PARA
|
||||
};
|
||||
|
||||
enum {
|
||||
CALIBER_50AE = 1,
|
||||
CALIBER_762MM,
|
||||
CALIBER_556MM,
|
||||
CALIBER_338MAG,
|
||||
CALIBER_9MM,
|
||||
CALIBER_BUCKSHOT,
|
||||
CALIBER_45ACP,
|
||||
CALIBER_357SIG,
|
||||
CALIBER_57MM
|
||||
};
|
||||
|
||||
.int iAmmo_50AE;
|
||||
.int iAmmo_762MM;
|
||||
.int iAmmo_556MM;
|
||||
.int iAmmo_338MAG;
|
||||
.int iAmmo_9MM;
|
||||
.int iAmmo_BUCKSHOT;
|
||||
.int iAmmo_45ACP;
|
||||
.int iAmmo_357SIG;
|
||||
.int iAmmo_57MM;
|
||||
|
||||
// Weapon types
|
||||
enum {
|
||||
TYPE_SEMI,
|
||||
TYPE_AUTO
|
||||
};
|
||||
|
||||
// Slot types
|
||||
enum {
|
||||
SLOT_MELEE,
|
||||
SLOT_SECONDARY,
|
||||
SLOT_PRIMARY,
|
||||
SLOT_GRENADE
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
int iWeaponID; // Identifier
|
||||
int iSlot;
|
||||
int iPrice;
|
||||
int iCaliber;
|
||||
int iPlayerSpeed;
|
||||
|
||||
int iBullets; // How many bullets does it shoot?
|
||||
int iClipSize; // How big is the clip/magazine?
|
||||
|
||||
int iDamage; // How much damage is done by a single bullet?
|
||||
int iPenetration; // Penetration multiplier
|
||||
|
||||
float fRange; // Max distance of the bullet trace
|
||||
float fRangeModifier; // ???
|
||||
|
||||
float fWeaponType;
|
||||
float fAttackFinished; // When is the gone done firing
|
||||
float fReloadFinished; // When is the gone done firing
|
||||
|
||||
.int iCaliberfld; // Pointer towards the caliberfield of the gun
|
||||
.int iClipfld; // Pointer towards the clip of the gun
|
||||
} weaponinfo_t;
|
||||
|
||||
typedef struct {
|
||||
void() vDraw;
|
||||
void() vPrimary;
|
||||
void() vSecondary;
|
||||
void() vReload;
|
||||
} weaponfunc_t;
|
||||
|
||||
// Network Events
|
||||
enum {
|
||||
EV_WEAPON_DRAW,
|
||||
EV_WEAPON_PRIMARYATTACK,
|
||||
EV_WEAPON_SECONDARYATTACK,
|
||||
EV_WEAPON_RELOAD
|
||||
};
|
||||
|
||||
float clamp(float d, float imin, float imax) {
|
||||
float t;
|
||||
|
||||
if(d < imin)
|
||||
t = imin;
|
||||
else
|
||||
t = d;
|
||||
|
||||
if(t > imax)
|
||||
return imax;
|
||||
else
|
||||
return t;
|
||||
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,94 @@
|
|||
/*
|
||||
OpenCS Project
|
||||
Copyright (C) 2015 Marco "eukara" Hladik
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
void ClientKill( void ) {}
|
||||
|
||||
|
||||
void ClientConnect( void ) {}
|
||||
|
||||
void ClientDisconnect( void ) {
|
||||
// We were part of the session
|
||||
if( self.fInGame == TRUE ) {
|
||||
fInGamePlayers--;
|
||||
}
|
||||
}
|
||||
|
||||
void PlayerPreThink( void ) {
|
||||
Input_Handle();
|
||||
}
|
||||
|
||||
void PlayerPostThink( void ) {}
|
||||
|
||||
void PutClientInServer( void ) {
|
||||
entity eSpawn;
|
||||
eSpawn = find (world, classname, "trigger_camera");
|
||||
|
||||
self.classname = "spectator";
|
||||
self.health = self.max_health = 999;
|
||||
self.takedamage = DAMAGE_NO;
|
||||
self.solid = SOLID_NOT;
|
||||
self.movetype = MOVETYPE_FLY;
|
||||
self.flags = FL_CLIENT;
|
||||
|
||||
self.origin = eSpawn.origin + '0 0 1';
|
||||
|
||||
// Rotate camera towards a target
|
||||
if( eSpawn.target ) {
|
||||
entity eTarget = find( eTarget, targetname, eSpawn.target );
|
||||
self.angles = vectoangles( eTarget.origin - eSpawn.origin );
|
||||
self.angles_x *= -1;
|
||||
} else {
|
||||
self.angles = eSpawn.angles;
|
||||
}
|
||||
|
||||
self.fixangle = TRUE;
|
||||
|
||||
self.model = 0;
|
||||
setsize (self, '-16 -16 -16', '16 16 16');
|
||||
|
||||
self.view_ofs = self.velocity = '0 0 0';
|
||||
|
||||
forceinfokey( self, "*spectator", "1" ); // Make sure we are known as a spectator
|
||||
}
|
||||
|
||||
void SV_RunClientCommand( void ) {
|
||||
|
||||
self.fInBombZone = FALSE;
|
||||
self.fInBuyZone = FALSE;
|
||||
self.fInHostageZone = FALSE;
|
||||
|
||||
if( fGameState != GAME_ACTIVE ) {
|
||||
input_movevalues = '0 0 0';
|
||||
input_buttons = 0;
|
||||
input_impulse = 0;
|
||||
}
|
||||
|
||||
runstandardplayerphysics( self );
|
||||
}
|
||||
|
||||
void Client_SendEvent( entity eClient, float fEVType ) {
|
||||
Weapon_UpdateCurrents();
|
||||
|
||||
WriteByte( MSG_MULTICAST, SVC_CGAMEPACKET );
|
||||
WriteByte( MSG_MULTICAST, fEVType );
|
||||
|
||||
msg_entity = eClient;
|
||||
multicast( '0 0 0', MULTICAST_ONE );
|
||||
}
|
|
@ -0,0 +1,70 @@
|
|||
/*
|
||||
OpenCS Project
|
||||
Copyright (C) 2015 Marco "eukara" Hladik
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#define VEC_HULL_MIN '-16 -16 -36'
|
||||
#define VEC_HULL_MAX '16 16 36'
|
||||
|
||||
// Player specific fields
|
||||
.float fInBuyZone;
|
||||
.float fInHostageZone;
|
||||
.float fInBombZone;
|
||||
.float fMoney;
|
||||
.float fStepTime;
|
||||
|
||||
.float fInGame;
|
||||
float fInGamePlayers;
|
||||
float fOldInGamePlayers;
|
||||
float fGameState;
|
||||
float fGameTime;
|
||||
|
||||
.int iCurrentClip;
|
||||
.int iCurrentCaliber;
|
||||
|
||||
.int iSlotMelee, iSlotPrimary, iSlotSecondary, iSlotGrenade;
|
||||
|
||||
.float fAttackFinished;
|
||||
|
||||
|
||||
// Game specific fields
|
||||
int iHostages;
|
||||
|
||||
// GoldSrc-Rendermode Fields
|
||||
.vector rendercolor;
|
||||
.float rendermode;
|
||||
.float renderamt;
|
||||
.float alpha;
|
||||
|
||||
string sCSPlayers[9] = {
|
||||
"",
|
||||
"models/player/terror/terror.mdl",
|
||||
"models/player/leet/leet.mdl",
|
||||
"models/player/arctic/arctic.mdl",
|
||||
"models/player/guerilla/guerilla.mdl",
|
||||
"models/player/urban/urban.mdl",
|
||||
"models/player/gsg9/gsg9.mdl",
|
||||
"models/player/sas/sas.mdl",
|
||||
"models/player/gign/gign.mdl"
|
||||
};
|
||||
|
||||
void Client_SendEvent( entity eClient, float fEVType );
|
||||
|
||||
void OpenCSGunBase_Draw( void );
|
||||
float OpenCSGunBase_PrimaryFire( void );
|
||||
float OpenCSGunBase_Reload( void );
|
Binary file not shown.
|
@ -0,0 +1,39 @@
|
|||
/*
|
||||
OpenCS Project
|
||||
Copyright (C) 2015 Marco "eukara" Hladik
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/*
|
||||
=================
|
||||
SPAWN: hostage_entity
|
||||
|
||||
Entry function for the hostages.
|
||||
=================
|
||||
*/
|
||||
void hostage_entity( void ) {
|
||||
precache_model( self.model );
|
||||
setorigin( self, self.origin + '0 0 -36');
|
||||
self.solid = SOLID_SLIDEBOX;
|
||||
self.movetype = MOVETYPE_WALK;
|
||||
setmodel( self, self.model );
|
||||
setsize( self, VEC_HULL_MIN + '0 0 36', VEC_HULL_MAX + '0 0 36' );
|
||||
|
||||
self.frame = 13; // Idle frame
|
||||
|
||||
iHostages = iHostages + 1; // Increase the global count of hostages
|
||||
}
|
|
@ -0,0 +1,57 @@
|
|||
/*
|
||||
OpenCS Project
|
||||
Copyright (C) 2015 Marco "eukara" Hladik
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
void func_wall( void ) {
|
||||
self.angles = '0 0 0';
|
||||
self.movetype = MOVETYPE_PUSH;
|
||||
self.solid = SOLID_BSP;
|
||||
setmodel (self, self.model);
|
||||
|
||||
// GoldSrc-Rendermode support
|
||||
if( self.rendermode == 2 ) {
|
||||
self.alpha = ( self.renderamt / 255 );
|
||||
}
|
||||
}
|
||||
|
||||
void func_door( void ) {
|
||||
func_wall();
|
||||
}
|
||||
|
||||
void func_breakable( void ) {
|
||||
func_wall();
|
||||
}
|
||||
|
||||
void func_button( void ) {
|
||||
func_wall();
|
||||
}
|
||||
|
||||
void func_illusionary( void ){
|
||||
setmodel( self, self.model );
|
||||
self.solid = SOLID_NOT;
|
||||
}
|
||||
|
||||
void func_water( void ) {
|
||||
func_illusionary();
|
||||
}
|
||||
|
||||
void ambient_generic( void ) {
|
||||
precache_sound( self.message );
|
||||
ambientsound( self.origin, self.message, 1, ATTN_NORM );
|
||||
}
|
|
@ -0,0 +1,46 @@
|
|||
/*
|
||||
OpenCS Project
|
||||
Copyright (C) 2015 Marco "eukara" Hladik
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/*
|
||||
=================
|
||||
func_bomb_target_touch
|
||||
=================
|
||||
*/
|
||||
void func_bomb_target_touch( void ) {
|
||||
if ( ( other.classname == "player" ) && ( other.team == TEAM_T ) ) {
|
||||
other.fInBombZone = TRUE; // Note: this will be cleared every frame inside SV_RunClientCommand
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
=================
|
||||
SPAWN: func_hostage_rescue
|
||||
|
||||
Entry function for the rescue area-markings.
|
||||
=================
|
||||
*/
|
||||
void func_bomb_target( void ) {
|
||||
self.angles = '0 0 0';
|
||||
self.movetype = MOVETYPE_NONE;
|
||||
self.solid = SOLID_TRIGGER;
|
||||
setmodel( self, self.model );
|
||||
self.model = 0;
|
||||
self.touch = func_bomb_target_touch;
|
||||
}
|
|
@ -0,0 +1,46 @@
|
|||
/*
|
||||
OpenCS Project
|
||||
Copyright (C) 2015 Marco "eukara" Hladik
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/*
|
||||
=================
|
||||
func_buyzone_touch
|
||||
=================
|
||||
*/
|
||||
void func_buyzone_touch( void ) {
|
||||
if( ( other.classname == "player" ) && ( other.team == self.team ) ) {
|
||||
other.fInBuyZone = TRUE; // Note: this will be cleared every frame inside SV_RunClientCommand
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
=================
|
||||
SPAWN: func_buyzone
|
||||
|
||||
Entry function for the buyzone area-markings.
|
||||
=================
|
||||
*/
|
||||
void func_buyzone( void ) {
|
||||
self.angles = '0 0 0';
|
||||
self.movetype = MOVETYPE_NONE;
|
||||
self.solid = SOLID_TRIGGER;
|
||||
setmodel (self, self.model);
|
||||
self.model = 0;
|
||||
self.touch = func_buyzone_touch;
|
||||
}
|
|
@ -0,0 +1,46 @@
|
|||
/*
|
||||
OpenCS Project
|
||||
Copyright (C) 2015 Marco "eukara" Hladik
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/*
|
||||
=================
|
||||
func_hostage_rescue_touch
|
||||
=================
|
||||
*/
|
||||
void func_hostage_rescue_touch( void ) {
|
||||
if ( ( other.classname == "player" ) && ( other.team == TEAM_CT ) ) {
|
||||
other.fInHostageZone = TRUE; // Note: this will be cleared every frame inside SV_RunClientCommand
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
=================
|
||||
SPAWN: func_hostage_rescue
|
||||
|
||||
Entry function for the rescue area-markings.
|
||||
=================
|
||||
*/
|
||||
void func_hostage_rescue( void ) {
|
||||
self.angles = '0 0 0';
|
||||
self.movetype = MOVETYPE_NONE;
|
||||
self.solid = SOLID_TRIGGER;
|
||||
setmodel( self, self.model );
|
||||
self.model = 0;
|
||||
self.touch = func_hostage_rescue_touch;
|
||||
}
|
|
@ -0,0 +1,101 @@
|
|||
/*
|
||||
OpenCS Project
|
||||
Copyright (C) 2015 Marco "eukara" Hladik
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/*
|
||||
=================
|
||||
func_ladder_sound
|
||||
=================
|
||||
*/
|
||||
void func_ladder_sound( entity target )
|
||||
{
|
||||
if ( ( target.velocity_z == 0 ) || ( target.fStepTime > time ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
float vStep = target.velocity_z;
|
||||
|
||||
if ( vStep < 0 ) {
|
||||
vStep *= -1.0;
|
||||
}
|
||||
|
||||
float fForce = vStep;
|
||||
float dDelay = ( clamp( 0.1, 1 / (fForce / 50), 1 ) );
|
||||
float fRandom = random();
|
||||
|
||||
if ( fRandom <= 0.25 ) {
|
||||
sound( target, CHAN_BODY, "player/pl_ladder1.wav", 0.5, ATTN_IDLE );
|
||||
} else if ( fRandom <= 0.50 ) {
|
||||
sound( target, CHAN_BODY, "player/pl_ladder2.wav", 0.5, ATTN_IDLE );
|
||||
} else if ( fRandom <= 0.75 ) {
|
||||
sound( target, CHAN_BODY, "player/pl_ladder3.wav", 0.5, ATTN_IDLE );
|
||||
} else {
|
||||
sound( target, CHAN_BODY, "player/pl_ladder4.wav", 0.5, ATTN_IDLE );
|
||||
}
|
||||
|
||||
target.fStepTime = ( time + dDelay );
|
||||
}
|
||||
|
||||
/*
|
||||
=================
|
||||
func_ladder_touch
|
||||
=================
|
||||
*/
|
||||
void func_ladder_touch( void )
|
||||
{
|
||||
vector vPlayerVector;
|
||||
|
||||
if ( other.classname != "player" ) {
|
||||
return;
|
||||
}
|
||||
|
||||
makevectors( other.v_angle );
|
||||
vPlayerVector = v_forward;
|
||||
vPlayerVector = ( vPlayerVector * 240 );
|
||||
|
||||
if ( other.movement_x > 0 ) {
|
||||
other.velocity = vPlayerVector;
|
||||
} else {
|
||||
other.velocity = '0 0 0';
|
||||
}
|
||||
|
||||
func_ladder_sound( other );
|
||||
}
|
||||
|
||||
/*
|
||||
=================
|
||||
SPAWN: func_ladder
|
||||
|
||||
A trigger like brush that allows you to 'climb' up or down
|
||||
=================
|
||||
*/
|
||||
void func_ladder( void ) {
|
||||
precache_sound( "player/pl_ladder1.wav" );
|
||||
precache_sound( "player/pl_ladder2.wav" );
|
||||
precache_sound( "player/pl_ladder3.wav" );
|
||||
precache_sound( "player/pl_ladder4.wav" );
|
||||
|
||||
self.angles = '0 0 0';
|
||||
self.movetype = MOVETYPE_NONE;
|
||||
self.solid = SOLID_TRIGGER;
|
||||
setmodel( self, self.model );
|
||||
self.model = 0;
|
||||
|
||||
self.touch = func_ladder_touch;
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
/*
|
||||
OpenCS Project
|
||||
Copyright (C) 2015 Marco "eukara" Hladik
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
void Input_Handle( void ) {
|
||||
|
||||
if ( self.button0 ) {
|
||||
Weapon_PrimaryAttack( self.weapon );
|
||||
} else if ( self.button4 ) {
|
||||
Weapon_Reload( self.weapon );
|
||||
} else if ( self.button5 ) {
|
||||
Weapon_SecondaryAttack( self.weapon );
|
||||
}
|
||||
|
||||
/*if( self.impulse == 10 ) {
|
||||
self.weapon++;
|
||||
}
|
||||
if( self.impulse == 11 ) {
|
||||
self.weapon--;
|
||||
}
|
||||
|
||||
self.impulse = 0; */
|
||||
}
|
|
@ -0,0 +1,232 @@
|
|||
/*
|
||||
OpenCS Project
|
||||
Copyright (C) 2015 Marco "eukara" Hladik
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
void main( void ) {}
|
||||
void SetNewParms( void ) {}
|
||||
void SetChangeParms( void ) {}
|
||||
|
||||
|
||||
void StartFrame( void ) {
|
||||
// See if the player count has changed noticeably
|
||||
if ( fInGamePlayers > fOldInGamePlayers ) {
|
||||
// bprint( "Starting OpenCS Match...\n" );
|
||||
|
||||
Timer_Begin( cvar( "mp_freezetime" ), GAME_FREEZE );
|
||||
|
||||
fOldInGamePlayers = fInGamePlayers;
|
||||
} else {
|
||||
// No players? Don't bother updating the Timer
|
||||
if ( fInGamePlayers == 0 ) {
|
||||
fGameState = GAME_INACTIVE;
|
||||
fGameTime = 0;
|
||||
} else {
|
||||
Timer_Update();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
void worldspawn( void ) {
|
||||
precache_model (sCSPlayers[1]);
|
||||
precache_model (sCSPlayers[2]);
|
||||
precache_model (sCSPlayers[3]);
|
||||
precache_model (sCSPlayers[4]);
|
||||
precache_model (sCSPlayers[5]);
|
||||
precache_model (sCSPlayers[6]);
|
||||
precache_model (sCSPlayers[7]);
|
||||
precache_model (sCSPlayers[8]);
|
||||
|
||||
precache_sound( "radio/moveout.wav" );
|
||||
precache_sound( "radio/letsgo.wav" );
|
||||
precache_sound( "radio/locknload.wav" );
|
||||
|
||||
precache_sound( "weapons/ak47-1.wav" );
|
||||
precache_sound( "weapons/ak47-2.wav" );
|
||||
precache_sound( "weapons/ak47_boltpull.wav" );
|
||||
precache_sound( "weapons/ak47_clipin.wav" );
|
||||
precache_sound( "weapons/ak47_clipout.wav" );
|
||||
precache_sound( "weapons/aug-1.wav" );
|
||||
precache_sound( "weapons/aug_boltpull.wav" );
|
||||
precache_sound( "weapons/aug_boltslap.wav" );
|
||||
precache_sound( "weapons/aug_clipin.wav" );
|
||||
precache_sound( "weapons/aug_clipout.wav" );
|
||||
precache_sound( "weapons/aug_forearm.wav" );
|
||||
precache_sound( "weapons/awp1.wav" );
|
||||
precache_sound( "weapons/awp_clipin.wav" );
|
||||
precache_sound( "weapons/awp_clipout.wav" );
|
||||
precache_sound( "weapons/awp_deploy.wav" );
|
||||
precache_sound( "weapons/boltdown.wav" );
|
||||
precache_sound( "weapons/boltpull1.wav" );
|
||||
precache_sound( "weapons/boltup.wav" );
|
||||
precache_sound( "weapons/c4_beep1.wav" );
|
||||
precache_sound( "weapons/c4_beep2.wav" );
|
||||
precache_sound( "weapons/c4_beep3.wav" );
|
||||
precache_sound( "weapons/c4_beep4.wav" );
|
||||
precache_sound( "weapons/c4_beep5.wav" );
|
||||
precache_sound( "weapons/c4_click.wav" );
|
||||
precache_sound( "weapons/c4_disarm.wav" );
|
||||
precache_sound( "weapons/c4_disarmed.wav" );
|
||||
precache_sound( "weapons/c4_explode1.wav" );
|
||||
precache_sound( "weapons/c4_plant.wav" );
|
||||
precache_sound( "weapons/clipin1.wav" );
|
||||
precache_sound( "weapons/clipout1.wav" );
|
||||
precache_sound( "weapons/de_clipin.wav" );
|
||||
precache_sound( "weapons/de_clipout.wav" );
|
||||
precache_sound( "weapons/de_deploy.wav" );
|
||||
precache_sound( "weapons/deagle-1.wav" );
|
||||
precache_sound( "weapons/deagle-2.wav" );
|
||||
precache_sound( "weapons/dryfire_pistol.wav" );
|
||||
precache_sound( "weapons/dryfire_rifle.wav" );
|
||||
precache_sound( "weapons/elite_clipout.wav" );
|
||||
precache_sound( "weapons/elite_deploy.wav" );
|
||||
precache_sound( "weapons/elite_fire.wav" );
|
||||
precache_sound( "weapons/elite_leftclipin.wav" );
|
||||
precache_sound( "weapons/elite_reloadstart.wav" );
|
||||
precache_sound( "weapons/elite_rightclipin.wav" );
|
||||
precache_sound( "weapons/elite_sliderelease.wav" );
|
||||
precache_sound( "weapons/elite_twirl.wav" );
|
||||
precache_sound( "weapons/fiveseven-1.wav" );
|
||||
precache_sound( "weapons/fiveseven_clipin.wav" );
|
||||
precache_sound( "weapons/fiveseven_clipout.wav" );
|
||||
precache_sound( "weapons/fiveseven_slidepull.wav" );
|
||||
precache_sound( "weapons/fiveseven_sliderelease.wav" );
|
||||
precache_sound( "weapons/flashbang-1.wav" );
|
||||
precache_sound( "weapons/flashbang-2.wav" );
|
||||
precache_sound( "weapons/g3sg1-1.wav" );
|
||||
precache_sound( "weapons/g3sg1_clipin.wav" );
|
||||
precache_sound( "weapons/g3sg1_clipout.wav" );
|
||||
precache_sound( "weapons/g3sg1_slide.wav" );
|
||||
precache_sound( "weapons/generic_reload.wav" );
|
||||
precache_sound( "weapons/generic_shot_reload.wav" );
|
||||
precache_sound( "weapons/glock18-1.wav" );
|
||||
precache_sound( "weapons/glock18-2.wav" );
|
||||
precache_sound( "weapons/grenade_hit1.wav" );
|
||||
precache_sound( "weapons/grenade_hit2.wav" );
|
||||
precache_sound( "weapons/grenade_hit3.wav" );
|
||||
precache_sound( "weapons/he_bounce-1.wav" );
|
||||
precache_sound( "weapons/headshot2.wav" );
|
||||
precache_sound( "weapons/hegrenade-1.wav" );
|
||||
precache_sound( "weapons/hegrenade-2.wav" );
|
||||
precache_sound( "weapons/knife_deploy1.wav" );
|
||||
precache_sound( "weapons/knife_hit1.wav" );
|
||||
precache_sound( "weapons/knife_hit2.wav" );
|
||||
precache_sound( "weapons/knife_hit3.wav" );
|
||||
precache_sound( "weapons/knife_hit4.wav" );
|
||||
precache_sound( "weapons/knife_hitwall1.wav" );
|
||||
precache_sound( "weapons/knife_slash1.wav" );
|
||||
precache_sound( "weapons/knife_slash2.wav" );
|
||||
precache_sound( "weapons/knife_stab.wav" );
|
||||
precache_sound( "weapons/m249-1.wav" );
|
||||
precache_sound( "weapons/m249-2.wav" );
|
||||
precache_sound( "weapons/m249_boxin.wav" );
|
||||
precache_sound( "weapons/m249_boxout.wav" );
|
||||
precache_sound( "weapons/m249_chain.wav" );
|
||||
precache_sound( "weapons/m249_coverdown.wav" );
|
||||
precache_sound( "weapons/m249_coverup.wav" );
|
||||
precache_sound( "weapons/m3-1.wav" );
|
||||
precache_sound( "weapons/m3_insertshell.wav" );
|
||||
precache_sound( "weapons/m3_pump.wav" );
|
||||
precache_sound( "weapons/m4a1-1.wav" );
|
||||
precache_sound( "weapons/m4a1_boltpull.wav" );
|
||||
precache_sound( "weapons/m4a1_clipin.wav" );
|
||||
precache_sound( "weapons/m4a1_clipout.wav" );
|
||||
precache_sound( "weapons/m4a1_deploy.wav" );
|
||||
precache_sound( "weapons/m4a1_silencer_off.wav" );
|
||||
precache_sound( "weapons/m4a1_silencer_on.wav" );
|
||||
precache_sound( "weapons/m4a1_unsil-1.wav" );
|
||||
precache_sound( "weapons/m4a1_unsil-2.wav" );
|
||||
precache_sound( "weapons/mac10-1.wav" );
|
||||
precache_sound( "weapons/mac10_boltpull.wav" );
|
||||
precache_sound( "weapons/mac10_clipin.wav" );
|
||||
precache_sound( "weapons/mac10_clipout.wav" );
|
||||
precache_sound( "weapons/mp5-1.wav" );
|
||||
precache_sound( "weapons/mp5-2.wav" );
|
||||
precache_sound( "weapons/mp5_clipin.wav" );
|
||||
precache_sound( "weapons/mp5_clipout.wav" );
|
||||
precache_sound( "weapons/mp5_slideback.wav" );
|
||||
precache_sound( "weapons/p228-1.wav" );
|
||||
precache_sound( "weapons/p228_clipin.wav" );
|
||||
precache_sound( "weapons/p228_clipout.wav" );
|
||||
precache_sound( "weapons/p228_slidepull.wav" );
|
||||
precache_sound( "weapons/p228_sliderelease.wav" );
|
||||
precache_sound( "weapons/p90-1.wav" );
|
||||
precache_sound( "weapons/p90_boltpull.wav" );
|
||||
precache_sound( "weapons/p90_clipin.wav" );
|
||||
precache_sound( "weapons/p90_clipout.wav" );
|
||||
precache_sound( "weapons/p90_cliprelease.wav" );
|
||||
precache_sound( "weapons/pinpull.wav" );
|
||||
precache_sound( "weapons/ric1.wav" );
|
||||
precache_sound( "weapons/ric2.wav" );
|
||||
precache_sound( "weapons/ric3.wav" );
|
||||
precache_sound( "weapons/ric4.wav" );
|
||||
precache_sound( "weapons/ric5.wav" );
|
||||
precache_sound( "weapons/ric_conc-1.wav" );
|
||||
precache_sound( "weapons/ric_conc-2.wav" );
|
||||
precache_sound( "weapons/ric_metal-1.wav" );
|
||||
precache_sound( "weapons/ric_metal-2.wav" );
|
||||
precache_sound( "weapons/scout_bolt.wav" );
|
||||
precache_sound( "weapons/scout_clipin.wav" );
|
||||
precache_sound( "weapons/scout_clipout.wav" );
|
||||
precache_sound( "weapons/scout_fire-1.wav" );
|
||||
precache_sound( "weapons/sg550-1.wav" );
|
||||
precache_sound( "weapons/sg550_boltpull.wav" );
|
||||
precache_sound( "weapons/sg550_clipin.wav" );
|
||||
precache_sound( "weapons/sg550_clipout.wav" );
|
||||
precache_sound( "weapons/sg552-1.wav" );
|
||||
precache_sound( "weapons/sg552-2.wav" );
|
||||
precache_sound( "weapons/sg552_boltpull.wav" );
|
||||
precache_sound( "weapons/sg552_clipin.wav" );
|
||||
precache_sound( "weapons/sg552_clipout.wav" );
|
||||
precache_sound( "weapons/sg_explode.wav" );
|
||||
precache_sound( "weapons/slideback1.wav" );
|
||||
precache_sound( "weapons/sliderelease1.wav" );
|
||||
precache_sound( "weapons/tmp-1.wav" );
|
||||
precache_sound( "weapons/tmp-2.wav" );
|
||||
precache_sound( "weapons/ump45-1.wav" );
|
||||
precache_sound( "weapons/ump45_boltslap.wav" );
|
||||
precache_sound( "weapons/ump45_clipin.wav" );
|
||||
precache_sound( "weapons/ump45_clipout.wav" );
|
||||
precache_sound( "weapons/usp1.wav" );
|
||||
precache_sound( "weapons/usp2.wav" );
|
||||
precache_sound( "weapons/usp_clipin.wav" );
|
||||
precache_sound( "weapons/usp_clipout.wav" );
|
||||
precache_sound( "weapons/usp_silencer_off.wav" );
|
||||
precache_sound( "weapons/usp_silencer_on.wav" );
|
||||
precache_sound( "weapons/usp_slideback.wav" );
|
||||
precache_sound( "weapons/usp_sliderelease.wav" );
|
||||
precache_sound( "weapons/usp_unsil-1.wav" );
|
||||
precache_sound( "weapons/xm1014-1.wav" );
|
||||
precache_sound( "weapons/zoom.wav" );
|
||||
|
||||
// TODO: Merge these into a single field
|
||||
clientstat( STAT_BUYZONE, EV_FLOAT, fInBuyZone );
|
||||
clientstat( STAT_HOSTAGEZONE, EV_FLOAT, fInHostageZone );
|
||||
clientstat( STAT_BOMBZONE, EV_FLOAT, fInBombZone );
|
||||
clientstat( STAT_MONEY, EV_FLOAT, fMoney );
|
||||
clientstat( STAT_SLOT_MELEE, EV_INTEGER, iSlotMelee );
|
||||
clientstat( STAT_SLOT_PRIMARY, EV_INTEGER, iSlotPrimary );
|
||||
clientstat( STAT_SLOT_SECONDARY, EV_INTEGER, iSlotSecondary );
|
||||
clientstat( STAT_SLOT_GRENADE, EV_INTEGER, iSlotGrenade );
|
||||
clientstat( STAT_CURRENT_CLIP, EV_INTEGER, iCurrentClip );
|
||||
clientstat( STAT_CURRENT_CALIBER, EV_INTEGER, iCurrentCaliber );
|
||||
pointerstat( STAT_SESSIONINFO, EV_FLOAT, &fGameState );
|
||||
}
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
[editor]
|
||||
line_wrapping=false
|
||||
line_break_column=72
|
||||
auto_continue_multiline=true
|
||||
|
||||
[file_prefs]
|
||||
final_new_line=true
|
||||
ensure_convert_new_lines=false
|
||||
strip_trailing_spaces=false
|
||||
replace_tabs=false
|
||||
|
||||
[indentation]
|
||||
indent_width=4
|
||||
indent_type=1
|
||||
indent_hard_tab_width=8
|
||||
detect_indent=false
|
||||
detect_indent_width=false
|
||||
indent_mode=2
|
||||
|
||||
[project]
|
||||
name=OpenCS: Server
|
||||
base_path=/home/eukara/Projects/OpenCS/Source/Server/
|
||||
description=
|
||||
file_patterns=
|
||||
|
||||
[long line marker]
|
||||
long_line_behaviour=1
|
||||
long_line_column=72
|
||||
|
||||
[files]
|
||||
current_page=0
|
||||
FILE_NAME_0=0;C;0;EUTF-8;1;1;0;%2Fhome%2Feukara%2FProjects%2FOpenCS%2FSource%2FServer%2FEntities.c;0;4
|
||||
|
||||
[VTE]
|
||||
last_dir=/home/eukara
|
||||
|
||||
[build-menu]
|
||||
C++FT_00_LB=_Compile
|
||||
C++FT_00_CM=fteqcc
|
||||
C++FT_00_WD=
|
||||
filetypes=C++;C;
|
||||
NF_00_LB=_Make
|
||||
NF_00_CM=fteqcc
|
||||
NF_00_WD=
|
||||
NF_01_LB=Make Custom _Target...
|
||||
NF_01_CM=fteqcc
|
||||
NF_01_WD=
|
||||
NF_02_LB=Make _Object
|
||||
NF_02_CM=fteqcc
|
||||
NF_02_WD=
|
||||
CFT_00_LB=_Compile
|
||||
CFT_00_CM=fteqcc
|
||||
CFT_00_WD=
|
||||
CFT_01_LB=_Build
|
||||
CFT_01_CM=fteqcc
|
||||
CFT_01_WD=
|
||||
CFT_02_LB=_Lint
|
||||
CFT_02_CM=fteqcc
|
||||
CFT_02_WD=
|
||||
EX_00_LB=_Execute
|
||||
EX_00_CM="cd ../.." && ./Launch.sh
|
||||
EX_00_WD=
|
|
@ -0,0 +1,95 @@
|
|||
/*
|
||||
OpenCS Project
|
||||
Copyright (C) 2015 Marco "eukara" Hladik
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
void Spawn_GameClient( float fTeam ) {
|
||||
entity eSpawn;
|
||||
|
||||
if( self.fInGame == FALSE ) {
|
||||
self.fInGame = TRUE;
|
||||
fInGamePlayers++;
|
||||
}
|
||||
|
||||
// What team are we on - 0= Spectator, < 5 Terrorists
|
||||
if( fTeam == 0 ) {
|
||||
PutClientInServer();
|
||||
return;
|
||||
} else if( fTeam < 5 ) {
|
||||
eSpawn = find ( world, classname, "info_player_deathmatch" );
|
||||
self.team = TEAM_T; // This is only important to the Server codebase
|
||||
forceinfokey( self, "team", "t" ); // This is for the Client codebase
|
||||
|
||||
// TODO: Move this away from here
|
||||
Weapon_AddItem( WEAPON_GLOCK18 );
|
||||
Weapon_GiveAmmo( WEAPON_GLOCK18, 40 );
|
||||
} else {
|
||||
eSpawn = find ( world, classname, "info_player_start" );
|
||||
self.team = TEAM_CT; // This is only important to the Server codebase
|
||||
forceinfokey( self, "team", "ct" ); // This is for the Client codebase
|
||||
|
||||
// TODO: Move this away from here
|
||||
Weapon_AddItem( WEAPON_USP45 );
|
||||
Weapon_GiveAmmo( WEAPON_USP45, 24 );
|
||||
|
||||
}
|
||||
|
||||
forceinfokey( self, "*spectator", "0" ); // Make sure we are known as a spectator
|
||||
|
||||
self.classname = "player";
|
||||
self.health = self.max_health = 100;
|
||||
self.takedamage = DAMAGE_AIM;
|
||||
self.solid = SOLID_SLIDEBOX;
|
||||
self.movetype = MOVETYPE_WALK;
|
||||
self.flags = FL_CLIENT;
|
||||
|
||||
self.origin = eSpawn.origin;
|
||||
self.angles = eSpawn.angles;
|
||||
self.fixangle = TRUE;
|
||||
|
||||
// Get the player-model from Defs.h's list
|
||||
setmodel( self, sCSPlayers[ fTeam ] );
|
||||
setsize( self, VEC_HULL_MIN, VEC_HULL_MAX );
|
||||
|
||||
self.view_ofs = '0 0 28';
|
||||
self.velocity = '0 0 0';
|
||||
|
||||
self.frame = 1; // Idle frame
|
||||
|
||||
// Set the fields
|
||||
self.fMoney = cvar( "mp_startmoney" );
|
||||
self.fAttackFinished = time + 1;
|
||||
}
|
||||
|
||||
// Event Handling, called by the Client codebase via 'sendevent'
|
||||
void CSEv_GamePlayerSpawn_f( float fTeam ) {
|
||||
Spawn_GameClient( fTeam );
|
||||
}
|
||||
|
||||
// Counter-Terrorist Spawnpoints
|
||||
void info_player_start( void ) {
|
||||
}
|
||||
|
||||
// Terrorist Spawnpoints
|
||||
void info_player_deathmatch( void ) {
|
||||
}
|
||||
|
||||
// Spectator Spawnpoints
|
||||
void trigger_camera( void ) {
|
||||
}
|
||||
void info_target( void ) { }
|
|
@ -0,0 +1,66 @@
|
|||
/*
|
||||
OpenCS Project
|
||||
Copyright (C) 2015 Marco "eukara" Hladik
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
// Detects the state of the game that we are in and cycles between them. INACTIVE > FREEZE > INGAME > ACTIVE
|
||||
void Timer_Begin( float fTime, float fMode) {
|
||||
if ( fMode == GAME_FREEZE ) {
|
||||
dprint( "[DEBUG] Game Freezetime\n" );
|
||||
fGameState = GAME_FREEZE;
|
||||
} else if ( fMode == GAME_ACTIVE ) {
|
||||
dprint( "[DEBUG] Game Started\n" );
|
||||
fGameState = GAME_ACTIVE;
|
||||
} else if ( fMode == GAME_END ) {
|
||||
dprint( "[DEBUG] Game Ended\n" );
|
||||
fGameState = GAME_END;
|
||||
}
|
||||
|
||||
fGameTime = fTime;
|
||||
}
|
||||
|
||||
void Timer_Update( void ) {
|
||||
if ( fGameTime <= 0 || fGameState == GAME_INACTIVE ) {
|
||||
return;
|
||||
}
|
||||
|
||||
fGameTime -= frametime;
|
||||
|
||||
if ( ( fGameState == GAME_ACTIVE ) || ( fGameState == GAME_FREEZE ) ) {
|
||||
if ( fGameTime <= 0 ) {
|
||||
if ( fGameState == GAME_ACTIVE ) {
|
||||
Timer_Begin( 5, GAME_END); // Round is over, 5 seconds til a new round starts
|
||||
} else {
|
||||
Timer_Begin( cvar( "mp_roundtime" ) * 60, GAME_ACTIVE ); // Unfreeze
|
||||
|
||||
float fRand = ceil( random() * 6 );
|
||||
if ( fRand == 1 ) {
|
||||
sound(world, CHAN_VOICE, "radio/moveout.wav", 1, ATTN_NONE );
|
||||
} else if ( fRand == 2 ) {
|
||||
sound(world, CHAN_VOICE, "radio/locknload.wav", 1, ATTN_NONE );
|
||||
} else {
|
||||
sound(world, CHAN_VOICE, "radio/letsgo.wav", 1, ATTN_NONE );
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if ( fGameState == GAME_END ) {
|
||||
if ( fGameTime <= 0 ) {
|
||||
// Restart round
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,48 @@
|
|||
#pragma target fte
|
||||
|
||||
#pragma progs_dat "../../Main/progs.dat"
|
||||
|
||||
#define QWSSQC
|
||||
|
||||
#includelist
|
||||
../Builtins.h
|
||||
../Globals.h
|
||||
Defs.h
|
||||
|
||||
../Shared/WeaponAK47.c
|
||||
../Shared/WeaponAUG.c
|
||||
../Shared/WeaponAWP.c
|
||||
../Shared/WeaponDeagle.c
|
||||
../Shared/WeaponElites.c
|
||||
../Shared/WeaponFiveSeven.c
|
||||
../Shared/WeaponG3SG1.c
|
||||
../Shared/WeaponGlock18.c
|
||||
../Shared/WeaponM3.c
|
||||
../Shared/WeaponM4A1.c
|
||||
../Shared/WeaponMac10.c
|
||||
../Shared/WeaponMP5.c
|
||||
../Shared/WeaponP228.c
|
||||
../Shared/WeaponP90.c
|
||||
../Shared/WeaponPara.c
|
||||
../Shared/WeaponScout.c
|
||||
../Shared/WeaponSG550.c
|
||||
../Shared/WeaponSG552.c
|
||||
../Shared/WeaponTMP.c
|
||||
../Shared/WeaponUMP45.c
|
||||
../Shared/WeaponUSP45.c
|
||||
../Shared/WeaponXM1014.c
|
||||
../Shared/WeaponBase.c
|
||||
../Shared/Weapons.c
|
||||
|
||||
Timer.c
|
||||
Main.c
|
||||
EntHostage.c
|
||||
FuncLadder.c
|
||||
FuncHostageRescue.c
|
||||
FuncBombTarget.c
|
||||
FuncBuyZone.c
|
||||
Spawn.c
|
||||
Entities.c
|
||||
Input.c
|
||||
Client.c
|
||||
#endlist
|
|
@ -0,0 +1,91 @@
|
|||
/*
|
||||
OpenCS Project
|
||||
Copyright (C) 2015 Marco "eukara" Hladik
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
.int iClip_AK47;
|
||||
|
||||
// Weapon Info
|
||||
weaponinfo_t wptAK47 = {
|
||||
WEAPON_AK47, // Identifier
|
||||
SLOT_PRIMARY,
|
||||
2500, // Price
|
||||
CALIBER_762MM, // Caliber ID
|
||||
221, // Max Player Speed
|
||||
1, // Bullets Per Shot
|
||||
30, // Clip/MagSize
|
||||
36, // Damage Per Bullet
|
||||
2, // Penetration Multiplier
|
||||
8192, // Bullet Range
|
||||
0.98, // Range Modifier
|
||||
TYPE_AUTO,
|
||||
0.15, // Attack-Delay
|
||||
3.0, // Reload-Delay
|
||||
iAmmo_762MM, // Caliber Pointer
|
||||
iClip_AK47 // Clip Pointer
|
||||
};
|
||||
|
||||
// Anim Table
|
||||
enum {
|
||||
ANIM_AK47_IDLE,
|
||||
ANIM_AK47_RELOAD,
|
||||
ANIM_AK47_DRAW,
|
||||
ANIM_AK47_SHOOT1,
|
||||
ANIM_AK47_SHOOT2,
|
||||
ANIM_AK47_SHOOT3
|
||||
};
|
||||
|
||||
void WeaponAK47_Draw( void ) {
|
||||
#ifdef QWSSQC
|
||||
OpenCSGunBase_Draw();
|
||||
sound( self, CHAN_WEAPON, "weapons/ak47_boltpull.wav", 1, ATTN_IDLE ); // TODO: Move to the client...?
|
||||
#else
|
||||
View_PlayAnimation( ANIM_AK47_DRAW );
|
||||
#endif
|
||||
}
|
||||
|
||||
void WeaponAK47_PrimaryFire( void ) {
|
||||
#ifdef QWSSQC
|
||||
if ( OpenCSGunBase_PrimaryFire() == TRUE ) {
|
||||
if ( random() <= 0.5 ) {
|
||||
sound( self, CHAN_WEAPON, "weapons/ak47-1.wav", 1, ATTN_NORM );
|
||||
} else {
|
||||
sound( self, CHAN_WEAPON, "weapons/ak47-2.wav", 1, ATTN_NORM );
|
||||
}
|
||||
}
|
||||
#else
|
||||
int iRand = ceil( random() * 3 );
|
||||
if ( iRand == 1 ) {
|
||||
View_PlayAnimation( ANIM_AK47_SHOOT1 );
|
||||
} else if ( iRand == 2 ) {
|
||||
View_PlayAnimation( ANIM_AK47_SHOOT2 );
|
||||
} else {
|
||||
View_PlayAnimation( ANIM_AK47_SHOOT3 );
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void WeaponAK47_Reload( void ) {
|
||||
#ifdef QWSSQC
|
||||
if ( OpenCSGunBase_Reload() == TRUE ) {
|
||||
// Play Sound
|
||||
}
|
||||
#else
|
||||
View_PlayAnimation( ANIM_AK47_RELOAD );
|
||||
#endif
|
||||
}
|
|
@ -0,0 +1,87 @@
|
|||
/*
|
||||
OpenCS Project
|
||||
Copyright (C) 2015 Marco "eukara" Hladik
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
.int iClip_AUG;
|
||||
|
||||
// Weapon Info
|
||||
weaponinfo_t wptAUG = {
|
||||
WEAPON_AUG, // Identifier
|
||||
SLOT_PRIMARY,
|
||||
3500, // Price
|
||||
CALIBER_762MM, // Caliber ID
|
||||
221, // Max Player Speed
|
||||
1, // Bullets Per Shot
|
||||
30, // Clip/MagSize
|
||||
32, // Damage Per Bullet
|
||||
2, // Penetration Multiplier
|
||||
8192, // Bullet Range
|
||||
0.96, // Range Modifier
|
||||
TYPE_AUTO,
|
||||
0.15, // Attack-Delay
|
||||
3.0, // Reload-Delay
|
||||
iAmmo_762MM, // Caliber Pointer
|
||||
iClip_AUG // Clip Pointer
|
||||
};
|
||||
|
||||
// Anim Table
|
||||
enum {
|
||||
ANIM_AUG_IDLE,
|
||||
ANIM_AUG_RELOAD,
|
||||
ANIM_AUG_DRAW,
|
||||
ANIM_AUG_SHOOT1,
|
||||
ANIM_AUG_SHOOT2,
|
||||
ANIM_AUG_SHOOT3
|
||||
};
|
||||
|
||||
void WeaponAUG_Draw( void ) {
|
||||
#ifdef QWSSQC
|
||||
OpenCSGunBase_Draw();
|
||||
sound( self, CHAN_WEAPON, "weapons/aug_boltpull.wav", 1, ATTN_IDLE ); // TODO: Move to the client...?
|
||||
#else
|
||||
View_PlayAnimation( ANIM_AUG_DRAW );
|
||||
#endif
|
||||
}
|
||||
|
||||
void WeaponAUG_PrimaryFire( void ) {
|
||||
#ifdef QWSSQC
|
||||
if ( OpenCSGunBase_PrimaryFire() == TRUE ) {
|
||||
sound( self, CHAN_WEAPON, "weapons/aug-1.wav", 1, ATTN_NORM );
|
||||
}
|
||||
#else
|
||||
int iRand = ceil( random() * 3 );
|
||||
if ( iRand == 1 ) {
|
||||
View_PlayAnimation( ANIM_AUG_SHOOT1 );
|
||||
} else if ( iRand == 2 ) {
|
||||
View_PlayAnimation( ANIM_AUG_SHOOT2 );
|
||||
} else {
|
||||
View_PlayAnimation( ANIM_AUG_SHOOT3 );
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void WeaponAUG_Reload( void ) {
|
||||
#ifdef QWSSQC
|
||||
if ( OpenCSGunBase_Reload() == TRUE ) {
|
||||
// Play Sound
|
||||
}
|
||||
#else
|
||||
View_PlayAnimation( ANIM_AUG_RELOAD );
|
||||
#endif
|
||||
}
|
|
@ -0,0 +1,88 @@
|
|||
/*
|
||||
OpenCS Project
|
||||
Copyright (C) 2015 Marco "eukara" Hladik
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
.int iClip_AWP;
|
||||
|
||||
// Weapon Info
|
||||
weaponinfo_t wptAWP = {
|
||||
WEAPON_AWP, // Identifier
|
||||
SLOT_PRIMARY,
|
||||
4750, // Price
|
||||
CALIBER_338MAG, // Caliber ID
|
||||
210, // Max Player Speed
|
||||
1, // Bullets Per Shot
|
||||
10, // Clip/MagSize
|
||||
115, // Damage Per Bullet
|
||||
3, // Penetration Multiplier
|
||||
8192, // Bullet Range
|
||||
0.99, // Range Modifier
|
||||
TYPE_AUTO,
|
||||
0.15, // Attack-Delay
|
||||
3.0, // Reload-Delay
|
||||
iAmmo_338MAG, // Caliber Pointer
|
||||
iClip_AWP // Clip Pointer
|
||||
};
|
||||
|
||||
// Anim Table
|
||||
enum {
|
||||
ANIM_AWP_IDLE,
|
||||
ANIM_AWP_SHOOT1,
|
||||
ANIM_AWP_SHOOT2,
|
||||
ANIM_AWP_SHOOT3,
|
||||
ANIM_AWP_RELOAD,
|
||||
ANIM_AWP_DRAW
|
||||
};
|
||||
|
||||
void WeaponAWP_Draw( void ) {
|
||||
#ifdef QWSSQC
|
||||
OpenCSGunBase_Draw();
|
||||
sound( self, CHAN_WEAPON, "weapons/awp_deploy.wav", 1, ATTN_IDLE ); // TODO: Move to the client...?
|
||||
#else
|
||||
View_PlayAnimation( ANIM_AWP_DRAW );
|
||||
#endif
|
||||
}
|
||||
|
||||
void WeaponAWP_PrimaryFire( void ) {
|
||||
#ifdef QWSSQC
|
||||
if ( OpenCSGunBase_PrimaryFire() == TRUE ) {
|
||||
// Play Sound
|
||||
sound( self, CHAN_WEAPON, "weapons/awp1.wav", 1, ATTN_NORM );
|
||||
}
|
||||
#else
|
||||
int iRand = ceil( random() * 3 );
|
||||
if ( iRand == 1 ) {
|
||||
View_PlayAnimation( ANIM_AWP_SHOOT1 );
|
||||
} else if ( iRand == 2 ) {
|
||||
View_PlayAnimation( ANIM_AWP_SHOOT2 );
|
||||
} else {
|
||||
View_PlayAnimation( ANIM_AWP_SHOOT3 );
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void WeaponAWP_Reload( void ) {
|
||||
#ifdef QWSSQC
|
||||
if ( OpenCSGunBase_Reload() == TRUE ) {
|
||||
// Play Sound
|
||||
}
|
||||
#else
|
||||
View_PlayAnimation( ANIM_AWP_RELOAD );
|
||||
#endif
|
||||
}
|
|
@ -0,0 +1,104 @@
|
|||
/*
|
||||
OpenCS Project
|
||||
Copyright (C) 2015 Marco "eukara" Hladik
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
// Because padding...
|
||||
weaponinfo_t wptDEFAULT = { 0, 0, 0, 0, 240, 0, 0, 0, 0, 0.0, 0.0, 0, 0.0, 0.0, iAmmo_9MM, iAmmo_9MM };
|
||||
|
||||
weaponinfo_t wptTable[ CS_WEAPON_COUNT ] = {
|
||||
wptDEFAULT,
|
||||
wptDEFAULT,
|
||||
wptUSP45,
|
||||
wptGLOCK18,
|
||||
wptDEAGLE,
|
||||
wptP228,
|
||||
wptELITES,
|
||||
wptFIVESEVEN,
|
||||
wptM3,
|
||||
wptXM1014,
|
||||
wptMP5,
|
||||
wptP90,
|
||||
wptUMP45,
|
||||
wptMAC10,
|
||||
wptTMP,
|
||||
wptAK47,
|
||||
wptSG552,
|
||||
wptM4A1,
|
||||
wptAUG,
|
||||
wptSCOUT,
|
||||
wptAWP,
|
||||
wptG3SG1,
|
||||
wptSG550,
|
||||
wptPARA
|
||||
};
|
||||
|
||||
#ifdef QWSSQC
|
||||
void OpenCSGunBase_Draw( void ) {
|
||||
#ifdef QWSSQC
|
||||
self.iCurrentClip = self.(wptTable[ self.weapon ].iClipfld);
|
||||
self.iCurrentCaliber = self.(wptTable[ self.weapon ].iCaliberfld);
|
||||
Client_SendEvent( self, EV_WEAPON_DRAW );
|
||||
#endif
|
||||
}
|
||||
|
||||
// Returns whether or not to play an animation
|
||||
float OpenCSGunBase_PrimaryFire( void ) {
|
||||
#ifdef QWSSQC
|
||||
// Nothing in the clip anymore? Don't even attempt
|
||||
if ( ( self.(wptTable[ self.weapon ].iClipfld) - wptTable[ self.weapon ].iBullets ) < 0 ) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// Take as many bullets away from the clip as it takes
|
||||
self.(wptTable[ self.weapon ].iClipfld) -= wptTable[ self.weapon ].iBullets;
|
||||
self.fAttackFinished = time + wptTable[ self.weapon ].fAttackFinished;
|
||||
|
||||
Client_SendEvent( self, EV_WEAPON_PRIMARYATTACK );
|
||||
return TRUE;
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
float OpenCSGunBase_Reload( void ) {
|
||||
#ifdef QWSSQC
|
||||
// Don't bother reloading the gun when full
|
||||
if ( self.(wptTable[ self.weapon ].iClipfld) == wptTable[ self.weapon ].iClipSize ) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// Also don't bother reloading the gun if you've got nothing to reload it with
|
||||
if ( self.(wptTable[ self.weapon ].iCaliberfld) <= 0 ) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if ( self.(wptTable[ self.weapon ].iCaliberfld) < wptTable[ self.weapon ].iClipSize ) {
|
||||
self.(wptTable[ self.weapon ].iClipfld) = self.(wptTable[ self.weapon ].iCaliberfld);
|
||||
self.(wptTable[ self.weapon ].iCaliberfld) = 0;
|
||||
} else {
|
||||
self.(wptTable[ self.weapon ].iClipfld) = wptTable[ self.weapon ].iClipSize;
|
||||
self.(wptTable[ self.weapon ].iCaliberfld) -= wptTable[ self.weapon ].iClipSize;
|
||||
}
|
||||
|
||||
self.fAttackFinished = time + wptTable[ self.weapon ].fReloadFinished;
|
||||
|
||||
Client_SendEvent( self, EV_WEAPON_RELOAD );
|
||||
return TRUE;
|
||||
#endif
|
||||
}
|
||||
#endif
|
|
@ -0,0 +1,93 @@
|
|||
/*
|
||||
OpenCS Project
|
||||
Copyright (C) 2015 Marco "eukara" Hladik
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
.int iClip_DEAGLE;
|
||||
|
||||
// Weapon Info
|
||||
weaponinfo_t wptDEAGLE = {
|
||||
WEAPON_DEAGLE, // Identifier
|
||||
SLOT_SECONDARY,
|
||||
3500, // Price
|
||||
CALIBER_50AE, // Caliber ID
|
||||
650, // Max Player Speed
|
||||
1, // Bullets Per Shot
|
||||
7, // Clip/MagSize
|
||||
54, // Damage Per Bullet
|
||||
2, // Penetration Multiplier
|
||||
4096, // Bullet Range
|
||||
0.81, // Range Modifier
|
||||
TYPE_SEMI,
|
||||
0.15, // Attack-Delay
|
||||
3.0, // Reload-Delay
|
||||
iAmmo_50AE, // Caliber Pointer
|
||||
iClip_DEAGLE // Clip Pointer
|
||||
};
|
||||
|
||||
// Anim Table
|
||||
enum {
|
||||
ANIM_DEAGLE_IDLE,
|
||||
ANIM_DEAGLE_SHOOT1,
|
||||
ANIM_DEAGLE_SHOOT2,
|
||||
ANIM_DEAGLE_SHOOT_EMPTY,
|
||||
ANIM_DEAGLE_RELOAD,
|
||||
ANIM_DEAGLE_DRAW
|
||||
};
|
||||
|
||||
void WeaponDEAGLE_Draw( void ) {
|
||||
#ifdef QWSSQC
|
||||
OpenCSGunBase_Draw();
|
||||
sound( self, CHAN_WEAPON, "weapons/de_deploy.wav", 1, ATTN_IDLE ); // TODO: Move to the client..
|
||||
#else
|
||||
View_PlayAnimation( ANIM_DEAGLE_DRAW );
|
||||
#endif
|
||||
}
|
||||
|
||||
void WeaponDEAGLE_PrimaryFire( void ) {
|
||||
#ifdef QWSSQC
|
||||
if ( OpenCSGunBase_PrimaryFire() == TRUE ) {
|
||||
if ( random() <= 0.5 ) {
|
||||
sound( self, CHAN_WEAPON, "weapons/deagle-1.wav", 1, ATTN_NORM );
|
||||
} else {
|
||||
sound( self, CHAN_WEAPON, "weapons/deagle-2.wav", 1, ATTN_NORM );
|
||||
}
|
||||
}
|
||||
#else
|
||||
if ( getstatf( STAT_CURRENT_CLIP ) == 0 ) {
|
||||
View_PlayAnimation( ANIM_DEAGLE_SHOOT_EMPTY );
|
||||
} else {
|
||||
if ( random() <= 0.5 ) {
|
||||
View_PlayAnimation( ANIM_DEAGLE_SHOOT1 );
|
||||
} else {
|
||||
View_PlayAnimation( ANIM_DEAGLE_SHOOT2 );
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
void WeaponDEAGLE_Reload( void ) {
|
||||
#ifdef QWSSQC
|
||||
if ( OpenCSGunBase_Reload() == TRUE ) {
|
||||
// Play Sound
|
||||
}
|
||||
#else
|
||||
View_PlayAnimation( ANIM_DEAGLE_RELOAD );
|
||||
#endif
|
||||
}
|
|
@ -0,0 +1,41 @@
|
|||
/*
|
||||
OpenCS Project
|
||||
Copyright (C) 2015 Marco "eukara" Hladik
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
.int iClip_ELITES;
|
||||
|
||||
// Weapon Info
|
||||
weaponinfo_t wptELITES = {
|
||||
WEAPON_ELITES, // Identifier
|
||||
SLOT_SECONDARY,
|
||||
800, // Price
|
||||
CALIBER_9MM, // Caliber ID
|
||||
240, // Max Player Speed
|
||||
1, // Bullets Per Shot
|
||||
30, // Clip/MagSize
|
||||
45, // Damage Per Bullet
|
||||
1, // Penetration Multiplier
|
||||
4096, // Bullet Range
|
||||
0.75, // Range Modifier
|
||||
TYPE_SEMI,
|
||||
0.15, // Attack-Delay
|
||||
3.0, // Reload-Delay
|
||||
iAmmo_9MM, // Caliber Pointer
|
||||
iClip_ELITES // Clip Pointer
|
||||
};
|
|
@ -0,0 +1,90 @@
|
|||
/*
|
||||
OpenCS Project
|
||||
Copyright (C) 2015 Marco "eukara" Hladik
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
.int iClip_FIVESEVEN;
|
||||
|
||||
// Weapon Info
|
||||
weaponinfo_t wptFIVESEVEN = {
|
||||
WEAPON_FIVESEVEN, // Identifier
|
||||
SLOT_SECONDARY,
|
||||
750, // Price
|
||||
CALIBER_57MM, // Caliber ID
|
||||
240, // Max Player Speed
|
||||
1, // Bullets Per Shot
|
||||
20, // Clip/MagSize
|
||||
25, // Damage Per Bullet
|
||||
1, // Penetration Multiplier
|
||||
4096, // Bullet Range
|
||||
0.885, // Range Modifier
|
||||
TYPE_SEMI,
|
||||
0.15, // Attack-Delay
|
||||
3.0, // Reload-Delay
|
||||
iAmmo_57MM, // Caliber Pointer
|
||||
iClip_FIVESEVEN // Clip Pointer
|
||||
};
|
||||
|
||||
// Anim Table
|
||||
enum {
|
||||
ANIM_FIVESEVEN_IDLE,
|
||||
ANIM_FIVESEVEN_SHOOT1,
|
||||
ANIM_FIVESEVEN_SHOOT2,
|
||||
ANIM_FIVESEVEN_SHOOT_EMPTY,
|
||||
ANIM_FIVESEVEN_RELOAD,
|
||||
ANIM_FIVESEVEN_DRAW
|
||||
};
|
||||
|
||||
void WeaponFIVESEVEN_Draw( void ) {
|
||||
#ifdef QWSSQC
|
||||
OpenCSGunBase_Draw();
|
||||
sound( self, CHAN_WEAPON, "weapons/fiveseven_slidepull.wav", 1, ATTN_IDLE ); // TODO: Move to the client...?
|
||||
#else
|
||||
View_PlayAnimation( ANIM_FIVESEVEN_DRAW );
|
||||
#endif
|
||||
}
|
||||
|
||||
void WeaponFIVESEVEN_PrimaryFire( void ) {
|
||||
#ifdef QWSSQC
|
||||
if ( OpenCSGunBase_PrimaryFire() == TRUE ) {
|
||||
// Play Sound
|
||||
sound( self, CHAN_WEAPON, "weapons/fiveseven-1.wav", 1, ATTN_NORM );
|
||||
}
|
||||
#else
|
||||
if ( getstatf( STAT_CURRENT_CLIP ) == 0 ) {
|
||||
View_PlayAnimation( ANIM_FIVESEVEN_SHOOT_EMPTY );
|
||||
} else {
|
||||
if ( random() <= 0.5 ) {
|
||||
View_PlayAnimation( ANIM_FIVESEVEN_SHOOT1 );
|
||||
} else {
|
||||
View_PlayAnimation( ANIM_FIVESEVEN_SHOOT2 );
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
void WeaponFIVESEVEN_Reload( void ) {
|
||||
#ifdef QWSSQC
|
||||
if ( OpenCSGunBase_Reload() == TRUE ) {
|
||||
// Play Sound
|
||||
}
|
||||
#else
|
||||
View_PlayAnimation( ANIM_FIVESEVEN_RELOAD );
|
||||
#endif
|
||||
}
|
|
@ -0,0 +1,86 @@
|
|||
/*
|
||||
OpenCS Project
|
||||
Copyright (C) 2015 Marco "eukara" Hladik
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
.int iClip_G3SG1;
|
||||
|
||||
// Weapon Info
|
||||
weaponinfo_t wptG3SG1 = {
|
||||
WEAPON_G3SG1, // Identifier
|
||||
SLOT_PRIMARY,
|
||||
5000, // Price
|
||||
CALIBER_762MM, // Caliber ID
|
||||
210, // Max Player Speed
|
||||
1, // Bullets Per Shot
|
||||
20, // Clip/MagSize
|
||||
80, // Damage Per Bullet
|
||||
3, // Penetration Multiplier
|
||||
8192, // Bullet Range
|
||||
0.98, // Range Modifier
|
||||
TYPE_AUTO,
|
||||
0.15, // Attack-Delay
|
||||
3.0, // Reload-Delay
|
||||
iAmmo_762MM, // Caliber Pointer
|
||||
iClip_G3SG1 // Clip Pointer
|
||||
};
|
||||
|
||||
// Anim Table
|
||||
enum {
|
||||
ANIM_G3SG1_IDLE,
|
||||
ANIM_G3SG1_SHOOT1,
|
||||
ANIM_G3SG1_SHOOT2,
|
||||
ANIM_G3SG1_RELOAD,
|
||||
ANIM_G3SG1_DRAW
|
||||
};
|
||||
|
||||
void WeaponG3SG1_Draw( void ) {
|
||||
#ifdef QWSSQC
|
||||
OpenCSGunBase_Draw();
|
||||
sound( self, CHAN_WEAPON, "weapons/g3sg1_slide.wav", 1, ATTN_IDLE ); // TODO: Move to the client...?
|
||||
#else
|
||||
View_PlayAnimation( ANIM_G3SG1_DRAW );
|
||||
#endif
|
||||
}
|
||||
|
||||
void WeaponG3SG1_PrimaryFire( void ) {
|
||||
#ifdef QWSSQC
|
||||
if ( OpenCSGunBase_PrimaryFire() == TRUE ) {
|
||||
// Play Sound
|
||||
dprint("[DEBUG] FIRE!\n");
|
||||
sound( self, CHAN_WEAPON, "weapons/g3sg1-1.wav", 1, ATTN_NORM );
|
||||
}
|
||||
#else
|
||||
|
||||
if ( random() <= 0.5 ) {
|
||||
View_PlayAnimation( ANIM_G3SG1_SHOOT1 );
|
||||
} else {
|
||||
View_PlayAnimation( ANIM_G3SG1_SHOOT2 );
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void WeaponG3SG1_Reload( void ) {
|
||||
#ifdef QWSSQC
|
||||
if ( OpenCSGunBase_Reload() == TRUE ) {
|
||||
// Play Sound
|
||||
}
|
||||
#else
|
||||
View_PlayAnimation( ANIM_G3SG1_RELOAD );
|
||||
#endif
|
||||
}
|
|
@ -0,0 +1,132 @@
|
|||
/*
|
||||
OpenCS Project
|
||||
Copyright (C) 2015 Marco "eukara" Hladik
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
.int iClip_GLOCK18;
|
||||
|
||||
#ifdef QWSSQC
|
||||
.int iMode_GLOCK18;
|
||||
#else
|
||||
int iWeaponMode_GLOCK18;
|
||||
#endif
|
||||
|
||||
// Weapon Info
|
||||
weaponinfo_t wptGLOCK18 = {
|
||||
WEAPON_GLOCK18, // Identifier
|
||||
SLOT_SECONDARY,
|
||||
400, // Price
|
||||
CALIBER_9MM, // Caliber ID
|
||||
240, // Max Player Speed
|
||||
1, // Bullets Per Shot
|
||||
20, // Clip/MagSize
|
||||
25, // Damage Per Bullet
|
||||
1, // Penetration Multiplier
|
||||
4096, // Bullet Range
|
||||
0.75, // Range Modifier
|
||||
TYPE_SEMI,
|
||||
0.15, // Attack-Delay
|
||||
3.0, // Reload-Delay
|
||||
iAmmo_9MM, // Caliber Pointer
|
||||
iClip_GLOCK18 // Clip Pointer
|
||||
};
|
||||
|
||||
// Anim Table
|
||||
enum {
|
||||
ANIM_GLOCK_IDLE1,
|
||||
ANIM_GLOCK_IDLE2,
|
||||
ANIM_GLOCK_IDLE3,
|
||||
ANIM_GLOCK_SHOOT_BURST1,
|
||||
ANIM_GLOCK_SHOOT_BURST2,
|
||||
ANIM_GLOCK_SHOOT,
|
||||
ANIM_GLOCK_SHOOT_EMPTY,
|
||||
ANIM_GLOCK_RELOAD1,
|
||||
ANIM_GLOCK_DRAW1,
|
||||
ANIM_GLOCK_UNUSED1,
|
||||
ANIM_GLOCK_UNUSED2,
|
||||
ANIM_GLOCK_DRAW2,
|
||||
ANIM_GLOCK_RELOAD2
|
||||
};
|
||||
|
||||
void WeaponGLOCK18_Draw( void ) {
|
||||
#ifdef QWSSQC
|
||||
OpenCSGunBase_Draw();
|
||||
#else
|
||||
View_PlayAnimation( ANIM_DEAGLE_DRAW );
|
||||
#endif
|
||||
}
|
||||
|
||||
void WeaponGLOCK18_PrimaryFire( void ) {
|
||||
#ifdef QWSSQC
|
||||
if ( OpenCSGunBase_PrimaryFire() == TRUE ) {
|
||||
// Play Sound
|
||||
if ( self.iMode_GLOCK18 == FALSE ) {
|
||||
sound( self, CHAN_WEAPON, "weapons/glock18-2.wav", 1, ATTN_NORM );
|
||||
} else {
|
||||
sound( self, CHAN_WEAPON, "weapons/glock18-1.wav", 1, ATTN_NORM );
|
||||
}
|
||||
}
|
||||
#else
|
||||
if ( iWeaponMode_GLOCK18 == FALSE ) {
|
||||
if ( getstatf( STAT_CURRENT_CLIP ) == 0 ) {
|
||||
View_PlayAnimation( ANIM_GLOCK_SHOOT_EMPTY );
|
||||
} else {
|
||||
View_PlayAnimation( ANIM_GLOCK_SHOOT );
|
||||
}
|
||||
} else {
|
||||
if ( random() <= 0.5 ) {
|
||||
View_PlayAnimation( ANIM_GLOCK_SHOOT_BURST1 );
|
||||
} else {
|
||||
View_PlayAnimation( ANIM_GLOCK_SHOOT_BURST2 );
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void WeaponGLOCK18_Secondary( void ) {
|
||||
#ifdef QWSSQC
|
||||
// Just switch the modes quickly
|
||||
self.iMode_GLOCK18 = 1 - self.iMode_GLOCK18;
|
||||
self.fAttackFinished = time + 1.0;
|
||||
|
||||
// Tell the client that we switched modes, too
|
||||
Client_SendEvent( self, EV_WEAPON_SECONDARYATTACK );
|
||||
|
||||
if ( self.iMode_GLOCK18 == TRUE ) {
|
||||
centerprint( self, "Switched to Burst-Fire mode" );
|
||||
} else {
|
||||
centerprint( self, "Switched to Semi-Automatic mode" );
|
||||
}
|
||||
#else
|
||||
iWeaponMode_GLOCK18 = 1 - iWeaponMode_GLOCK18;
|
||||
#endif
|
||||
}
|
||||
|
||||
void WeaponGLOCK18_Reload( void ) {
|
||||
#ifdef QWSSQC
|
||||
if ( OpenCSGunBase_Reload() == TRUE ) {
|
||||
// Play Sound
|
||||
}
|
||||
#else
|
||||
if ( getstatf( STAT_CURRENT_CLIP ) == 0 ) {
|
||||
View_PlayAnimation( ANIM_GLOCK_RELOAD1 );
|
||||
} else {
|
||||
View_PlayAnimation( ANIM_GLOCK_RELOAD2 );
|
||||
}
|
||||
#endif
|
||||
}
|
|
@ -0,0 +1,41 @@
|
|||
/*
|
||||
OpenCS Project
|
||||
Copyright (C) 2015 Marco "eukara" Hladik
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
.int iClip_M3;
|
||||
|
||||
// Weapon Info
|
||||
weaponinfo_t wptM3 = {
|
||||
WEAPON_M3, // Identifier
|
||||
SLOT_PRIMARY,
|
||||
500, // Price
|
||||
CALIBER_BUCKSHOT, // Caliber ID
|
||||
220, // Max Player Speed
|
||||
9, // Bullets Per Shot
|
||||
8, // Clip/MagSize
|
||||
26, // Damage Per Bullet
|
||||
1, // Penetration Multiplier
|
||||
3000, // Bullet Range
|
||||
0.7, // Range Modifier
|
||||
TYPE_SEMI,
|
||||
2.0, // Attack-Delay
|
||||
3.0, // Reload-Delay
|
||||
iAmmo_BUCKSHOT, // Caliber Pointer
|
||||
iClip_M3 // Clip Pointer
|
||||
};
|
|
@ -0,0 +1,41 @@
|
|||
/*
|
||||
OpenCS Project
|
||||
Copyright (C) 2015 Marco "eukara" Hladik
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
.int iClip_M4A1;
|
||||
|
||||
// Weapon Info
|
||||
weaponinfo_t wptM4A1 = {
|
||||
WEAPON_M4A1, // Identifier
|
||||
SLOT_PRIMARY,
|
||||
3100, // Price
|
||||
CALIBER_556MM, // Caliber ID
|
||||
230, // Max Player Speed
|
||||
1, // Bullets Per Shot
|
||||
30, // Clip/MagSize
|
||||
33, // Damage Per Bullet
|
||||
1, // Penetration Multiplier
|
||||
8192, // Bullet Range
|
||||
0.97, // Range Modifier
|
||||
TYPE_AUTO,
|
||||
0.15, // Attack-Delay
|
||||
3.0, // Reload-Delay
|
||||
iAmmo_556MM, // Caliber Pointer
|
||||
iClip_M4A1 // Clip Pointer
|
||||
};
|
|
@ -0,0 +1,41 @@
|
|||
/*
|
||||
OpenCS Project
|
||||
Copyright (C) 2015 Marco "eukara" Hladik
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
.int iClip_MP5;
|
||||
|
||||
// Weapon Info
|
||||
weaponinfo_t wptMP5 = {
|
||||
WEAPON_MP5, // Identifier
|
||||
SLOT_PRIMARY,
|
||||
1500, // Price
|
||||
CALIBER_9MM, // Caliber ID
|
||||
240, // Max Player Speed
|
||||
1, // Bullets Per Shot
|
||||
30, // Clip/MagSize
|
||||
26, // Damage Per Bullet
|
||||
1, // Penetration Multiplier
|
||||
4096, // Bullet Range
|
||||
0.84, // Range Modifier
|
||||
TYPE_AUTO,
|
||||
0.15, // Attack-Delay
|
||||
3.0, // Reload-Delay
|
||||
iAmmo_9MM, // Caliber Pointer
|
||||
iClip_MP5 // Clip Pointer
|
||||
};
|
|
@ -0,0 +1,41 @@
|
|||
/*
|
||||
OpenCS Project
|
||||
Copyright (C) 2015 Marco "eukara" Hladik
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
.int iClip_MAC10;
|
||||
|
||||
// Weapon Info
|
||||
weaponinfo_t wptMAC10 = {
|
||||
WEAPON_MAC10, // Identifier
|
||||
SLOT_PRIMARY,
|
||||
1400, // Price
|
||||
CALIBER_45ACP, // Caliber ID
|
||||
240, // Max Player Speed
|
||||
1, // Bullets Per Shot
|
||||
30, // Clip/MagSize
|
||||
29, // Damage Per Bullet
|
||||
1, // Penetration Multiplier
|
||||
4096, // Bullet Range
|
||||
0.82, // Range Modifier
|
||||
TYPE_AUTO,
|
||||
0.15, // Attack-Delay
|
||||
3.0, // Reload-Delay
|
||||
iAmmo_45ACP, // Caliber Pointer
|
||||
iClip_MAC10 // Clip Pointer
|
||||
};
|
|
@ -0,0 +1,41 @@
|
|||
/*
|
||||
OpenCS Project
|
||||
Copyright (C) 2015 Marco "eukara" Hladik
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
.int iClip_P228;
|
||||
|
||||
// Weapon Info
|
||||
weaponinfo_t wptP228 = {
|
||||
WEAPON_P228, // Identifier
|
||||
SLOT_SECONDARY,
|
||||
600, // Price
|
||||
CALIBER_357SIG, // Caliber ID
|
||||
240, // Max Player Speed
|
||||
1, // Bullets Per Shot
|
||||
13, // Clip/MagSize
|
||||
40, // Damage Per Bullet
|
||||
1, // Penetration Multiplier
|
||||
4096, // Bullet Range
|
||||
0.8, // Range Modifier
|
||||
TYPE_SEMI,
|
||||
0.15, // Attack-Delay
|
||||
3.0, // Reload-Delay
|
||||
iAmmo_357SIG, // Caliber Pointer
|
||||
iClip_P228 // Clip Pointer
|
||||
};
|
|
@ -0,0 +1,41 @@
|
|||
/*
|
||||
OpenCS Project
|
||||
Copyright (C) 2015 Marco "eukara" Hladik
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
.int iClip_P90;
|
||||
|
||||
// Weapon Info
|
||||
weaponinfo_t wptP90 = {
|
||||
WEAPON_P90, // Identifier
|
||||
SLOT_PRIMARY,
|
||||
2350, // Price
|
||||
CALIBER_57MM, // Caliber ID
|
||||
235, // Max Player Speed
|
||||
1, // Bullets Per Shot
|
||||
50, // Clip/MagSize
|
||||
26, // Damage Per Bullet
|
||||
1, // Penetration Multiplier
|
||||
4096, // Bullet Range
|
||||
0.84, // Range Modifier
|
||||
TYPE_AUTO,
|
||||
0.15, // Attack-Delay
|
||||
3.0, // Reload-Delay
|
||||
iAmmo_57MM, // Caliber Pointer
|
||||
iClip_P90 // Clip Pointer
|
||||
};
|
|
@ -0,0 +1,41 @@
|
|||
/*
|
||||
OpenCS Project
|
||||
Copyright (C) 2015 Marco "eukara" Hladik
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
.int iClip_PARA;
|
||||
|
||||
// Weapon Info
|
||||
weaponinfo_t wptPARA = {
|
||||
WEAPON_PARA, // Identifier
|
||||
SLOT_PRIMARY,
|
||||
5750, // Price
|
||||
CALIBER_556MM, // Caliber ID
|
||||
220, // Max Player Speed
|
||||
1, // Bullets Per Shot
|
||||
100, // Clip/MagSize
|
||||
35, // Damage Per Bullet
|
||||
2, // Penetration Multiplier
|
||||
8192, // Bullet Range
|
||||
0.97, // Range Modifier
|
||||
TYPE_AUTO,
|
||||
0.15, // Attack-Delay
|
||||
3.0, // Reload-Delay
|
||||
iAmmo_556MM, // Caliber Pointer
|
||||
iClip_PARA // Clip Pointer
|
||||
};
|
|
@ -0,0 +1,41 @@
|
|||
/*
|
||||
OpenCS Project
|
||||
Copyright (C) 2015 Marco "eukara" Hladik
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
.int iClip_SG550;
|
||||
|
||||
// Weapon Info
|
||||
weaponinfo_t wptSG550 = {
|
||||
WEAPON_SG550, // Identifier
|
||||
SLOT_PRIMARY,
|
||||
4200, // Price
|
||||
CALIBER_556MM, // Caliber ID
|
||||
210, // Max Player Speed
|
||||
1, // Bullets Per Shot
|
||||
30, // Clip/MagSize
|
||||
70, // Damage Per Bullet
|
||||
2, // Penetration Multiplier
|
||||
8192, // Bullet Range
|
||||
0.98, // Range Modifier
|
||||
TYPE_AUTO,
|
||||
0.15, // Attack-Delay
|
||||
3.0, // Reload-Delay
|
||||
iAmmo_556MM, // Caliber Pointer
|
||||
iClip_SG550 // Clip Pointer
|
||||
};
|
|
@ -0,0 +1,41 @@
|
|||
/*
|
||||
OpenCS Project
|
||||
Copyright (C) 2015 Marco "eukara" Hladik
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
.int iClip_SG552;
|
||||
|
||||
// Weapon Info
|
||||
weaponinfo_t wptSG552 = {
|
||||
WEAPON_SG552, // Identifier
|
||||
SLOT_PRIMARY,
|
||||
3500, // Price
|
||||
CALIBER_556MM, // Caliber ID
|
||||
235, // Max Player Speed
|
||||
1, // Bullets Per Shot
|
||||
30, // Clip/MagSize
|
||||
33, // Damage Per Bullet
|
||||
2, // Penetration Multiplier
|
||||
8192, // Bullet Range
|
||||
0.955, // Range Modifier
|
||||
TYPE_AUTO,
|
||||
0.15, // Attack-Delay
|
||||
3.0, // Reload-Delay
|
||||
iAmmo_556MM, // Caliber Pointer
|
||||
iClip_SG552 // Clip Pointer
|
||||
};
|
|
@ -0,0 +1,41 @@
|
|||
/*
|
||||
OpenCS Project
|
||||
Copyright (C) 2015 Marco "eukara" Hladik
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
.int iClip_SCOUT;
|
||||
|
||||
// Weapon Info
|
||||
weaponinfo_t wptSCOUT = {
|
||||
WEAPON_SCOUT, // Identifier
|
||||
SLOT_PRIMARY,
|
||||
2750, // Price
|
||||
CALIBER_762MM, // Caliber ID
|
||||
240, // Max Player Speed
|
||||
1, // Bullets Per Shot
|
||||
10, // Clip/MagSize
|
||||
75, // Damage Per Bullet
|
||||
3, // Penetration Multiplier
|
||||
8192, // Bullet Range
|
||||
0.98, // Range Modifier
|
||||
TYPE_AUTO,
|
||||
0.15, // Attack-Delay
|
||||
3.0, // Reload-Delay
|
||||
iAmmo_762MM, // Caliber Pointer
|
||||
iClip_SCOUT // Clip Pointer
|
||||
};
|
|
@ -0,0 +1,41 @@
|
|||
/*
|
||||
OpenCS Project
|
||||
Copyright (C) 2015 Marco "eukara" Hladik
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
.int iClip_TMP;
|
||||
|
||||
// Weapon Info
|
||||
weaponinfo_t wptTMP = {
|
||||
WEAPON_TMP, // Identifier
|
||||
SLOT_PRIMARY,
|
||||
1250, // Price
|
||||
CALIBER_9MM, // Caliber ID
|
||||
240, // Max Player Speed
|
||||
1, // Bullets Per Shot
|
||||
30, // Clip/MagSize
|
||||
26, // Damage Per Bullet
|
||||
1, // Penetration Multiplier
|
||||
4096, // Bullet Range
|
||||
0.84, // Range Modifier
|
||||
TYPE_AUTO,
|
||||
0.15, // Attack-Delay
|
||||
3.0, // Reload-Delay
|
||||
iAmmo_9MM, // Caliber Pointer
|
||||
iClip_TMP // Clip Pointer
|
||||
};
|
|
@ -0,0 +1,41 @@
|
|||
/*
|
||||
OpenCS Project
|
||||
Copyright (C) 2015 Marco "eukara" Hladik
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
.int iClip_UMP45;
|
||||
|
||||
// Weapon Info
|
||||
weaponinfo_t wptUMP45 = {
|
||||
WEAPON_UMP45, // Identifier
|
||||
SLOT_PRIMARY,
|
||||
1700, // Price
|
||||
CALIBER_45ACP, // Caliber ID
|
||||
240, // Max Player Speed
|
||||
1, // Bullets Per Shot
|
||||
25, // Clip/MagSize
|
||||
30, // Damage Per Bullet
|
||||
1, // Penetration Multiplier
|
||||
4096, // Bullet Range
|
||||
0.82, // Range Modifier
|
||||
TYPE_AUTO,
|
||||
0.15, // Attack-Delay
|
||||
3.0, // Reload-Delay
|
||||
iAmmo_45ACP, // Caliber Pointer
|
||||
iClip_UMP45 // Clip Pointer
|
||||
};
|
|
@ -0,0 +1,165 @@
|
|||
/*
|
||||
OpenCS Project
|
||||
Copyright (C) 2015 Marco "eukara" Hladik
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
.int iClip_USP45;
|
||||
|
||||
#ifdef QWSSQC
|
||||
.int iMode_USP45;
|
||||
#else
|
||||
int iWeaponMode_USP45;
|
||||
#endif
|
||||
|
||||
// Weapon Info
|
||||
weaponinfo_t wptUSP45 = {
|
||||
WEAPON_USP45, // Identifier
|
||||
SLOT_SECONDARY,
|
||||
500, // Price
|
||||
CALIBER_45ACP, // Caliber ID
|
||||
240, // Max Player Speed
|
||||
1, // Bullets Per Shot
|
||||
12, // Clip/MagSize
|
||||
34, // Damage Per Bullet
|
||||
1, // Penetration Multiplier
|
||||
4096, // Bullet Range
|
||||
0.79, // Range Modifier
|
||||
TYPE_SEMI,
|
||||
0.15, // Attack-Delay
|
||||
3.0, // Reload-Delay
|
||||
iAmmo_45ACP, // Caliber Pointer
|
||||
iClip_USP45 // Clip Pointer
|
||||
};
|
||||
|
||||
enum {
|
||||
ANIM_USP45_IDLE,
|
||||
ANIM_USP45_SILENCER_SHOOT1,
|
||||
ANIM_USP45_SILENCER_SHOOT2,
|
||||
ANIM_USP45_SILENCER_SHOOT3,
|
||||
ANIM_USP45_SILENCER_SHOOTLAST,
|
||||
ANIM_USP45_SILENCER_RELOAD,
|
||||
ANIM_USP45_SILENCER_DRAW,
|
||||
ANIM_USP45_SILENCER_ADD,
|
||||
ANIM_USP45_IDLE2,
|
||||
ANIM_USP45_SHOOT1,
|
||||
ANIM_USP45_SHOOT2,
|
||||
ANIM_USP45_SHOOT3,
|
||||
ANIM_USP45_SHOOTLAST,
|
||||
ANIM_USP45_RELOAD,
|
||||
ANIM_USP45_DRAW,
|
||||
ANIM_USP45_SILENCER_REMOVE
|
||||
};
|
||||
|
||||
void WeaponUSP45_Draw( void ) {
|
||||
#ifdef QWSSQC
|
||||
OpenCSGunBase_Draw();
|
||||
#else
|
||||
if ( iWeaponMode_USP45 == TRUE ) {
|
||||
View_PlayAnimation( ANIM_USP45_SILENCER_DRAW );
|
||||
} else {
|
||||
View_PlayAnimation( ANIM_USP45_DRAW );
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void WeaponUSP45_PrimaryFire( void ) {
|
||||
#ifdef QWSSQC
|
||||
if ( OpenCSGunBase_PrimaryFire() == TRUE ) {
|
||||
if ( self.iMode_USP45 == TRUE ) {
|
||||
if ( random() <= 0.5 ) {
|
||||
sound( self, CHAN_WEAPON, "weapons/usp1.wav", 1, ATTN_NORM );
|
||||
} else {
|
||||
sound( self, CHAN_WEAPON, "weapons/usp2.wav", 1, ATTN_NORM );
|
||||
}
|
||||
} else {
|
||||
sound( self, CHAN_WEAPON, "weapons/usp_unsil-1.wav", 1, ATTN_NORM );
|
||||
}
|
||||
}
|
||||
#else
|
||||
if ( getstatf( STAT_CURRENT_CLIP ) == 0 ) {
|
||||
if ( iWeaponMode_USP45 == TRUE ) {
|
||||
View_PlayAnimation( ANIM_USP45_SILENCER_SHOOTLAST );
|
||||
} else {
|
||||
View_PlayAnimation( ANIM_USP45_SHOOTLAST );
|
||||
}
|
||||
} else {
|
||||
int iRand = ceil( random() * 3 );
|
||||
|
||||
if ( iRand == 1 ) {
|
||||
if ( iWeaponMode_USP45 == TRUE ) {
|
||||
View_PlayAnimation( ANIM_USP45_SILENCER_SHOOT1 );
|
||||
} else {
|
||||
View_PlayAnimation( ANIM_USP45_SHOOT1 );
|
||||
}
|
||||
} else if ( iRand == 2 ) {
|
||||
if ( iWeaponMode_USP45 == TRUE ) {
|
||||
View_PlayAnimation( ANIM_USP45_SILENCER_SHOOT2 );
|
||||
} else {
|
||||
View_PlayAnimation( ANIM_USP45_SHOOT2 );
|
||||
}
|
||||
} else {
|
||||
if ( iWeaponMode_USP45 == TRUE ) {
|
||||
View_PlayAnimation( ANIM_USP45_SILENCER_SHOOT3 );
|
||||
} else {
|
||||
View_PlayAnimation( ANIM_USP45_SHOOT3 );
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void WeaponUSP45_Secondary( void ) {
|
||||
#ifdef QWSSQC
|
||||
// Just switch the modes quickly
|
||||
self.iMode_USP45 = 1 - self.iMode_USP45;
|
||||
self.fAttackFinished = time + 3.0;
|
||||
|
||||
// Tell the client that we switched modes, too
|
||||
Client_SendEvent( self, EV_WEAPON_SECONDARYATTACK );
|
||||
|
||||
if ( self.iMode_GLOCK18 == TRUE ) {
|
||||
sound( self, CHAN_WEAPON, "weapons/usp_silencer_on.wav", 1, ATTN_NORM );
|
||||
} else {
|
||||
sound( self, CHAN_WEAPON, "weapons/usp_silencer_off.wav", 1, ATTN_NORM );
|
||||
}
|
||||
|
||||
#else
|
||||
iWeaponMode_USP45 = 1 - iWeaponMode_USP45;
|
||||
|
||||
if ( iWeaponMode_USP45 == TRUE ) {
|
||||
View_PlayAnimation( ANIM_USP45_SILENCER_ADD );
|
||||
} else {
|
||||
View_PlayAnimation( ANIM_USP45_SILENCER_REMOVE );
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void WeaponUSP45_Reload( void ) {
|
||||
#ifdef QWSSQC
|
||||
if ( OpenCSGunBase_Reload() == TRUE ) {
|
||||
// Play Sound
|
||||
}
|
||||
#else
|
||||
if ( iWeaponMode_USP45 == TRUE ) {
|
||||
View_PlayAnimation( ANIM_USP45_SILENCER_RELOAD );
|
||||
} else {
|
||||
View_PlayAnimation( ANIM_USP45_RELOAD );
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
/*
|
||||
OpenCS Project
|
||||
Copyright (C) 2015 Marco "eukara" Hladik
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
.int iClip_XM1014;
|
||||
|
||||
// Weapon Info
|
||||
weaponinfo_t wptXM1014 = {
|
||||
WEAPON_XM1014, // Identifier
|
||||
SLOT_PRIMARY,
|
||||
3000, // Price
|
||||
CALIBER_BUCKSHOT, // Caliber ID
|
||||
240, // Max Player Speed
|
||||
6, // Bullets Per Shot
|
||||
7, // Clip/MagSize
|
||||
22, // Damage Per Bullet
|
||||
1, // Penetration Multiplier
|
||||
3000, // Bullet Range
|
||||
0.7, // Range Modifier
|
||||
TYPE_AUTO,
|
||||
0.15, // Attack-Delay
|
||||
3.0, // Reload-Delay
|
||||
iAmmo_BUCKSHOT, // Caliber Pointer
|
||||
iClip_XM1014 // Clip Pointer
|
||||
};
|
|
@ -0,0 +1,126 @@
|
|||
/*
|
||||
OpenCS Project
|
||||
Copyright (C) 2015 Marco "eukara" Hladik
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
void Temp_Nothing( void ) { }
|
||||
|
||||
weaponfunc_t wpnFuncTable[ CS_WEAPON_COUNT ] = {
|
||||
{ Temp_Nothing, Temp_Nothing, Temp_Nothing, Temp_Nothing },
|
||||
{ Temp_Nothing, Temp_Nothing, Temp_Nothing, Temp_Nothing },
|
||||
{ WeaponUSP45_Draw, WeaponUSP45_PrimaryFire, WeaponUSP45_Secondary, WeaponUSP45_Reload },
|
||||
{ WeaponGLOCK18_Draw, WeaponGLOCK18_PrimaryFire, WeaponGLOCK18_Secondary, WeaponGLOCK18_Reload },
|
||||
{ WeaponUSP45_Draw, WeaponUSP45_PrimaryFire, Temp_Nothing, WeaponUSP45_Reload },
|
||||
{ WeaponUSP45_Draw, WeaponUSP45_PrimaryFire, Temp_Nothing, WeaponUSP45_Reload },
|
||||
{ WeaponUSP45_Draw, WeaponUSP45_PrimaryFire, Temp_Nothing, WeaponUSP45_Reload },
|
||||
{ WeaponUSP45_Draw, WeaponUSP45_PrimaryFire, Temp_Nothing, WeaponUSP45_Reload },
|
||||
{ WeaponUSP45_Draw, WeaponUSP45_PrimaryFire, Temp_Nothing, WeaponUSP45_Reload },
|
||||
{ WeaponUSP45_Draw, WeaponUSP45_PrimaryFire, Temp_Nothing, WeaponUSP45_Reload },
|
||||
{ WeaponUSP45_Draw, WeaponUSP45_PrimaryFire, Temp_Nothing, WeaponUSP45_Reload },
|
||||
{ WeaponUSP45_Draw, WeaponUSP45_PrimaryFire, Temp_Nothing, WeaponUSP45_Reload },
|
||||
{ WeaponUSP45_Draw, WeaponUSP45_PrimaryFire, Temp_Nothing, WeaponUSP45_Reload },
|
||||
{ WeaponUSP45_Draw, WeaponUSP45_PrimaryFire, Temp_Nothing, WeaponUSP45_Reload },
|
||||
{ WeaponUSP45_Draw, WeaponUSP45_PrimaryFire, Temp_Nothing, WeaponUSP45_Reload },
|
||||
{ WeaponAK47_Draw, WeaponAK47_PrimaryFire, Temp_Nothing, WeaponAK47_Reload },
|
||||
{ WeaponUSP45_Draw, WeaponUSP45_PrimaryFire, Temp_Nothing, WeaponUSP45_Reload },
|
||||
{ WeaponUSP45_Draw, WeaponUSP45_PrimaryFire, Temp_Nothing, WeaponUSP45_Reload },
|
||||
{ WeaponUSP45_Draw, WeaponUSP45_PrimaryFire, Temp_Nothing, WeaponUSP45_Reload },
|
||||
{ WeaponUSP45_Draw, WeaponUSP45_PrimaryFire, Temp_Nothing, WeaponUSP45_Reload },
|
||||
{ WeaponUSP45_Draw, WeaponUSP45_PrimaryFire, Temp_Nothing, WeaponUSP45_Reload },
|
||||
{ WeaponUSP45_Draw, WeaponUSP45_PrimaryFire, Temp_Nothing, WeaponUSP45_Reload },
|
||||
{ WeaponUSP45_Draw, WeaponUSP45_PrimaryFire, Temp_Nothing, WeaponUSP45_Reload },
|
||||
{ WeaponUSP45_Draw, WeaponUSP45_PrimaryFire, Temp_Nothing, WeaponUSP45_Reload }
|
||||
};
|
||||
|
||||
void Weapon_Draw( float fWeapon ) {
|
||||
wpnFuncTable[ fWeapon ].vDraw();
|
||||
}
|
||||
|
||||
void Weapon_PrimaryAttack( float fWeapon ) {
|
||||
#ifdef QWSSQC
|
||||
if ( self.fAttackFinished > time ) {
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
wpnFuncTable[ fWeapon ].vPrimary();
|
||||
}
|
||||
|
||||
void Weapon_SecondaryAttack( float fWeapon ) {
|
||||
#ifdef QWSSQC
|
||||
if ( self.fAttackFinished > time ) {
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
wpnFuncTable[ fWeapon ].vSecondary();
|
||||
}
|
||||
|
||||
void Weapon_Reload( float fWeapon ) {
|
||||
#ifdef QWSSQC
|
||||
if ( self.fAttackFinished > time ) {
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
wpnFuncTable[ fWeapon ].vReload();
|
||||
}
|
||||
|
||||
#ifdef QWSSQC
|
||||
|
||||
void Weapon_UpdateCurrents( void ) {
|
||||
self.iCurrentClip = self.(wptTable[ self.weapon ].iClipfld);
|
||||
self.iCurrentCaliber = self.(wptTable[ self.weapon ].iCaliberfld);
|
||||
}
|
||||
|
||||
// We get a weapon for the first time essentially
|
||||
void Weapon_AddItem( float fWeapon ) {
|
||||
|
||||
// Add the gun to the appropriate slot
|
||||
if( wptTable[ fWeapon ].iSlot == SLOT_MELEE ) {
|
||||
self.iSlotMelee = fWeapon;
|
||||
} else if ( wptTable[ fWeapon ].iSlot == SLOT_SECONDARY ) {
|
||||
self.iSlotSecondary = fWeapon;
|
||||
} else if( wptTable[ fWeapon ].iSlot == SLOT_PRIMARY ) {
|
||||
self.iSlotPrimary = fWeapon;
|
||||
} else if ( wptTable[ fWeapon ].iSlot == SLOT_GRENADE ) {
|
||||
self.iSlotGrenade = fWeapon;
|
||||
}
|
||||
|
||||
// Switch to it
|
||||
self.weapon = fWeapon;
|
||||
|
||||
// Make sure we've got at least one full clip
|
||||
self.(wptTable[ self.weapon ].iClipfld) = wptTable[ fWeapon ].iClipSize;
|
||||
|
||||
Weapon_UpdateCurrents();
|
||||
|
||||
Weapon_Draw( fWeapon );
|
||||
}
|
||||
|
||||
void Weapon_GiveAmmo( float fWeapon, float fAmount ) {
|
||||
self.(wptTable[ self.weapon ].iCaliberfld ) += fAmount;
|
||||
Weapon_UpdateCurrents();
|
||||
}
|
||||
|
||||
void CSEv_GamePlayerBuy_f( float fWeapon ) {
|
||||
Weapon_AddItem( fWeapon );
|
||||
self.fMoney -= wptTable[ fWeapon ].iPrice;
|
||||
}
|
||||
|
||||
#endif
|
|
@ -0,0 +1,133 @@
|
|||
Args: fteqcc
|
||||
FTEQCC: Nov 11 2016
|
||||
Source file: progs.src
|
||||
|
||||
************ ERROR ************
|
||||
Couldn't open file progs.src
|
||||
Error in cmdline on line 0
|
||||
Args: fteqcc
|
||||
FTEQCC: Nov 11 2016
|
||||
Source file: progs.src
|
||||
|
||||
************ ERROR ************
|
||||
Couldn't open file progs.src
|
||||
Error in cmdline on line 0
|
||||
Args: fteqcc
|
||||
FTEQCC: Nov 11 2016
|
||||
Source file: progs.src
|
||||
|
||||
************ ERROR ************
|
||||
Couldn't open file progs.src
|
||||
Error in cmdline on line 0
|
||||
Args: fteqcc
|
||||
FTEQCC: Nov 11 2016
|
||||
Source file: progs.src
|
||||
|
||||
************ ERROR ************
|
||||
Couldn't open file progs.src
|
||||
Error in cmdline on line 0
|
||||
Args: fteqcc
|
||||
FTEQCC: Nov 11 2016
|
||||
Source file: progs.src
|
||||
|
||||
************ ERROR ************
|
||||
Couldn't open file progs.src
|
||||
Error in cmdline on line 0
|
||||
Args: fteqcc
|
||||
FTEQCC: Nov 11 2016
|
||||
Source file: progs.src
|
||||
|
||||
************ ERROR ************
|
||||
Couldn't open file progs.src
|
||||
Error in cmdline on line 0
|
||||
Args: fteqcc
|
||||
FTEQCC: Nov 11 2016
|
||||
Source file: progs.src
|
||||
|
||||
************ ERROR ************
|
||||
Couldn't open file progs.src
|
||||
Error in cmdline on line 0
|
||||
Args: fteqcc
|
||||
FTEQCC: Nov 11 2016
|
||||
Source file: progs.src
|
||||
|
||||
************ ERROR ************
|
||||
Couldn't open file progs.src
|
||||
Error in cmdline on line 0
|
||||
Args: fteqcc
|
||||
FTEQCC: Nov 11 2016
|
||||
Source file: progs.src
|
||||
|
||||
************ ERROR ************
|
||||
Couldn't open file progs.src
|
||||
Error in cmdline on line 0
|
||||
Args: fteqcc
|
||||
FTEQCC: Nov 11 2016
|
||||
Source file: progs.src
|
||||
|
||||
************ ERROR ************
|
||||
Couldn't open file progs.src
|
||||
Error in cmdline on line 0
|
||||
Args: fteqcc
|
||||
FTEQCC: Nov 11 2016
|
||||
Source file: progs.src
|
||||
|
||||
************ ERROR ************
|
||||
Couldn't open file progs.src
|
||||
Error in cmdline on line 0
|
||||
Args: fteqcc
|
||||
FTEQCC: Nov 11 2016
|
||||
Source file: progs.src
|
||||
|
||||
************ ERROR ************
|
||||
Couldn't open file progs.src
|
||||
Error in cmdline on line 0
|
||||
Args: fteqcc
|
||||
FTEQCC: Nov 11 2016
|
||||
Source file: progs.src
|
||||
|
||||
************ ERROR ************
|
||||
Couldn't open file progs.src
|
||||
Error in cmdline on line 0
|
||||
Args: fteqcc
|
||||
FTEQCC: Nov 11 2016
|
||||
Source file: progs.src
|
||||
|
||||
************ ERROR ************
|
||||
Couldn't open file progs.src
|
||||
Error in cmdline on line 0
|
||||
Args: fteqcc
|
||||
FTEQCC: Nov 11 2016
|
||||
Source file: progs.src
|
||||
|
||||
************ ERROR ************
|
||||
Couldn't open file progs.src
|
||||
Error in cmdline on line 0
|
||||
Args: fteqcc
|
||||
FTEQCC: Nov 11 2016
|
||||
Source file: progs.src
|
||||
|
||||
************ ERROR ************
|
||||
Couldn't open file progs.src
|
||||
Error in cmdline on line 0
|
||||
Args: fteqcc
|
||||
FTEQCC: Nov 11 2016
|
||||
Source file: progs.src
|
||||
|
||||
************ ERROR ************
|
||||
Couldn't open file progs.src
|
||||
Error in cmdline on line 0
|
||||
Args: fteqcc
|
||||
FTEQCC: Nov 11 2016
|
||||
Source file: progs.src
|
||||
|
||||
************ ERROR ************
|
||||
Couldn't open file progs.src
|
||||
Error in cmdline on line 0
|
||||
Args: fteqcc
|
||||
FTEQCC: Nov 11 2016
|
||||
Source file: progs.src
|
||||
|
||||
************ ERROR ************
|
||||
Couldn't open file progs.src
|
||||
Error in cmdline on line 0
|
|
@ -0,0 +1,21 @@
|
|||
Args: fteqcc
|
||||
FTEQCC: Nov 11 2016
|
||||
Source file: progs.src
|
||||
|
||||
************ ERROR ************
|
||||
Couldn't open file progs.src
|
||||
Error in cmdline on line 0
|
||||
Args: fteqcc
|
||||
FTEQCC: Nov 11 2016
|
||||
Source file: progs.src
|
||||
|
||||
************ ERROR ************
|
||||
Couldn't open file progs.src
|
||||
Error in cmdline on line 0
|
||||
Args: fteqcc
|
||||
FTEQCC: Nov 11 2016
|
||||
Source file: progs.src
|
||||
|
||||
************ ERROR ************
|
||||
Couldn't open file progs.src
|
||||
Error in cmdline on line 0
|
Loading…
Reference in New Issue