Skip to content

Commit

Permalink
Merge pull request gemidyne#243 from gemidyne/hotfix/morecolors-heap
Browse files Browse the repository at this point in the history
fix(chat): Removed morecolors, embedded updated version within plugin
  • Loading branch information
Steven authored Sep 27, 2022
2 parents 5f2f0a2 + d044b20 commit d8bddd5
Show file tree
Hide file tree
Showing 9 changed files with 1,034 additions and 42 deletions.
4 changes: 2 additions & 2 deletions src/scripting/AS-MicroTF2-ExampleIntegration.sp
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

public Plugin myinfo =
{
name = "WarioWare REDUX: Example Integration plugin",
author = "Gemidyne Softworks / Team WarioWare",
name = "Microgames in Team Fortress 2: Example Integration plugin",
author = "gemidyne",
description = "This is an example plugin to demonstrate integration possibilities.",
version = "1.0",
url = "https://www.gemidyne.com/"
Expand Down
4 changes: 2 additions & 2 deletions src/scripting/AS-MicroTF2-MapChooser.sp
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

public Plugin myinfo =
{
name = "WarioWare REDUX: SourceMod Mapchooser Integration",
author = "Gemidyne Softworks / Team WarioWare",
name = "Microgames in Team Fortress 2: SourceMod Mapchooser Integration",
author = "gemidyne",
description = "SourceMod Mapchooser Plugin integration",
version = "1.0",
url = "https://www.gemidyne.com/"
Expand Down
4 changes: 2 additions & 2 deletions src/scripting/AS-MicroTF2-SDK.sp
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

public Plugin myinfo =
{
name = "WarioWare REDUX: SDK",
author = "Gemidyne Softworks / Team WarioWare",
name = "Microgames in Team Fortress 2: SDK",
author = "gemidyne",
description = "Software Development Kit",
version = "1.0",
url = "https://www.gemidyne.com/"
Expand Down
11 changes: 5 additions & 6 deletions src/scripting/AS-MicroTF2.sp
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
#pragma dynamic 131072
#pragma semicolon 1
#pragma newdecls required

/*
* Microgames for Team Fortress 2
*
* https://www.gemidyne.com/
*/

#pragma semicolon 1

#define AUTOLOAD_EXTENSIONS
#define REQUIRE_EXTENSIONS
#define REQUIRE_PLUGIN
Expand All @@ -14,17 +16,13 @@
#include <sdktools>
#include <tf2>
#include <tf2_stocks>
#include <morecolors>
#include <tf_econ_data>
#include <warioware>
#include <sdkhooks>
#include <SteamWorks>
#include <tf2items>
#include <tf2attributes>

#pragma newdecls required
#pragma dynamic 131072

//#define DEBUG
//#define LOGGING_STARTUP
#define PLUGIN_VERSION "5.2.6"
Expand All @@ -41,6 +39,7 @@
#define SPR_MAX 32
#define MAX_PATH_LENGTH 128

#include "MoreColors.sp"
#include "Header.sp"
#include "Forwards.sp"
#include "Sounds.sp"
Expand Down
2 changes: 1 addition & 1 deletion src/scripting/MethodMaps/Player.inc
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ methodmap Player __nullable__
strcopy(buffer2, sizeof(buffer2), rewritten);
}

CPrintToChat(this.ClientId, "%s%s", PLUGIN_PREFIX, buffer2);
MC_PrintToChat(this.ClientId, "%s%s", PLUGIN_PREFIX, buffer2);
}

public void ShowAnnotation(int attachToEntity, float lifetime, char text[32])
Expand Down
36 changes: 18 additions & 18 deletions src/scripting/MinigameSystem.sp
Original file line number Diff line number Diff line change
Expand Up @@ -4,34 +4,34 @@
* Implements a System for Minigames.
*/

int g_iMinigamesLoadedCount = 0;
int g_iBossgamesLoadedCount = 0;
static int g_iMinigamesLoadedCount = 0;
static int g_iBossgamesLoadedCount = 0;

bool g_bMinigameIsEnabled[MAXIMUM_MINIGAMES];
static bool g_bMinigameIsEnabled[MAXIMUM_MINIGAMES];
char g_sDynamicCaptionFunctionName[MAXIMUM_MINIGAMES][64];
bool g_bMinigameHasDynamicCaption[MAXIMUM_MINIGAMES];
bool g_bMinigameBlockedSpecialRound[MAXIMUM_MINIGAMES][SPR_MAX];
bool g_bMinigameRequiresMultiplePlayers[MAXIMUM_MINIGAMES];
float g_fMinigameBlockedOnSpeedsGreaterThan[MAXIMUM_MINIGAMES];
int g_iMinigameMaximumParticipantCount[MAXIMUM_MINIGAMES];
int g_iMinigameMinimumParticipantCount[MAXIMUM_MINIGAMES];
static bool g_bMinigameBlockedSpecialRound[MAXIMUM_MINIGAMES][SPR_MAX];
static bool g_bMinigameRequiresMultiplePlayers[MAXIMUM_MINIGAMES];
static float g_fMinigameBlockedOnSpeedsGreaterThan[MAXIMUM_MINIGAMES];
static int g_iMinigameMaximumParticipantCount[MAXIMUM_MINIGAMES];
static int g_iMinigameMinimumParticipantCount[MAXIMUM_MINIGAMES];

bool g_bBossgameIsEnabled[MAXIMUM_MINIGAMES];
static bool g_bBossgameIsEnabled[MAXIMUM_MINIGAMES];
bool g_bBossgameUsesCaption[MAXIMUM_MINIGAMES];
char g_sBossgameDynamicCaptionFunctionName[MAXIMUM_MINIGAMES][64];
bool g_bBossgameHasDynamicCaption[MAXIMUM_MINIGAMES];
bool g_bBossgameBlockedSpecialRound[MAXIMUM_MINIGAMES][SPR_MAX];
bool g_bBossgameRequiresMultiplePlayers[MAXIMUM_MINIGAMES];
float g_fBossgameBlockedOnSpeedsGreaterThan[MAXIMUM_MINIGAMES];
static bool g_bBossgameBlockedSpecialRound[MAXIMUM_MINIGAMES][SPR_MAX];
static bool g_bBossgameRequiresMultiplePlayers[MAXIMUM_MINIGAMES];
static float g_fBossgameBlockedOnSpeedsGreaterThan[MAXIMUM_MINIGAMES];

char g_sMinigameBgm[MAXIMUM_MINIGAMES][MAX_PATH_LENGTH];
float g_fMinigameBgmLength[MAXIMUM_MINIGAMES];

char g_sBossgameBgm[MAXIMUM_MINIGAMES][MAX_PATH_LENGTH];
float g_fBossgameBgmLength[MAXIMUM_MINIGAMES];

ArrayList g_hPlayedMinigamePool;
ArrayList g_hPlayedBossgamePool;
static ArrayList g_hPlayedMinigamePool;
static ArrayList g_hPlayedBossgamePool;

#include "MinigameStocks.sp"

Expand Down Expand Up @@ -91,7 +91,7 @@ public void InitializeMinigames()
AddToForward(g_pfOnMapEnd, INVALID_HANDLE, MinigameSystem_OnMapEnd);
}

public void MinigameSystem_OnMapStart()
void MinigameSystem_OnMapStart()
{
g_hPlayedMinigamePool = new ArrayList();
g_hPlayedBossgamePool = new ArrayList();
Expand All @@ -117,13 +117,13 @@ public void MinigameSystem_OnMapStart()
}
}

public void MinigameSystem_OnMapEnd()
void MinigameSystem_OnMapEnd()
{
g_hPlayedMinigamePool.Close();
g_hPlayedBossgamePool.Close();
}

public void LoadMinigameData()
void LoadMinigameData()
{
char funcName[64];
char file[128];
Expand Down Expand Up @@ -205,7 +205,7 @@ public void LoadMinigameData()
kv.Close();
}

public void LoadBossgameData()
void LoadBossgameData()
{
char funcName[64];
char file[128];
Expand Down
Loading

0 comments on commit d8bddd5

Please sign in to comment.