Renamed project, fixed potential money bugs revised input....

This commit is contained in:
Marco Cawthorne 2017-01-15 20:56:58 +01:00
parent bf1adc491a
commit 4a14bb6fab
20 changed files with 115 additions and 166 deletions

View file

@ -46,6 +46,7 @@ var float PARTICLE_SMOKE_GREY;
var float PARTICLE_SMOKE_BROWN;
var float PARTICLE_BLOOD;
var float DECAL_SHOT;
var float DECAL_GLASS;
vector vHUDColor; // Defined in HUD_Draw (HUD.c)
vector vVGUIColor; // Defined in HUD_Draw (VGUI.c)
@ -61,6 +62,11 @@ float fInputKeyCode;
float fInputKeyASCII;
float fInputKeyDown;
var int iInputAttack2;
var int iInputReload;
var int iInputUse;
var int iInputDuck;
// Input globals for the mouse
float fMouseClick;
vector vMousePos;

View file

@ -26,6 +26,16 @@ Init all the cmds in one place
=================
*/
void CSQC_ConsoleCommand_Init( void ) {
registercommand( "+attack2" );
registercommand( "-attack2" );
registercommand( "+reload" );
registercommand( "-reload" );
registercommand( "+use" );
registercommand( "-use" );
registercommand( "+duck" );
registercommand( "-duck" );
registercommand( "buy" );
registercommand( "chooseteam" );
registercommand( "invnext" );
@ -106,6 +116,38 @@ Can interject cmds and create new ones
float CSQC_ConsoleCommand( string sCMD ) {
tokenize( sCMD );
switch ( argv(0) ) {
case "+attack2":
iInputAttack2 = TRUE;
return TRUE;
break;
case "-attack2":
iInputAttack2 = FALSE;
return TRUE;
break;
case "+reload":
iInputReload = TRUE;
return TRUE;
break;
case "-reload":
iInputReload = FALSE;
return TRUE;
break;
case "+use":
iInputUse = TRUE;
return TRUE;
break;
case "-use":
iInputUse = FALSE;
return TRUE;
break;
case "+duck":
iInputDuck = TRUE;
return TRUE;
break;
case "-duck":
iInputDuck = FALSE;
return TRUE;
break;
case "buy":
if( getstatf( STAT_BUYZONE ) == TRUE ) {
fVGUI_Display = VGUI_BM_MAIN;
@ -483,4 +525,20 @@ void CSQC_Input_Frame( void ) {
input_buttons = 0;
return;
}
if ( iInputAttack2 == TRUE ) {
input_buttons |= INPUT_BUTTON5;
}
if ( iInputReload == TRUE ) {
input_buttons |= INPUT_BUTTON4;
}
if ( iInputUse == TRUE ) {
input_buttons |= INPUT_BUTTON3;
}
if ( iInputDuck == TRUE ) {
input_buttons |= INPUT_BUTTON6;
}
}

View file

@ -76,7 +76,8 @@ void CSQC_Init(float apilevel, string enginename, float engineversion) {
PARTICLE_SMOKE_GREY = particleeffectnum( "part_smoke_grey" );
PARTICLE_SMOKE_BROWN = particleeffectnum( "part_smoke_brown" );
PARTICLE_BLOOD = particleeffectnum( "part_blood" );
DECAL_SHOT = particleeffectnum( "decal_shot1" );
DECAL_SHOT = particleeffectnum( "decal_shot" );
DECAL_SHOT = particleeffectnum( "decal_glass" );
Radio_InitSounds();

View file

@ -1,66 +0,0 @@
[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=10
FILE_NAME_0=0;C;0;EUTF-8;1;1;0;%2Fhome%2Feukara%2FProjects%2FOpenCS%2FSource%2FClient%2FInit.c;0;4
FILE_NAME_1=0;C;0;EUTF-8;1;1;0;%2Fhome%2Feukara%2FProjects%2FOpenCS%2FSource%2FServer%2FEntHostage.c;0;4
FILE_NAME_2=1141;C;0;EUTF-8;1;1;0;%2Fhome%2Feukara%2FProjects%2FOpenCS%2FSource%2FShared%2FWeaponMP5.c;0;4
FILE_NAME_3=1142;C;0;EUTF-8;1;1;0;%2Fhome%2Feukara%2FProjects%2FOpenCS%2FSource%2FShared%2FWeaponP90.c;0;4
FILE_NAME_4=1149;C;0;EUTF-8;1;1;0;%2Fhome%2Feukara%2FProjects%2FOpenCS%2FSource%2FShared%2FWeaponSG550.c;0;4
FILE_NAME_5=1150;C;0;EUTF-8;1;1;0;%2Fhome%2Feukara%2FProjects%2FOpenCS%2FSource%2FShared%2FWeaponSG552.c;0;4
FILE_NAME_6=0;C;0;EUTF-8;1;1;0;%2Fhome%2Feukara%2FProjects%2FOpenCS%2FSource%2FShared%2FWeaponM3.c;0;4
FILE_NAME_7=369;C;0;EUTF-8;1;1;0;%2Fhome%2Feukara%2FProjects%2FOpenCS%2FSource%2FShared%2FWeaponM4A1.c;0;4
FILE_NAME_8=0;C;0;EUTF-8;1;1;0;%2Fhome%2Feukara%2FProjects%2FOpenCS%2FSource%2FShared%2FWeaponUSP45.c;0;4
FILE_NAME_9=1222;C;0;EUTF-8;1;1;0;%2Fhome%2Feukara%2FProjects%2FOpenCS%2FSource%2FShared%2FWeaponElites.c;0;4
FILE_NAME_10=1162;C;0;EUTF-8;1;1;0;%2Fhome%2Feukara%2FProjects%2FOpenCS%2FSource%2FShared%2FWeaponFiveSeven.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;

View file

@ -38,9 +38,15 @@ void Input_Handle( void ) {
}
if ( self.button3 ) {
Player_CrouchDown();
Player_UseDown();
} else {
Player_UseUp();
}
if ( self.button6 ) {
Player_CrouchDown();
} else if ( self.flags & FL_CROUCHING ) {
Player_CrouchUp();
Player_CrouchUp();
}
if ( self.button0 ) {
@ -53,11 +59,5 @@ void Input_Handle( void ) {
Weapon_Release();
}
if ( self.button6 ) {
Player_UseDown();
} else {
Player_UseUp();
}
self.impulse = 0;
}

View file

@ -1,62 +0,0 @@
[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=

View file

@ -68,6 +68,7 @@ void Effect_Impact( int iType, vector vPos, vector vNormal ) {
case IMPACT_EXPLOSION:
break;
case IMPACT_GLASS:
pointparticles( DECAL_GLASS, vPos, vNormal, 1 );
pointparticles( PARTICLE_PIECES_BLACK, vPos, vNormal, 1 );
break;
case IMPACT_WOOD:

View file

@ -1,8 +1,8 @@
FTEMANIFEST 1
game cstrike
name "OpenCS"
protocolname "OPENCS"
name "FreeCS"
protocolname "FREECS"
basegame valve
basegame cstrike
basegame *opencs
basegame *freecs
disablehomedir 1

BIN
freecs/csprogs.dat Normal file

Binary file not shown.

View file

@ -7,11 +7,11 @@ bind "DOWNARROW" "+back"
bind "LEFTARROW" "+left"
bind "RIGHTARROW" "+right"
bind MOUSE1 +attack
bind MOUSE2 +button5
bind MOUSE2 +attack2
bind "MWHEELDOWN" "invnext"
bind "MWHEELUP" "invprev"
bind r +button4
bind e +button6
bind r +reload
bind e +use
bind n nightvision
bind g drop
bind TAB +showscores
@ -26,7 +26,7 @@ bind 3 "impulse 3"
bind 4 "impulse 4"
bind SPACE +jump
bind CTRL +button3
bind CTRL +duck
bind SHIFT +speed
bind b buy
@ -60,13 +60,6 @@ hostname "OpenCS Server"
seta vid_conautoscale "1"
seta snd_device "sdl"
alias +attack2 +button5
alias -attack2 -button5
alias +reload +button4
alias -reload -button4
alias +use +button6
alias -use -button6
seta r_polygonoffset_submodel_offset 0
seta r_polygonoffset_submodel_factor 0
seta r_fullbrightSkins 0

Binary file not shown.

Binary file not shown.

View file

@ -90,20 +90,38 @@ r_part part_blood
gravity 800
}
r_part decal_shot1
r_part decal_shot
{
type decal
blend premul_subtract
texture "particles/decal_shot"
tcoords 0 0 0.125 1 1 8 0.125
rgbf 1 1 1
alpha 1
alphadelta -0.05
scale 8 8
scalefactor 1
stretchfactor 1
die 20 20
orgwrand 6 6 6
randomvel 0 0 0
rotationstart -180 180
type decal
blend premul_subtract
texture "particles/decal_shot"
tcoords 0 0 0.125 1 1 8 0.125
rgbf 1 1 1
alpha 1
alphadelta -0.05
scale 8 8
scalefactor 1
stretchfactor 1
die 20 20
orgwrand 6 6 6
randomvel 0 0 0
rotationstart -180 180
}
r_part decal_glass
{
type decal
blend add
texture "particles/decal_glass"
tcoords 0 0 0.125 1 1 8 0.125
rgbf 1 1 1
alpha 1
alphadelta -0.05
scale 24 24
scalefactor 1
stretchfactor 1
die 20 20
orgwrand 6 6 6
randomvel 0 0 0
rotationstart -180 180
}

Binary file not shown.

Binary file not shown.