Player drops primary weapon/bomb now upon death

Few fixes here and there I guess
This commit is contained in:
Marco Cawthorne 2017-06-27 02:04:25 +02:00
parent f19f73ffc8
commit 072820002c
11 changed files with 63 additions and 36 deletions

View File

@ -1,26 +1,27 @@
# FreeCS
Free-software implementation of Counter-Strike running on the FTE QuakeWorld engine.
You still have to provide the assets yourself, but hey - CS 1.5 is a free download.
<img src="https://icculus.org/~marco/opencs/screenshots/fte-20170113225215-0.png" alt="Screen 1" width="256" height="192"> <img src="https://icculus.org/~marco/opencs/screenshots/fte-20170113225158-0.png" alt="Screen 2" width="256" height="192">
<img src="https://icculus.org/~marco/freecs/screens/screen1.png" alt="Screen 1" width="256" height="192"> <img src="https://icculus.org/~marco/freecs/screens/screen2.png" alt="Screen 2" width="256" height="192">
<img src="https://icculus.org/~marco/opencs/screenshots/fte-20170113225827-0.png" alt="Screen 3" width="256" height="192"> <img src="https://icculus.org/~marco/opencs/screenshots/fte-20170113225528-0.png" alt="Screen 4" width="256" height="192">
<img src="https://icculus.org/~marco/freecs/screens/screen3.png" alt="Screen 3" width="256" height="192"> <img src="https://icculus.org/~marco/freecs/screens/screen4.png" alt="Screen 4" width="256" height="192">
<img src="https://pbs.twimg.com/media/C-lqLjuXsAAeF1Z.jpg" alt="Android Port" width="340" height="192">
<img src="https://icculus.org/~marco/freecs/screens/portable.jpg" alt="Android Port" width="340" height="192">
# Goals
The goal of this project is to provide an open-source version of Counter-Strike 1.5.
Counter-Strike, being one of the most popular multiplayer games to exist, surprisingly hasn't had
a free-software implementation done until now.
Counter-Strike, being one of the most popular multiplayer games to exist, hasn't had
a free-software implementation done until now.
** This project distributes no assets from either Half-Life or Counter-Strike. You have to provide them yourself. **
** This project shares no code with the Half-Life SDK. The entities are re-creations based on descriptions on TWHL.info. **
** Read the HL SDK EULA to find out [why.](http://twhl.info/articulator.php?art=1) **
Six cool random things you can do with this:
Five cool random things you can do with this:
1. Play/Host CS on virtually every platform.
2. Customize the game to whatever extent you like.
3. Create entirely new weapons!
4. Create completely new and refreshing gamemodes!
5. Have a guarantee to be able to play it 20 years into the future!
6. Use it as a base for your own games/mods!
# Status
All the weapons are implemented, so are the gamemodes:

View File

@ -69,7 +69,7 @@ void VGUI_Radio_Draw( void ) {
vector vSize, vPos;
if ( fVGUI_Display == VGUI_RADIO1 ) {
vSize_x = ( 33 * 8 ) + 16;
vSize_x = 312;
vSize_y = ( 10 * VGUIRADIO_COMMANDS ) + 64;
vPos = [ 16, vVideoResolution_y - 148 - vSize_y ];
@ -82,7 +82,7 @@ void VGUI_Radio_Draw( void ) {
VGUI_Radio_DrawCommand( i, fRadioCommands[ i ], vPos );
}
} else if ( fVGUI_Display == VGUI_RADIO2 ) {
vSize_x = ( 24 * 8 ) + 16;
vSize_x = 312;
vSize_y = ( 10 * VGUIRADIO_GROUPCOMMANDS ) + 64;
vPos = [ 16, vVideoResolution_y - 148 - vSize_y ];
@ -95,7 +95,7 @@ void VGUI_Radio_Draw( void ) {
VGUI_Radio_DrawCommand( i, fRadioGroupCommands[ i ], vPos );
}
} else {
vSize_x = ( 37 * 8 ) + 16;
vSize_x = 312;
vSize_y = ( 10 * VGUIRADIO_RESPONSES ) + 64;
vPos = [ 16, vVideoResolution_y - 148 - vSize_y ];

View File

@ -52,11 +52,11 @@ vector VGUI_Scores_DrawTeam( vector vPos, float fTeam ) {
}
if ( getplayerkeyvalue( i, "*dead" ) == "1" ) {
CSQC_DrawText( vNewPos + '38 0', sprintf( _("SCORE_DEAD"), getplayerkeyvalue( i, "name" ) ), '8 8', vColor, 1, 0, FONT_DEFAULT );
CSQC_DrawText( vNewPos + '38 0', sprintf( _("SCORE_DEAD"), getplayerkeyvalue( i, "name" ) ), '8 8', vColor, 1.0f, 0, FONT_DEFAULT );
} else if ( getplayerkeyvalue( i, "*dead" ) == "2" ) {
CSQC_DrawText( vNewPos + '38 0', sprintf( _("SCORE_VIP"), getplayerkeyvalue( i, "name" ) ), '8 8', vColor, 1, 0, FONT_DEFAULT );
CSQC_DrawText( vNewPos + '38 0', sprintf( _("SCORE_VIP"), getplayerkeyvalue( i, "name" ) ), '8 8', vColor, 1.0f, 0, FONT_DEFAULT );
} else {
CSQC_DrawText( vNewPos + '38 0', getplayerkeyvalue( i, "name" ), '8 8', vColor, 1, 0, FONT_DEFAULT );
CSQC_DrawText( vNewPos + '38 0', getplayerkeyvalue( i, "name" ), '8 8', vColor, 1.0f, 0, FONT_DEFAULT );
}
@ -85,8 +85,8 @@ vector VGUI_Scores_DrawTeam( vector vPos, float fTeam ) {
// If we've got no spectators, don't draw them.
if ( ( fTeam != TEAM_SPECTATOR ) || ( fTeam == TEAM_SPECTATOR && iPlayerCount > 0 ) ) {
// The name/title of the team
CSQC_DrawText( vPos + '24 0', sScoreTeams[ fTeam ], '16 16', vColor, 1, 0, FONT_16 );
drawline( 1.0, vPos + '19 24', vPos + '512 24 0', vColor, 1, 0 );
CSQC_DrawText( vPos + '24 0', sScoreTeams[ fTeam ], '16 16', vColor, 1.0f, 0, FONT_16 );
drawfill( vPos + '19 24', '493 1', vColor, 1.0f );
// Draw the amount of rounds we've von
if ( fTeam == TEAM_CT ) {
@ -98,7 +98,7 @@ vector VGUI_Scores_DrawTeam( vector vPos, float fTeam ) {
// Now we know the playercount, so let's calculate the position next to the Teamname String and print it
vector vCountPos = vPos + '24 6';
vCountPos_x += stringwidth( sScoreTeams[ fTeam ], FALSE, '16 16' ) + 8;
CSQC_DrawText( vCountPos, sprintf( _("SCORE_PLAYERS"), iPlayerCount ), '8 8', vColor, 1, 0, FONT_DEFAULT );
CSQC_DrawText( vCountPos, sprintf( _("SCORE_PLAYERS"), iPlayerCount ), '8 8', vColor, 1.0f, 0, FONT_DEFAULT );
}
return vNewPos + '0 24';
}
@ -123,13 +123,13 @@ void VGUI_Scores_Show( void ) {
drawfill( [vMainPos_x + vSize_x - 1, vMainPos_y], [1, vSize_y], '0.35 0.35 0.35', 1.0f );
// Server title
CSQC_DrawText( vMainPos + '24 13', serverkey( "hostname" ), '16 16', VGUI_WINDOW_FGCOLOR, 1, 0, FONT_16 );
CSQC_DrawText( vMainPos + '24 13', serverkey( "hostname" ), '16 16', VGUI_WINDOW_FGCOLOR, 1.0f, 0, FONT_16 );
// Tabs like Score, Ping etc.
CSQC_DrawText( vMainPos + '280 32', _("SCORE_SCORE"), '8 8', VGUI_WINDOW_FGCOLOR, 1, 0, FONT_DEFAULT );
CSQC_DrawText( vMainPos + '336 32', _("SCORE_DEATHS"), '8 8', VGUI_WINDOW_FGCOLOR, 1, 0, FONT_DEFAULT );
CSQC_DrawText( vMainPos + '400 32', _("SCORE_LATENCY"), '8 8', VGUI_WINDOW_FGCOLOR, 1, 0, FONT_DEFAULT );
CSQC_DrawText( vMainPos + '472 32', _("SCORE_VOICE"), '8 8', VGUI_WINDOW_FGCOLOR, 1, 0, FONT_DEFAULT );
CSQC_DrawText( vMainPos + '280 32', _("SCORE_SCORE"), '8 8', VGUI_WINDOW_FGCOLOR, 1.0f, 0, FONT_DEFAULT );
CSQC_DrawText( vMainPos + '336 32', _("SCORE_DEATHS"), '8 8', VGUI_WINDOW_FGCOLOR, 1.0f, 0, FONT_DEFAULT );
CSQC_DrawText( vMainPos + '400 32', _("SCORE_LATENCY"), '8 8', VGUI_WINDOW_FGCOLOR, 1.0f, 0, FONT_DEFAULT );
CSQC_DrawText( vMainPos + '472 32', _("SCORE_VOICE"), '8 8', VGUI_WINDOW_FGCOLOR, 1.0f, 0, FONT_DEFAULT );
vector vOffset = VGUI_Scores_DrawTeam( vMainPos + '0 50', TEAM_CT );
vOffset = VGUI_Scores_DrawTeam( vOffset, TEAM_T );

View File

@ -112,7 +112,12 @@
</project>
<workspace version="Crimson Editor 3.60">
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Shared\Animations.c" linenum="10" placement="0:1:-1:-1:-4:-23:22:22:958:326" />
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Shared\WeaponElites.c" linenum="10" placement="2:3:-1:-1:-4:-23:44:44:984:352" />
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Shared\Animations.c" linenum="267" placement="0:1:-1:-1:-4:-23:22:22:958:326" />
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Shared\WeaponElites.c" linenum="32" placement="0:1:-1:-1:-4:-23:44:44:984:352" />
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Client\VGUIRadio.c" linenum="25" placement="0:1:-1:-1:-4:-23:44:44:896:513" />
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Client\VGUIObjects.c" linenum="72" placement="0:1:-1:-1:-4:-23:66:66:918:535" />
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Menu\Objects.c" linenum="150" placement="0:1:-1:-1:-4:-23:88:88:940:557" />
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Client\VGUIMOTD.c" linenum="1" placement="0:1:-1:-1:-4:-23:110:110:962:579" />
<localfile path="C:\Cygwin\home\eukara\Projects\FreeCS\Source\Client\VGUIScoreboard.c" linenum="97" placement="2:3:-1:-1:-4:-23:132:132:984:601" />
</workspace>

View File

@ -84,6 +84,18 @@ void Player_Death( int iHitBody ) {
eCorpse.angles = [ 0, self.angles_y, 0 ];
eCorpse.movetype = MOVETYPE_BOUNCE;
// Drop primary weapon as well as the bomb if present
if ( self.fSlotPrimary ) {
Weapon_DropWeapon( SLOT_PRIMARY );
} else {
if ( self.fSlotSecondary ) {
Weapon_DropWeapon( SLOT_PRIMARY );
}
}
if ( self.fSlotGrenade ) {
Weapon_DropWeapon( SLOT_GRENADE );
}
// Make ourselves disappear
self.modelindex = 0;

View File

@ -30,8 +30,8 @@
<hr style="width: 100%; height: 2px;"><span style="font-weight: bold; text-decoration: underline;">About FreeCS</span><br><p>The goal of this project is to provide a documented, open-source version of Counter-Strike 1.5.&nbsp;</p><p>Counter-Strike, being one of the most popular multiplayer games to exist, surprisingly hasn't had
a free-software implementation done until now.</p>
<p>Six cool random things you can do with this:</p>
<ol><li>Play/Host CS on virtually every platform.</li><li>Customize the game to whatever extent you like.</li><li>Create entirely new weapons!</li><li>Create completely new and refreshing gamemodes!</li><li>Have a guarantee to be able to play it 20 years into the future!</li><li>Use it as a base for your own games/mods!</li></ol>
<p>Five cool random things you can do with this:</p>
<ol><li>Play/Host CS on virtually every platform.</li><li>Customize the game to whatever extent you like.</li><li>Create entirely new weapons!</li><li>Create completely new and refreshing gamemodes!</li><li>Have a guarantee to be able to play it 20 years into the future!</li></ol>
</td>

View File

@ -31,22 +31,29 @@
<hr style="width: 100%; height: 2px;"><span style="font-weight: bold; text-decoration: underline;">The Frequently Asked Questions</span><br><br>Please refer to this FAQ before sending any mails or C&amp;D letters to my door.<br><br>Q: Is this the full version of Counter-Strike?<br>A:
These are only binaries for a rewritten, specific version of
Counter-Strike, the mod. It has nothing to do with the CS games of the
past 15 years.<br><br>Q: Do I have to own Half-Life to play this?<br>A:
It will run without. Hell, it can even "run" without the CS content.
past 15 years.<br><br>Q: Why emulate Counter-Strike 1.5?<br>A:
It was the last release handled by the original CS team. It's the
version me and my friends preferred playing (we did not care about the
new weapons and that shield they added...) and it's free for Half-Life
owners.<br><br>Q: Should I have to own Half-Life to play this?<br>A:
In short: Yes. It will run without. Hell, it can even "run" without the CS content.
But you certainly will have difficulties connecting to FreeCS servers.<br><br>Q: Why do I have to download CS 1.5 manually?<br>A: Legal reasons, cannot re-distribute them without potentially causing some trouble.<br><br>Q: Why is this not using the Half-Life engine?<br>A:
The SDK for that engine has one of the least open-source friendly
licenses ever written. Open-sourcing a Half-Life mod is actually
Many reasons. The SDK for that engine does not encourage free and
open-source software. Open-sourcing a Half-Life mod is actually
against the EULA of that SDK. Making it a QuakeWorld mod means I own
all the rights to it.<br><br>Q: What does FreeCS mean?<br>A: Primarily
all the rights to it, too. Secondly, CS 1.5 does not run on Steam
Half-Life. Even if it did, it would only run on Windows.<br><br>Q: What does FreeCS mean?<br>A: Primarily
it stands for Free Counter-Strike, as in Free-Software... it can also
mean "free" as in free beer because you don't have to pay anything to
download FreeCS itself. Some people have also speculated that it's a
political message... gotta love synonyms!<br><br>Q: Can I connect to Counter-Strike 1.5 servers with this?<br>A: No.<br><br>Q: Can I connect to (anything other than FreeCS) with this?<br>A: No.<br><br>Q: Hey, can I take redistribute this on the PlayStore and make money off of this?<br>A:
You'd be a scumbag if you did and possibly force me to adjust my
license. If you want to contribute towards a proper Android version,
contact me.<br><br>Q: What motivated you to do all this?<br>A: Good
You'd be a scumbag if you did. If you want to contribute towards a proper Android version, please do.<br><br>Q: What motivated you to do all this?<br>A:
Good
memories, love, passion for Counter-Strike. Also as a middle finger to
anyone who told me to "do it better" when criticising the new CS game.<br><br>Q: How can I contact you for further questions?<br>A: E-Mail! Please send it to: marco at icculus dot org<br>
anyone who told me to "do it better" when criticising a new CS game.
Besides, x86 will go away eventually. Making CS run on an engine that
has already been ported to multiple platforms ensures that we won't
have to emulate WON Half-Life to play anymore!<br><br>Q: How can I contact you for further questions?<br>A: E-Mail! Please send it to: marco at icculus dot org<br>
</td>
</tr>

Binary file not shown.

View File

@ -70,4 +70,6 @@ seta com_nogamedirnativecode "0"
seta cl_cursor_scale "1"
seta r_shadow_realtime_world_shadows "0"
seta r_shadow_realtime_dlight_shadows "0"
seta r_imageexensions "tga bmp pcx"
seta r_imageexensions "tga bmp pcx"
seta vid_conautoscale "1"
seta scr_conalpha "1"

Binary file not shown.

Binary file not shown.