Skip to content

Commit 90b0167

Browse files
committed
Maintenance update
+ made killfeed optional via coop menu + some reorganizing
1 parent 1435c12 commit 90b0167

17 files changed

+3117
-2981
lines changed

configs/sourcecoop/menu_sorting.txt

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
"Menu"
2+
{
3+
"PlayerSettings"
4+
{
5+
}
6+
7+
"SoundSettings"
8+
{
9+
}
10+
11+
"Other"
12+
{
13+
}
14+
}
15+

data/srccoop/bm_c1a4b.edt

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@
3737
"delay_output" "OnNewGame"
3838
}
3939
}
40-
// dont close controlroom door
40+
// dont close controlroom door (except when pressed the rocket fire button)
4141
"modify"
4242
{
43-
"targetname" "c1a4c_controlroom_exit_door_button"
43+
"targetname" "/^(c1a4c_controlroom_exit_door_button|c1a4c_controlroom_entry_door_button)$/"
4444
"outputs"
4545
{
4646
"remove"

plugins/srccoop.smx

63 Bytes
Binary file not shown.

plugins/srccoop_addon_killsounds.smx

216 Bytes
Binary file not shown.

plugins/srccoop_addon_scoring.smx

1.31 KB
Binary file not shown.

plugins/srccoop_addon_thirdperson.smx

-3 Bytes
Binary file not shown.

scripting/include/srccoop.inc

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include <logdebug>
1717

1818
#include <srccoop/typedef.inc>
19+
#include <srccoop/typedef_game.inc>
1920
#include <srccoop/features.inc>
2021
#include <srccoop/classdef.inc>
2122
#include <srccoop/utils.inc>

scripting/include/srccoop/classdef.inc

+7-34
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,13 @@
55

66
#include <sdktools>
77

8-
#define STATE_WARMUP "m_StateWarmup"
9-
#define STATE_ROUND "m_StateRound"
10-
#define STATE_INTERMISSION "m_StateIntermission"
8+
Handle g_pGlobalEntityGetIndex;
9+
Handle g_pGlobalEntityGetState;
10+
Handle g_pGameShutdown;
11+
Handle g_pSetCollisionBounds;
12+
Handle g_pUpdateEnemyMemory;
13+
Handle g_pGetSequenceLinearMotion;
14+
Handle g_pShouldPlayerAvoid;
1115

1216
enum struct FireOutputData
1317
{
@@ -17,32 +21,6 @@ enum struct FireOutputData
1721
float m_flDelay;
1822
}
1923

20-
enum
21-
{
22-
STATE_WARMUP_INDEX = 0,
23-
STATE_INTERMISSION_INDEX,
24-
STATE_ROUND_INDEX
25-
}
26-
27-
enum
28-
{
29-
STATE_ELEMENT_DONE_TIME = 0,
30-
STATE_ELEMENT_NEXT_STATE,
31-
STATE_ELEMENT_IS_IN_INTERMISSION
32-
}
33-
34-
enum GLOBALESTATE
35-
{
36-
GLOBAL_OFF = 0,
37-
GLOBAL_ON = 1,
38-
GLOBAL_DEAD = 2
39-
};
40-
41-
Handle g_pGlobalEntityGetIndex;
42-
Handle g_pGlobalEntityGetState;
43-
44-
Handle g_pGameShutdown;
45-
4624
methodmap Array_t < ArrayList
4725
{
4826
public Array_t(ArrayList pHandle = null)
@@ -62,11 +40,6 @@ methodmap Array_t < ArrayList
6240
}
6341
}
6442

65-
Handle g_pSetCollisionBounds;
66-
Handle g_pUpdateEnemyMemory;
67-
Handle g_pGetSequenceLinearMotion;
68-
Handle g_pShouldPlayerAvoid;
69-
7043
public int InternalGetBaseEntity(const int iEntIndex)
7144
{
7245
return (iEntIndex > -1) ? EntIndexToEntRef(iEntIndex) : iEntIndex;

scripting/include/srccoop/menu.inc

+20-4
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
TopMenu g_pCoopTopMenu;
77
TopMenuObject g_pCoopPlayerSettingsMenu;
88
TopMenuObject g_pCoopSoundSettingsMenu;
9+
TopMenuObject g_pCoopOthersMenu;
910

1011
public any Native_GetCoopTopMenu(Handle plugin, int numParams)
1112
{
@@ -19,8 +20,19 @@ void InitializeMenus()
1920
RegConsoleCmd("sizeup", Command_CoopMenu, "Displays the coop menu");
2021

2122
g_pCoopTopMenu = new TopMenu(CoopTopMenuHandler);
22-
g_pCoopPlayerSettingsMenu = g_pCoopTopMenu.AddCategory(COOPMENU_CATEGORY_SETTINGS, CoopTopMenuHandler);
23-
g_pCoopSoundSettingsMenu = g_pCoopTopMenu.AddCategory(COOPMENU_CATEGORY_SOUND_SETTINGS, CoopTopMenuHandler);
23+
g_pCoopPlayerSettingsMenu = g_pCoopTopMenu.AddCategory(COOPMENU_CATEGORY_PLAYER, CoopTopMenuHandler);
24+
g_pCoopSoundSettingsMenu = g_pCoopTopMenu.AddCategory(COOPMENU_CATEGORY_SOUNDS, CoopTopMenuHandler);
25+
g_pCoopOthersMenu = g_pCoopTopMenu.AddCategory(COOPMENU_CATEGORY_OTHER, CoopTopMenuHandler);
26+
27+
char path[PLATFORM_MAX_PATH];
28+
char error[256];
29+
30+
BuildPath(Path_SM, path, sizeof(path), "configs/sourcecoop/menu_sorting.txt");
31+
32+
if (!g_pCoopTopMenu.LoadConfig(path, error, sizeof(error)))
33+
{
34+
LogError("Could not load SourceCoop menu config (file \"%s\": %s)", path, error);
35+
}
2436
}
2537

2638
public void CoopTopMenuHandler(TopMenu topmenu, TopMenuAction action, TopMenuObject topobj_id, int param, char[] buffer, int maxlength)
@@ -33,11 +45,15 @@ public void CoopTopMenuHandler(TopMenu topmenu, TopMenuAction action, TopMenuObj
3345
{
3446
if (topobj_id == g_pCoopPlayerSettingsMenu)
3547
{
36-
Format(buffer, maxlength, COOPMENU_CATEGORY_SETTINGS);
48+
Format(buffer, maxlength, "Player settings");
3749
}
3850
else if (topobj_id == g_pCoopSoundSettingsMenu)
3951
{
40-
Format(buffer, maxlength, COOPMENU_CATEGORY_SOUND_SETTINGS);
52+
Format(buffer, maxlength, "Sound settings");
53+
}
54+
else if (topobj_id == g_pCoopOthersMenu)
55+
{
56+
Format(buffer, maxlength, "Other");
4157
}
4258
}
4359
}

0 commit comments

Comments
 (0)