Bring compiler pragmas to the top

To ensure full support for the transitional syntax. Also updated
DHooks.inc until Dr!fter does.
This commit is contained in:
shavitush 2016-06-30 12:24:39 +03:00
parent 9b13e3b3e0
commit ca6eae68d5
11 changed files with 86 additions and 86 deletions

View File

@ -450,7 +450,7 @@ public Extension __ext_dhooks =
}; };
#if !defined REQUIRE_EXTENSIONS #if !defined REQUIRE_EXTENSIONS
public __ext_dhooks_SetNTVOptional() public void __ext_dhooks_SetNTVOptional()
{ {
MarkNativeAsOptional("DHookAddEntityListener"); MarkNativeAsOptional("DHookAddEntityListener");
MarkNativeAsOptional("DHookRemoveEntityListener"); MarkNativeAsOptional("DHookRemoveEntityListener");

View File

@ -481,7 +481,7 @@ native int Shavit_PrintToChat(int client, const char[] format, any ...);
// same as Shavit_PrintToChat() but loops through the whole server // same as Shavit_PrintToChat() but loops through the whole server
// code stolen from the base halflife.inc file // code stolen from the base halflife.inc file
stock Shavit_PrintToChatAll(const char[] format, any ...) stock void Shavit_PrintToChatAll(const char[] format, any ...)
{ {
char[] buffer = new char[255]; char[] buffer = new char[255];

View File

@ -18,6 +18,10 @@
* *
*/ */
#pragma newdecls required
#pragma semicolon 1
#pragma dynamic 131072
#include <sourcemod> #include <sourcemod>
#include <sdktools> #include <sdktools>
#include <geoip> #include <geoip>
@ -30,10 +34,6 @@
#undef REQUIRE_PLUGIN #undef REQUIRE_PLUGIN
#include <adminmenu> #include <adminmenu>
#pragma semicolon 1
#pragma dynamic 131072
#pragma newdecls required
//#define DEBUG //#define DEBUG
// game type (CS:S/CS:GO) // game type (CS:S/CS:GO)

View File

@ -18,6 +18,10 @@
* *
*/ */
#pragma newdecls required
#pragma semicolon 1
#pragma dynamic 131072
#include <sourcemod> #include <sourcemod>
#define USES_STYLE_NAMES #define USES_STYLE_NAMES
@ -25,10 +29,6 @@
#include <shavit> #include <shavit>
#include <clientprefs> #include <clientprefs>
#pragma semicolon 1
#pragma dynamic 131072
#pragma newdecls required
#define HUD_NONE (0) #define HUD_NONE (0)
#define HUD_MASTER (1 << 0) // master setting #define HUD_MASTER (1 << 0) // master setting
#define HUD_CENTER (1 << 1) // show hud as hint text #define HUD_CENTER (1 << 1) // show hud as hint text

View File

@ -18,6 +18,10 @@
* *
*/ */
#pragma newdecls required
#pragma semicolon 1
#pragma dynamic 131072
#include <sourcemod> #include <sourcemod>
#include <cstrike> #include <cstrike>
#include <sdktools> #include <sdktools>
@ -30,10 +34,6 @@
#undef REQUIRE_EXTENSIONS #undef REQUIRE_EXTENSIONS
#include <dhooks> #include <dhooks>
#pragma semicolon 1
#pragma dynamic 131072
#pragma newdecls required
bool gB_Hide[MAXPLAYERS+1]; bool gB_Hide[MAXPLAYERS+1];
bool gB_Late; bool gB_Late;
int gF_LastFlags[MAXPLAYERS+1]; int gF_LastFlags[MAXPLAYERS+1];

View File

@ -20,6 +20,10 @@
// I have no idea if this plugin will work with CS:S, sorry. // I have no idea if this plugin will work with CS:S, sorry.
#pragma semicolon 1
#pragma dynamic 131072
#pragma newdecls required
#include <sourcemod> #include <sourcemod>
#include <cstrike> #include <cstrike>
#include <sdktools> #include <sdktools>
@ -29,10 +33,6 @@
#define USES_STYLE_PROPERTIES #define USES_STYLE_PROPERTIES
#include <shavit> #include <shavit>
#pragma semicolon 1
#pragma dynamic 131072
#pragma newdecls required
ServerGame gSG_Type = Game_Unknown; ServerGame gSG_Type = Game_Unknown;
int gI_ReplayTick[MAX_STYLES]; int gI_ReplayTick[MAX_STYLES];

View File

@ -18,14 +18,14 @@
* *
*/ */
#include <sourcemod>
#include <sdktools>
#include <shavit>
#pragma semicolon 1 #pragma semicolon 1
#pragma dynamic 131072 #pragma dynamic 131072
#pragma newdecls required #pragma newdecls required
#include <sourcemod>
#include <sdktools>
#include <shavit>
#define SOUNDS_LIMIT 64 // we really don't need more than that #define SOUNDS_LIMIT 64 // we really don't need more than that
ServerGame gSG_Type = Game_Unknown; ServerGame gSG_Type = Game_Unknown;

View File

@ -18,6 +18,10 @@
* *
*/ */
#pragma semicolon 1
#pragma dynamic 131072
#pragma newdecls required
#include <sourcemod> #include <sourcemod>
#define USES_STYLE_NAMES #define USES_STYLE_NAMES
@ -25,10 +29,6 @@
#define USES_STYLE_PROPERTIES #define USES_STYLE_PROPERTIES
#include <shavit> #include <shavit>
#pragma semicolon 1
#pragma dynamic 131072
#pragma newdecls required
// macros // macros
#define MAPSDONE 0 #define MAPSDONE 0
#define MAPSLEFT 1 #define MAPSLEFT 1

View File

@ -20,13 +20,13 @@
// original idea from ckSurf. // original idea from ckSurf.
#include <sourcemod>
#include <shavit>
#pragma semicolon 1 #pragma semicolon 1
#pragma dynamic 131072 #pragma dynamic 131072
#pragma newdecls required #pragma newdecls required
#include <sourcemod>
#include <shavit>
// #define DEBUG // #define DEBUG
// database handle // database handle

View File

@ -18,6 +18,10 @@
* *
*/ */
#pragma semicolon 1
#pragma dynamic 131072
#pragma newdecls required
#include <sourcemod> #include <sourcemod>
#define USES_STYLE_NAMES #define USES_STYLE_NAMES
@ -27,10 +31,6 @@
#undef REQUIRE_PLUGIN #undef REQUIRE_PLUGIN
#include <adminmenu> #include <adminmenu>
#pragma semicolon 1
#pragma dynamic 131072
#pragma newdecls required
//#define DEBUG //#define DEBUG
bool gB_Late; bool gB_Late;

View File

@ -18,6 +18,10 @@
* *
*/ */
#pragma semicolon 1
#pragma dynamic 131072
#pragma newdecls required
#include <sourcemod> #include <sourcemod>
#include <sdktools> #include <sdktools>
#include <cstrike> #include <cstrike>
@ -26,10 +30,6 @@
#undef REQUIRE_PLUGIN #undef REQUIRE_PLUGIN
#include <adminmenu> #include <adminmenu>
#pragma semicolon 1
#pragma dynamic 131072
#pragma newdecls required
#define PLACEHOLDER 32767 #define PLACEHOLDER 32767
ServerGame gSG_Type = Game_Unknown; ServerGame gSG_Type = Game_Unknown;