Permalink
Browse files

Remove DisableHay

This was first implemented for testing purposes in
9c51ac4
  • Loading branch information...
George
George committed Jan 8, 2017
1 parent db0f532 commit 5b70985d231b5307ae47f546d5dac526745a8fec
@@ -121,14 +121,12 @@ lvp_minigaming(playerid, params[]) {
}
#endif
#if Feature::DisableHay == 0
if (hayHasPlayerSignedUp(subjectId)) {
format(minigaming, sizeof(minigaming), "%s\n{%06x}%s {FFFFFF}(Id: %d)\t%s\t-", minigaming,
ColorManager->playerColor(subjectId) >>> 8, Player(subjectId)->nicknameString(), subjectId,
GetPlayerMinigameName(subjectId));
continue;
}
#endif
if (CLyse__GetPlayerState(subjectId) != LYSE_STATE_NONE) {
Color->toString(Color::MinigameTransparentBlue, colorBuffer[0], sizeof(colorBuffer[]));
@@ -60,12 +60,10 @@ RemovePlayerFromAnyGame(playerId) {
}
#endif
#if Feature::DisableHay == 0
if (hayHasPlayerSignedUp(playerId)) {
hayRemovePlayer(playerId);
return 1;
}
#endif
#if Feature::DisableFights == 0
if (waterFightIsPlayerSignedUp(playerId)) {
@@ -213,9 +211,7 @@ ResetPlayerStats(playerId) {
waterFightOnDisconnect(playerId);
#endif
iPlayerSesKills[playerId] = 0;
#if Feature::DisableHay == 0
hayResetPlayerData(playerId);
#endif
#if Feature::DisableFights == 0
rwRemovePlayerFromMinigame(playerId);
#endif
@@ -61,9 +61,7 @@ class DeprecatedTimerRuntime {
rwProcess();
#endif
#if Feature::DisableHay == 0
hayProcess();
#endif
ProcessMapZoneRaces();
#if Feature::DisableFights == 0
@@ -97,9 +95,7 @@ class DeprecatedTimerRuntime {
CBomb__CheckPlayer (playerId);
CDerby__PlayerProcess (playerId);
#if Feature::DisableHay == 0
hayPlayerProcess(playerId);
#endif
TeleportCheatProcess(playerId);
ProcessPlayerBox(playerId);
CheckPlayerClubAudioStream(playerId);
@@ -762,12 +762,10 @@ public OnPlayerCommandText(playerid, cmdtext[]) {
#endif
#if Feature::DisableHay == 0
if(!strcmp(cmd, "/haystack", true))
{
return hayOnCommand(playerid);
}
#endif
if(strcmp(cmd, "/ramping", true) == 0){
@@ -21,11 +21,9 @@ public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) {
if (sprayTagOnKeyStateChange(playerid, newkeys, oldkeys))
return 1;
#if Feature::DisableHay == 0
// Haystack
if (hayOnPlayerPunch(playerid, newkeys, oldkeys))
return 1;
#endif
// Drinking
CDrink__OnKey(playerid, newkeys);
@@ -48,10 +48,8 @@ OriginalOnPlayerSpawn(playerId) {
if (CRobbery__Spawn(playerId))
return 1;
#if Feature::DisableHay == 0
if (hayOnPlayerSpawn(playerId))
return 1;
#endif
if (CLyse__GetPlayerState(playerId) == LYSE_STATE_RUNNING) {
CLyse__SpawnPlayer(playerId);
@@ -144,9 +144,7 @@ deprecated_OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
case 2: CBrief__MenuActivate(playerid);
case 3: CShell__MenuActivate(playerid);
case 4: CLyse__MenuActivate(playerid);
#if Feature::DisableHay == 0
case 5: hayMenuActivate(playerid);
#endif
}
#else
switch (listitem) {
@@ -36,9 +36,7 @@ public OnGameModeInit() {
CRobbery__Initialize(); // Robbery
CShell__CheckStatus(); // Rivershell
#if Feature::DisableHay == 0
CHay__Initialize(); // Haystack minigame
#endif
CDerby__Init(); // Derby handler
#if Feature::DisableFights == 0
@@ -362,10 +362,8 @@ IsPlayerMinigameFree(playerId) {
if (waterFightIsPlayerSignedUp(playerId))
return 0;
#if Feature::DisableHay == 0
if (hayHasPlayerSignedUp(playerId))
return 0;
#endif
return 1;
}
@@ -35,9 +35,7 @@
#include Resources/Minigames/Core/WaterFight.pwn
#endif
#if Feature::DisableHay == 0
#include Resources/Minigames/Core/HayStack/Core.pwn
#endif
// Converts the type of minigame a player is playing to a MinigameType enumeration value.
MinigameType: GetPlayerMinigameType(playerId) {
@@ -52,10 +50,8 @@ MinigameType: GetPlayerMinigameType(playerId) {
return WaterFightMinigame;
#endif
#if Feature::DisableHay == 0
if (hayHasPlayerSignedUp(playerId))
return HayStackMinigame;
#endif
if (isPlayerBrief[playerId])
return CaptureBriefcaseMinigame;
@@ -152,12 +148,10 @@ GetPlayerMinigameName(playerId) {
}
#endif
#if Feature::DisableHay == 0
if (hayHasPlayerSignedUp(playerId)) {
notice = "HayStack";
goto l_Success;
}
#endif
if (IsPlayerInMapZone(playerId)) {
format(notice, sizeof(notice), "%s", Map_Zone[GetPlayerMapZone(playerId)][Map_Name]);
@@ -207,10 +201,8 @@ IsPlayerInMinigame(playerId) {
if (IsPlayerInMapZone(playerId))
return 1;
#if Feature::DisableHay == 0
if (hayHasPlayerSignedUp(playerId) && hayGetState() > 1)
return 1;
#endif
if (CLyse__GetPlayerState(playerId) > 1)
return 1;
@@ -256,10 +248,8 @@ IsPlayerMinigameFree(playerId) {
if (CHideGame__GetPlayerState(playerId) > 0)
return 0;
#if Feature::DisableHay == 0
if (hayHasPlayerSignedUp(playerId))
return 0;
#endif
return 1;
}
View
@@ -106,9 +106,5 @@ class Feature {
public const EnableGiftHunting = 0;
/** **************************************************************************************** **/
/// Minigames
// The Hay minigame is a very nice-to-have game, but it hogs CPU.
public const DisableHay = 0;
};

0 comments on commit 5b70985

Please sign in to comment.