Skip to content

Commit

Permalink
Merge pull request #6 from lvonasek/feature_multiprey
Browse files Browse the repository at this point in the history
Multiprey support
  • Loading branch information
lvonasek committed Oct 2, 2023
2 parents 43221e7 + ca8afcd commit f098b5a
Show file tree
Hide file tree
Showing 6 changed files with 105 additions and 497 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,5 @@ Special thanks to all early versions testers on **Team Beef** discord server!
* Controling ingame UI using fingers
* Glitch effect (unsupported by the renderer)
* Glow effect (unsupported by the renderer)
* Multiprey (will eventually be added later)
* Network communication (missing source code)
* Shadows (cause performance issues)
Original file line number Diff line number Diff line change
Expand Up @@ -807,6 +807,13 @@ void idSessionLocal::HandleMainMenuCommands(const char *menuCommand)
if (dict && dict->GetBool(gametype)) {
const char *mapName = dict->GetString("name");

//Lubos BEGIN
const char *path = dict->GetString("path");
if (idStr(path).CmpPrefix("game/dm") != 0) {
continue;
}
//Lubos END

if (mapName[ 0 ] == '\0') {
mapName = dict->GetString("path");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1765,10 +1765,12 @@ void idMultiplayerGame::Run() {
break;
}
case WARMUP: {
if ( AllPlayersReady() ) {
//Lubos:if ( AllPlayersReady() )
{
NewState( COUNTDOWN );
nextState = GAMEON;
nextStateSwitch = gameLocal.time + 1000 * cvarSystem->GetCVarInteger( "g_countDown" );
nextStateSwitch = gameLocal.time + 250; //Lubos
}
//HUMANHEAD rww - use proper lang string
//warmupText = "Warming up.. waiting for players to get ready";
Expand Down Expand Up @@ -2318,13 +2320,8 @@ bool idMultiplayerGame::Draw( int clientNum ) {
hhPlayer *player, *viewPlayer; //HUMANHEAD rww - changed to hhPlayer

//Lubos BEGIN
if ( gameLocal.serverInfo.FindKey( "devmap" ) && gameLocal.isMultiplayer ) {
if (gameLocal.numClients < 2) {
gameLocal.GetLocalPlayer()->ServerSpectate(false);
gameLocal.GetLocalPlayer()->ServerSpectate(true);
gameLocal.SpawnArtificialPlayer();
}
if (gameState == GAMEON && (gameLocal.numClients < 8)) {
if ( gameLocal.serverInfo.FindKey( "devmap" ) && (gameState == GAMEON) && gameLocal.isMultiplayer ) {
while (gameLocal.numClients < 8) {
gameLocal.SpawnArtificialPlayer();
}
}
Expand Down
43 changes: 41 additions & 2 deletions app/src/main/pk4/guis/mainmenu.gui
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,11 @@ windowDef desktop {
transition "MainOG_Bar_5::matcolor" "1 1 1 0.6" "1 1 1 0.6" "1";
transition "MainOG_Title5_text::rect" "105 308 300 25" "105 308 300 25" "1";

set "MainOG_Title6_text::forecolor" MAIN_FORECOLOR_STRING ;
transition "MainOG_Bar_6::rect" "105 343 80 19.5" "105 343 80 19.5" "1";
transition "MainOG_Bar_6::matcolor" "1 1 1 0.6" "1 1 1 0.6" "1";
transition "MainOG_Title6_text::rect" "123 335 300 25" "123 335 300 25" "1";

set "MainIG_Title1_text::forecolor" MAIN_FORECOLOR_STRING ;
transition "MainIG_Bar_1::rect" "62 208 178 19.5" "62 208 178 19.5" "1";
transition "MainIG_Bar_1::matcolor" "1 1 1 0.6" "1 1 1 0.6" "1";
Expand Down Expand Up @@ -394,6 +399,12 @@ windowDef desktop {
matcolor 1, 1, 1, 0.7
background "guis/assets/menu/bar2.tga"
}
windowDef MainOG_Bar_6 {
rect 105, 343, 80, 19.5
backcolor 0, 0, 0, 0
matcolor 1, 1, 1, 0.7
background "guis/assets/menu/bar3.tga"
}

windowDef MainOG_Title1_text {
rect 76, 200, 300, 25
Expand Down Expand Up @@ -426,14 +437,22 @@ windowDef desktop {
forecolor MAIN_FORECOLOR_COMMA
textscale 0.39
font "fonts/menu"
text "#str_20208"
text "#str_20135" // MultiPrey
}
windowDef MainOG_Title5_text {
rect 105, 308, 300, 25
backcolor 0, 0, 0, 0
forecolor MAIN_FORECOLOR_COMMA
textscale 0.39
font "fonts/menu"
text "#str_20208"
}
windowDef MainOG_Title6_text {
rect 123, 335, 300, 25
backcolor 0, 0, 0, 0
forecolor MAIN_FORECOLOR_COMMA
textscale 0.4
font "fonts/menu"
text "#str_20554"
}

Expand Down Expand Up @@ -518,7 +537,7 @@ windowDef desktop {
}
onAction {
set "cmd" "play guisounds_menu_clickin";
resetTime "Options_AnimIn" "0" ;
resetTime "Multiplayer_AnimIn" "0" ;
}
}
windowDef MainOG_Title5 {
Expand All @@ -536,6 +555,26 @@ windowDef desktop {
transition "MainOG_Bar_5::matcolor" "1 1 1 1" "1 1 1 0.6" "200";
transition "MainOG_Title5_text::rect" "96 308 300 25" "105 308 300 25" "200";
}
onAction {
set "cmd" "play guisounds_menu_clickin";
resetTime "Options_AnimIn" "0" ;
}
}
windowDef MainOG_Title6 {
rect 105, 340, 200, 20
backcolor 0, 0, 0, 0
onMouseEnter {
set "MainOG_Title6_text::forecolor" MAIN_FORECOLOR_MOUSEOVER_STRING ;
transition "MainOG_Bar_6::rect" "105 343 80 19.5" "100 343 80 19.5" "150";
transition "MainOG_Bar_6::matcolor" "1 1 1 0.6" "1 1 1 1" "150";
transition "MainOG_Title6_text::rect" "123 335 300 25" "114 335 300 25" "150";
}
onMouseExit {
set "MainOG_Title6_text::forecolor" MAIN_FORECOLOR_STRING ;
transition "MainOG_Bar_6::rect" "100 343 80 19.5" "105 343 80 19.5" "200";
transition "MainOG_Bar_6::matcolor" "1 1 1 1" "1 1 1 0.6" "200";
transition "MainOG_Title6_text::rect" "114 335 300 25" "123 335 300 25" "200";
}
onAction {
set "cmd" "play guisounds_menu_clickin";
resetTime "Exit_AnimIn" "0" ;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,13 +247,4 @@
}
}
}

buttonDef Multiplayer_Warning {
rect 150, 335, 400, 60
textalign 1
textaligny 0
shadow 1
text "WARNING! This feature is still under development and is unstable.\nIt will probably be part of the next major update!"
noevents 1
}
}

0 comments on commit f098b5a

Please sign in to comment.